Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to specify the sensor plugin type in the Gazebo SDF file.
ROS
<sensor name="camera_sensor" type="camera"> <plugin name="camera_plugin" filename="libgazebo_ros_camera.so"> <robotNamespace>[1]</robotNamespace> </plugin> </sensor>
Attempts:
3 left
💡 Hint
Common Mistakes
Using a generic or unrelated namespace like '/gazebo' which may cause topic conflicts.
✗ Incorrect
The tag defines the ROS namespace for the sensor plugin. '/camera_ns' is a common example namespace for camera sensors.
2fill in blank
mediumComplete the code to set the update rate of a Gazebo sensor plugin.
ROS
<plugin name="lidar_plugin" filename="libgazebo_ros_laser.so"> <updateRate>[1]</updateRate> </plugin>
Attempts:
3 left
💡 Hint
Common Mistakes
Setting updateRate too low causing slow sensor data.
Setting updateRate too high causing performance issues.
✗ Incorrect
The updateRate tag sets how many times per second the sensor updates. 60 Hz is a common update rate for lidar sensors.
3fill in blank
hardFix the error in the plugin XML by completing the missing sensor topic name.
ROS
<plugin name="imu_plugin" filename="libgazebo_ros_imu.so"> <topicName>[1]</topicName> </plugin>
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect topic names that do not match ROS conventions.
✗ Incorrect
The standard ROS topic for raw IMU data is '/imu/data_raw'. Using this ensures compatibility with other ROS nodes.
4fill in blank
hardFill both blanks to correctly configure a Gazebo camera sensor plugin with ROS topic and frame name.
ROS
<plugin name="camera_plugin" filename="libgazebo_ros_camera.so"> <cameraName>[1]</cameraName> <frameName>[2]</frameName> </plugin>
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up cameraName and frameName values.
Using generic frame names like 'base_link' for camera frame.
✗ Incorrect
The cameraName is typically the sensor name like 'front_camera'. The frameName is the coordinate frame, often 'camera_link' for cameras.
5fill in blank
hardFill all three blanks to create a Gazebo plugin snippet that sets the sensor update rate, topic name, and robot namespace.
ROS
<plugin name="depth_camera_plugin" filename="libgazebo_ros_depth_camera.so"> <updateRate>[1]</updateRate> <topicName>[2]</topicName> <robotNamespace>[3]</robotNamespace> </plugin>
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect topic names or namespaces.
Setting updateRate too low or too high.
✗ Incorrect
The updateRate is set to 60 Hz for smooth depth data. The topicName is the standard ROS topic for depth images. The robotNamespace groups the sensor under a specific namespace.
