Introducing Bebop

The following image shows the Parrot Bebop quadrotor craft that will be discussed in this section. This quadrotor weighs 400 grams and has more advanced features than the Crazyflie. Its cost is around $ 500.

Introducing Bebop

Bebop

Parrot is a company with headquarters in Paris, France, that produces products such as the Bebop quadrotor. The Bebop is described in detail at their website, http://www.parrot.com/usa/products/bebop-drone/.

The Bebop can be controlled by its own Skycontroller or by using smartphones or tablets. The Skycontroller is described at the following site: http://blog.parrot.com/2014/12/15/how-to-pilot-skycontroller/.

Bebop has on-board sensors for autonomous flight through the use of GPS for guidance. The Bebop also has a forward-looking camera for aerial photography. The Wi-Fi communications module of Bebop allows manual control and control by a ROS package called bebop_autonomy. The next section will concentrate on the use of the ROS software to control Bebop.

Tip

Important!

Before flying the Bebop or using the ROS interface, visit the Bebop website, and download and install the latest firmware version for the Bebop.

The bebop_autonomy software is the ROS driver for Parrot Bebop quadrotor based on the Parrot AR.Drone SDK3 development kit. This driver was developed at Autonomy Lab of Simon Fraser University by Mani Monajjemi. We thank Mr. Monajjemi for his generous assistance in helping us prepare this section.

Loading bebop_autonomy software

The http://www.ros.org/ website announced the new package bebop_autonomy as a ROS driver for Parrot Bebop Drone:

http://www.ros.org/news/2015/09/new-package-bebop-autonomy-ros-driver-for-parrot-bebop-drone.html.

The instructions for loading the ROS software and using it for Bebop are well described at http://bebop-autonomy.readthedocs.org/en/latest/.

http://bebop-autonomy.readthedocs.org/en/latest/installation.html.

The features to be incorporated into bebop_autonomy and the status of these features can be found in the documentation found at: https://media.readthedocs.org/pdf/bebop-autonomy/latest/bebop-autonomy.pdf.

To load the bebop_autonomy software, first get the required Ubuntu packages with the following command:

$ sudo apt-get install build-essential python-rosdep python-catkin-tools

Create the Bebop workspace bebop_ws and download software from GitHub:

$ mkdir -p ~/bebop_ws/src
$ cd ~/bebop_ws
$ catkin init
$ git clone https://github.com/AutonomyLab/bebop_autonomy.git src/bebop_autonomy

Use rosdep to install the bebop_autonomy package dependencies:

$ rosdep update
$ rosdep install --from-paths src -i

Then, build the workspace:

$ catkin build -DCMAKE_BUILD_TYPE=RelWithDebInfo

Be patient as this may take up to 15 minutes on some systems.

Get the Bebop teleop tools with the following commands:

$ cd ~/bebop_ws/src
$ git clone https://github.com/ros-teleop/teleop_tools.git

Then, repeat the update, install, and build steps again:

$ cd ~/bebop_ws
$ rosdep update
$ rosdep install --from-paths src -i
$ catkin build -DCMAKE_BUILD_TYPE=RelWithDebInfo

Once the software is loaded and the files are built, add the following statement in the .bashrc file:

source ~/bebop_ws/devel/setup.bash

Alternatively, issue the following command at a terminal:

$ source ~/bebop_ws/devel/setup.bash

Remember, adding the statement to the .bashrc file will apply it to each new terminal window opened. The source command at the terminal will only apply to that terminal window.

Also, check your ROS package path with the following command:

$ echo $ROS_PACKAGE_PATH

The path /home/<username>/bebop_ws/src should be displayed as one of the paths on the screen.

The software download creates a number of packages that are used to control Bebop. The bebop_autonomy package is actually a metapackage with a package.xml file that lists three other packages as follows:

  • bebop_driver that contains C++ code for the node bebop_driver_node
  • bebop_msgs that contains messages used with Bebop
  • bebop_tools that contains miscellaneous tools for Bebop

Another package teleop_tools is not considered in this book.

Preparing to fly Bebop

Before flying Bebop, review the Bebop User's Guide available at http://www.parrot.com/usa/support/parrot-bebop-drone/.

Read the instructions in that document for the following points:

  • Assembling the Bebop quadrotor, charging the battery, and other preliminary matters
  • Pay attention to the section on Preflight Check that includes many safety tips
  • Study the section on flying that includes the instructions for calibrating the magnetometer of the Bebop

Testing Bebop communications

After a pre-flight check and clearing the flying area of people and obstructions, power on Bebop and wait for several minutes.

Using the Systems Settings tab in the Ubuntu desktop, select Network and check your wireless connections to see if your computer is communicating with Bebop. You should see the Bebop network BebopDrone-<xxxxxxx>. The numbers indicate the identification number of your Bebop.

Then, test the communications between the computer workstation and the Bebop by pinging the craft. From a terminal window, issue the ping command to the Bebop and wait for the response:

$ ping 192.168.42.2

The output is as follows:

PING 192.168.42.2 (192.168.42.2) 56(84) bytes of data.

64 bytes from 192.168.42.2: icmp_seq=1 ttl=64 time=0.012 ms

64 bytes from 192.168.42.2: icmp_seq=2 ttl=64 time=0.016 ms

The IP address here is for the Bebop tested. The IP address should be 192.168.42.x where the x value depends on the Bebop.

Flying Bebop using commands

Now, it is time to launch the bebop_driver node and use commands to perform a takeoff and landing. Launch Bebop with the following command:

$ roslaunch bebop_driver bebop_node.launch

Explore the nodes and topics:

$ rosnode list

The output should be as follows:

/bebop/bebop_driver
/rosout

Then type the following command:

$ rostopic list

This will produce a long list, in which the following topics are of interest in getting Bebop to take off and land:

/bebop/takeoff
/bebop/land
/bebop/reset
/bebop/navigate_home

Note that in both the lists, the namespace (ns) is bebop and items are listed as /bebop/<node> or /bebop/<topic>.

Take off

Watch it fly. Bebop goes straight up 1 meter after you execute the following command:

$ rostopic pub /bebop/takeoff std_msgs/Empty --once

The output should be as follows:

publishing and latching message for 3.0 seconds

The following rqt_graph shows the topic /bebop/takeoff sent to the node /bebop/bebop_driver to start the takeoff process. The /rostopic_14655.. node on the left represents the rostopic command issued for takeoff.

Take off

Bebop takeoff node graph

Landing

Bebop will land when you issue this command:

$ rostopic pub /bebop/land std_msgs/Empty --once

The output is as follows:

publishing and latching message for 3.0 seconds

There are many other options for the Bebop that are not covered here. Refer to the Bebop website and the instructions for the bebop_autonomy software previously listed to explore all of Bebop's functions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset