Adding Sensors to Our Simulation

David Allen Blubaugh, Steven D. Harbour, Benjamin Sears, Michael J. Findler · Apress eBooks · 2022

In Chapter 4 , we created our first Gazebo simulation of the rover. We manually drove the rover around the empty environment. We used URDF files to define what our rover looked like and the launch files to define the rover controls in the Gazebo environment. Now we want to add sensors so that the rover can “see” obstacles. Unfortunately, the URDF files will get very big and hard to maintain without a little help. Enter the Xacro XML language extension (Xacro stands for XML Macro). It helps add standard sensors via simple blocks of code, called plug-ins. The plug-ins support sensors such as LiDAR, radar, cameras, etc. Our LiDAR sensor develops the first distance-ranging capabilities of the rover. We will develop Python scripts that directly control the rover’s wheels through the differential drive plug-in. Finally, we will experiment with a keyboard control (Teleops) of the rover via a Python script.

Read the paper · More papers on PaperTik