Sending Commands to Bebop¶
Note
bebop_tools
package comes with a launch file for tele-operating Bebop with a joystick using ROS joy_teleop package. The configuration file (key-action map) is written for Logitech F710 controller and is located in bebop_tools/config
folder. Adapting the file to your own controller is straightforward. To teleop Bebop while the driver is running execute roslaunch bebop_tools joy_teleop.launch
.
Takeoff¶
Publish a message of type std_msgs/Empty
to takeoff
topic.
$ rostopic pub --once std_msgs/Empty [namespace]/takeoff
Land¶
Publish a message of type std_msgs/Empty
to land
topic.
$ rostopic pub --once std_msgs/Empty [namespace]/land
Emergency¶
Publish a message of type std_msgs/Empty
to reset
topic.
$ rostopic pub --once std_msgs/Empty [namespace]/reset
Piloting¶
To move Bebop around, publish messages of type geometry_msgs/Twist to cmd_vel topic while Bebop is flying. The effect of each field of the message on Bebop’s movement is listed below:
linear.x (+) Translate forward
(-) Translate backward
linear.y (+) Translate to left
(-) Translate to right
linear.z (+) Ascend
(-) Descend
angular.z (+) Rotate counter clockwise
(-) Rotate clockwise
Acceptable range for all fields are [-1..1]
. The drone executes the last received command as long as the driver is running. This command is reset to when Takeoff, Land or Emergency command is received. To make Bebop hover and maintain its current position, you need to publish a message with all fields set to zero to cmd_vel
.
Note
Since version 0.4, sign of angular.z
has been negated to conform with ROS Standard Message Types (i.e Twisl) - REP 103 and ardrone_autonomy.
Moving the Virtual Camera¶
To move Bebop’s virtual camera, publish a message of type geometry_msgs/Twist to camera_control topic. angular.y
and angular.z
fields of this message set absolute tilt and pan of the camera in degrees respectively. The field of view of this virtual camera (based on our measurements) is ~80 (horizontal) and ~50 (vertical) degrees.
Warning
The API for this command is not stable. We plan to use JointState
message in future versions.
angular.y (+) tilt down
(-) tilt up
angular.z (+) pan left
(-) pan right
Flat Trim¶
Error
Test fails, probably not working.
Publish a message of type std_msgs/Empty
to flattrim
topic.
$ rostopic pub --once std_msgs/Empty [namespace]/flattrim
Flight Animations¶
Warning
Be extra cautious when performing any flight animations, specially in indoor environments.
Bebop can perform four different types of flight animation (flipping). To perform an animation, publish a message of type std_msgs/UInt8 to flip topic while drone is flying. The data field determines the requested animation type.
0 Flip Forward
1 Flip Backward
2 Flip Right
3 Flip Left