Configure camera, LIDAR, IMU, and contact sensors on simulated robots in Gazebo
Think like a robotics perception engineer who integrates sensors into robot systems. You understand sensor physics, noise models, and data visualization. You configure sensors that produce realistic data streams suitable for perception algorithm development.
Before adding or configuring any sensor, ask yourself:
Sensors are added to links within robot models:
<link name="camera_link">
<!-- Visual and collision for the sensor housing -->
<visual>...</visual>
<collision>...</collision>
<inertial>...</inertial>
<!-- The sensor itself -->
<sensor name="camera" type="camera">
<camera>
<horizontal_fov>1.047</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<topic>camera/image</topic>
</sensor>
</link>
<sensor name="front_camera" type="camera">
<camera>
<!-- Field of view in radians (60° = 1.047 rad) -->
<horizontal_fov>1.047</horizontal_fov>
<!-- Image dimensions -->
<image>
<width>640</width>
<height>480</height>
<format>R8G8B8</format>
</image>
<!-- Depth range -->
<clip>
<near>0.1</near>
<far>100</far>
</clip>
</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<visualize>true</visualize>
<topic>camera/image</topic>
</sensor>
Common resolutions:
<sensor name="lidar" type="gpu_lidar">
<lidar>
<scan>
<horizontal>
<samples>360</samples>
<resolution>1</resolution>
<min_angle>-3.14159</min_angle>
<max_angle>3.14159</max_angle>
</horizontal>
<vertical>
<samples>1</samples>
<resolution>1</resolution>
<min_angle>0</min_angle>
<max_angle>0</max_angle>
</vertical>
</scan>
<range>
<min>0.1</min>
<max>10</max>
<resolution>0.01</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0</mean>
<stddev>0.01</stddev>
</noise>
</lidar>
<always_on>1</always_on>
<update_rate>10</update_rate>
<visualize>true</visualize>
<topic>lidar/scan</topic>
</sensor>
Key parameters:
samples: Points per scan (more = denser)min/max_angle: Scan coverage (-π to π = 360°)min/max range: Detection distance limitsnoise: Gaussian noise for realism<sensor name="imu" type="imu">
<imu>
<angular_velocity>
<x>
<noise type="gaussian">
<mean>0</mean>
<stddev>0.01</stddev>
</noise>
</x>
<!-- y and z similar -->
</angular_velocity>
<linear_acceleration>
<x>
<noise type="gaussian">
<mean>0</mean>
<stddev>0.1</stddev>
</noise>
</x>
<!-- y and z similar -->
</linear_acceleration>
</imu>
<always_on>1</always_on>
<update_rate>100</update_rate>
<topic>imu/data</topic>
</sensor>
IMU outputs:
angular_velocity: Rotation rate (rad/s)linear_acceleration: Includes gravity!orientation: Quaternion (if available)Real sensors have noise. Simulated sensors should too:
<noise>
<type>gaussian</type>
<mean>0</mean>
<stddev>0.01</stddev> <!-- Adjust based on sensor quality -->
</noise>
Typical noise levels:
<always_on>1</always_on>gz topic -l for available topicsBefore finalizing any sensor configuration:
visualize enabled for debugginggz topic -eThis skill is used by:
content-implementer agent when generating Module 2 lessonsDependencies:
urdf-robot-model - sensors attach to robot linksgazebo-world-builder - sensors perceive the worldros2-gazebo-bridge - sensor data bridges to ROS 2Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer