Biomimetics and Dextrous Manipulation Lab

BebopSetup

Setting up Bebop Communication in Linux Using Bebop_Autonomy

Install ROS

  • I installed ROS Kinetic, but Indigo and Jade also work.
  • Then follow this link

Connecting to Bebop

  • Power on Bebop
  • Start Bebop, then you should be able to see a WiFi named starting with "Bebop". If you can't connect to it, just try disconnect or log out and then log in.

Running the Driver

  • Open terminal
  • Go to the directory of your bebop_ws
    $ cd bebop_ws
  • Source the directory (to set up package environment; you should do this every time you open another shell (terminal))
    $ source ~/bebop_ws/devel/setup.bash
  • Launch master
    $ roscore
    You should see "started core service [/rosout]..."
  • Open another tab in the terminal and launch the driver node
    $ source ~/bebop_ws/devel/setup.bash
    $ roslaunch bebop_driver bebop_node.launch
    It's normal to see some warnings(or some errors in the middle)
  • If you end a process and want to restart, besides sourcing again, you may also need to type
    $ catkin build
  • Then open another tab, and type commands to takeoff and land from here. Note that you can have yet another tab open and put the land command in it just in case anything happens and you can fire the land command. e.g.
    $ source ~/bebop_ws/devel/setup.bash
    $ rostopic pub --once bebop/takeoff std_msgs/Empty

Auto Sourcing

The default is that every time you open a new terminal, you have to source (type "source...") to ensure correct environment setup. To avoid this (since it's annoying), you can include it in the .bashrc file. Use
$pico ~/.bashrc
to open the .bashrc file and add the source command that you would normally type into the terminal at the bottom of the file.

Using Scripts (Command line)

  • Use your favorite shell editor to create/edit a .sh file under the bebop_ws directory (e.g. pico, vim)
    $ cd bebop_ws
    $ pico [bashname].sh
  • Put in the commands you would normally put in the terminal into this file.
  • This page talks about how to send velocity commands in detail

Using Python Scripts

  • Create a scripts directory in bebop_ws/src/bebop_autonomy package
  • Then create a file called publishersubscriber.py in the scripts directory and add code into the file
  • Make the script executable using the following command (you need to do this for every new python node you write)
    $ chmod a+x publishersubscriber.py
  • Once your script is written, build your pacakge using catkin_make in the catkin_workspace directory
  • Then run your script by first launching master in one terminal (roscore) and then in another terminal starting your node (rosrun bebop_autonomy publishersubscriber.py) or just
    $ python name.py

Reading Commands from the Bebop

  • We are looking to getting responses from the Bebop under situations like state changes(takeoff, landing, motions, etc.).
  • What was described in bebop_autonomy page was not really clear about where could we retrieve the state change information from the bebop. Our preliminary investigation showed that the relative parameters were already set to True, so the Bebop should be sending flying state changes to ROS. It's just a matter of where we could get and use that information.
  • Another approach we are looking at is using Parrot SDK directly. The relevant event is described here. We are not using it atm.

Using Publisher and Subscriber with rospy

This tutorial seems to be helpful.

Page last modified on August 05, 2018, at 04:23 PM