ROSBuzz_MISTLab/readme.md

119 lines
4.6 KiB
Markdown
Raw Normal View History

ROSBuzz
2016-10-08 19:16:55 -03:00
=========================
2016-10-08 19:09:32 -03:00
2016-10-09 22:23:33 -03:00
Description:
============
2018-12-04 11:34:07 -04:00
ROSBuzz is a ROS node encompassing Buzz Virtual Machine (BVM) and interfacing with ROS ecosystem for mobile robots. The only node of the package is `rosbuzz_node`. It can be used in simulation-in-the-loop using Gazebo and was tested over many platforms (Clearpath Husky, DJI M100, Intel Aero, 3DR Solos, Pleidis Spiris, etc.). More information about ROSBuzz peripheral nodes is available in [1].
2016-10-09 22:23:33 -03:00
2018-12-04 11:34:07 -04:00
What is Buzz?
=============
2016-10-08 19:09:32 -03:00
2018-12-04 11:34:07 -04:00
Buzz is a novel programming language for heterogeneous robots swarms. Buzz advocates a compositional approach, by offering primitives to define swarm behaviors both in a bottom-up and in a top-down fashion. Its official documentation and code are available [Buzz](https://github.com/MISTLab/Buzz).
2016-10-08 19:09:32 -03:00
Requirements
2016-10-08 19:22:03 -03:00
============
2016-10-08 19:43:38 -03:00
2018-12-04 11:34:07 -04:00
* Buzz:
2016-10-08 19:09:32 -03:00
2018-12-04 15:29:46 -04:00
Follow the required steps in [Buzz](https://github.com/MISTLab/Buzz).
2016-10-08 19:43:38 -03:00
2018-12-04 11:34:07 -04:00
* ROS **base** binary distribution (Indigo or higher):
2016-10-08 19:09:32 -03:00
2018-12-04 11:34:07 -04:00
Follow the required steps in [ROS Kinetic](https://wiki.ros.org/kinetic/Installation/Ubuntu). Note that the guidance and camera node of DJI for the M100 require to use the Indigo distribution.
2016-10-08 19:09:32 -03:00
2018-12-04 11:34:07 -04:00
* ROS additionnal dependencies:
2016-10-08 19:43:38 -03:00
2018-12-04 11:34:07 -04:00
```
$ sudo apt-get install ros-<distro>-mavros ros-<distro>-mavros-extras
```
2016-10-08 19:09:32 -03:00
Compilation
2016-10-08 19:22:03 -03:00
===========
2016-10-08 19:09:32 -03:00
2018-12-04 11:34:07 -04:00
```
mkdir -p ROS_WS/src
cd ROS_WS/src
git clone https://github.com/MISTLab/ROSBuzz rosbuzz
cd ..
2019-05-28 11:25:48 -03:00
catkin_make -DSIM=0 -DKIN=1
2018-12-04 11:34:07 -04:00
```
Compilation Flags
=================
Flags to be passed during compilation.
| Flag | Rationale |
|-------|------------------------------------------------|
| -DSIM | Indicates Compilation for robot or Simulation. |
| -DKIN | Indicates compilation for ROS Distro Kinetic |
2019-05-28 11:25:48 -03:00
Source ROS environment
===========
```
source /opt/ros/kinetic/setup.bash
source ~/ROS_WS/devel/setup.bash
```
2016-10-08 19:09:32 -03:00
Run
===
2016-10-09 22:23:33 -03:00
To run the ROSBuzz package using the launch file, execute the following:
2016-10-08 19:09:32 -03:00
2017-12-08 20:44:24 -04:00
$ roslaunch rosbuzz rosbuzz.launch
2018-12-04 11:34:07 -04:00
Have a look at the launch file to understand what parameters are available to suit your usage. All topics and services names are listed in `launch_config/topics.yaml`. Note : Before launching the ROSBuzz node, verify all the parameters in the launch file. A launch file using gdb is available too (rosbuzzd.launch).
2017-12-08 20:44:24 -04:00
A launch file for a groundstation is also available `launch/groundstation.launch`. It uses the robot ID = 0, which is detected as a groundstation by our Buzz scripts. It also has hardcoded GPS coordinates to avoid the need of a GPS sensor on the groundstation. While a groundstation is never required to deploy a swarm with ROSBuzz, it opens a websocket on ROS, useful to monitor the swarm and it creates a rosbag of the flight.
2018-12-04 11:34:07 -04:00
* Buzz scripts: Several behavioral scripts are included in the "buzz_Scripts" folder, such as "graphformGPS.bzz" uses in [1] and the "testaloneWP.bzz" to control a single drone with a ".csv" list of waypoints. The script "empty.bzz" is a template script.
2016-10-08 19:09:32 -03:00
2018-12-04 11:34:07 -04:00
Publishers
-----------
2016-10-08 19:09:32 -03:00
* Messages from Buzz (BVM):
2018-12-04 11:34:07 -04:00
The node publishes `mavros_msgs/Mavlink` message "outMavlink".
2017-12-08 20:44:24 -04:00
* Command to the flight controller:
2018-12-04 11:34:07 -04:00
The node publishes `geometry_msgs/PoseStamped message` "setpoint_position/local".
* Other information from the swarw:
The node publishes:
- "bvmstate" (`std_msgs/String`)
- "neighbours_pos" (`rosbuzz_msgs/neigh_pos`)
- "fleet_status" (`mavros_msgs/Mavlink`)
2016-10-08 19:09:32 -03:00
Subscribers
-----------
2018-12-04 11:34:07 -04:00
* Information from the Robot controller (mavros compliant):
The node subscribes to:
- "global_position/global" (`sensor_msgs/NavSatFix message`)
- "global_position/rel_alt" (`std_msgs/Float64`)
- "local_position/pose" (`geometry_msgs/PoseStamped`)
- "battery" (`sensor_msgs/BatteryState`)
- either "extended_state" (`mavros_msgs/ExtendedState`) or "state" (`mavros_msgs/State`)
2016-10-08 19:09:32 -03:00
* Messages to Buzz (BVM):
2018-12-04 11:34:07 -04:00
The node subscribes to `mavros_msgs/Mavlink` incoming message with name "inMavlink".
2016-10-08 19:09:32 -03:00
2018-12-04 11:34:07 -04:00
Services
2016-10-08 19:09:32 -03:00
-------
2017-12-08 20:44:24 -04:00
* Remote Controller:
2018-12-04 11:34:07 -04:00
The package offers a service "buzzcmd" (`mavros_msgs/CommandLong`) to control it. In the "misc" folder, a bash script shows how to control the swarm state from the command line.
2016-10-08 19:09:32 -03:00
2017-12-08 20:44:24 -04:00
References
2016-10-08 19:09:32 -03:00
------
2018-12-04 11:34:07 -04:00
* [1] ROS and Buzz : consensus-based behaviors for heterogeneous teams. St-Onge, D., Shankar Varadharajan, V., Li, G., Svogor, I. and Beltrame, G. arXiv : https://arxiv.org/abs/1710.08843
2016-10-08 19:09:32 -03:00
2018-12-04 11:34:07 -04:00
* [2] Over-The-Air Updates for Robotic Swarms. Submitted to IEEE Software (August 2017). 8pgs. Shankar Varadharajan, V., St-Onge, D., Guß, C. and Beltrame, G.
Visual Studio Code
--------------------
To activate highlights of the code in Visual Studio Code or Roboware add the following to settings.json:
```
"files.associations": {
"*.bzz":"python"
}
2018-09-06 13:47:38 -03:00
```