Simulating Drones with ROS 2 and Gazebo: A Bebop 2 Tutorial

Hello Gazebo community!

I’m excited to share my ROS 2 drone simulation project for the Parrot Bebop 2 in Gazebo. The repository includes the simulation setup, and I’ve also created a tutorial video (in Spanish with English subtitles) to help beginners.

:pushpin: Resources:

2 Likes

Cool job! This helps a lot.

1 Like

Just one important detail: When you install the repository, you need to modify the plugin paths in the SDF file. I accidentally included the full Linux path with my username (jr), so you’ll need to change it to match your system.

Here’s the relevant part of the file:
https://github.com/juliordzcer/bebop_ros/blob/main/bebop_gz/worlds/bebop1.sdf

Specifically, update these lines:

xml

 <!-- Plugin to update position -->
 <plugin name="gz::sim::systems::SetPosePlugin" filename="/home/YOUR_USERNAME/ws_bebop/src/bebop_ros/bebop_gz/plugins/build/libSetPosePlugin.so">
<robotNamespace>bebop1</robotNamespace> 
<topic>bebop1/set_pose</topic>
 </plugin>

 <plugin name="gz::sim::systems::RobotPosePublisher" filename="/home/YOUR_USERNAME/ws_bebop/src/bebop_ros/bebop_gz/plugins/build/libRobotPosePublisher.so">
 <robotNamespace>bebop1</robotNamespace>
 <topic>bebop1/pose</topic> 
</plugin>

I forgot to mention this at the beginning of the video, but I explain it when I reach this part of the code.

Note that you can get rid of this by adding some hooks to the ROS package. See ros_gz_project_template/ros_gz_example_gazebo/hooks/README.md at main · gazebosim/ros_gz_project_template · GitHub about how to do so.

The GitHub - gazebosim/ros_gz_project_template: A template project integrating ROS and Gazebo simulator also offers good help to start organizing your Gazebo + ROS package.

1 Like

Thank you for your support! The issue has been resolved now.