Skip to content

Instantly share code, notes, and snippets.

@mathewthomas916
Created July 28, 2020 19:19
Show Gist options
  • Save mathewthomas916/1d64b3ba565785c0a98b59f343125623 to your computer and use it in GitHub Desktop.
Save mathewthomas916/1d64b3ba565785c0a98b59f343125623 to your computer and use it in GitHub Desktop.
ROS2 URDF Gazebo Sensor
<gazebo reference="${name}_link">
<sensor name="${name}" type="depth">
<always_on>true</always_on>
<update_rate>15</update_rate>
<pose>0 0 0 0 0 0</pose>
<camera name="realsense_depth_camera">
<horizontal_fov>1.46608</horizontal_fov>
<image>
<width>424</width>
<height>240</height>
<format>B8G8R8</format>
</image>
<clip>
<near>0.05</near>
<far>8</far>
</clip>
</camera>
<!-- https://github.com/mlherd/ros2_turtlebot3_waffle_intel_realsense -->
<plugin name="intel_realsense_d430_depth_driver" filename="libgazebo_ros_camera.so">
<ros>
<namespace>d430</namespace>
<remapping>${name}/image_raw:=color/image_raw</remapping>
<remapping>${name}/depth/image_raw:=depth/image_rect_raw</remapping>
<remapping>${name}/camera_info:=camera_info</remapping>
<remapping>${name}/depth/camera_info:=depth/camera_info</remapping>
<remapping>${name}/points:=depth/points</remapping>
</ros>
<camera_name>${name}</camera_name>
<frame_name>${name}_link_optical</frame_name>
<hack_baseline>0.07</hack_baseline>
<min_depth>0.05</min_depth>
<max_depth>8.0</max_depth>
</plugin>
</sensor>
</gazebo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment