Adding a 3D vision sensor to Gazebo

In Gazebo, we can simulate the robot movement and its physics;  we can also simulate sensors too.

To build a sensor in Gazebo, we must model the behavior of that sensor in Gazebo. There are some prebuilt sensor models in Gazebo that can be used directly in our code without writing a new model.

Here, we are adding a 3D vision sensor (commonly known as an rgb-d sensor) called the Asus Xtion Pro model in Gazebo. The sensor model is already implemented in the gazebo_ros_pkgs/gazebo_plugins ROS package, which we have already installed in our ROS system.

Each model in Gazebo is implemented as a Gazebo-ROS plugin, which can be loaded by inserting it into the URDF file.

Here is how we include a Gazebo definition ...

Get Mastering ROS for Robotics Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.