Realsense topic not showing up
Dear users,
I am a ros beginner and I'm trying to attach a color sensor to my urdf 2-wheeled robot, using the plugin realsensegazeboplugin, cloned from this repo https://github.com/pal-robotics/realsense_gazebo_plugin. I'm doing this by including the following xacro file to the robot description xacro:
<?xml version="1.0"?>
<joint name="realsense_front_joint_${id}" type="fixed">
<axis xyz="0 0 1" />
<origin rpy="0 1.5708 0" xyz="${x} ${y} ${z}" />
<!-- <origin rpy="0 1.5708 0" xyz="${x} ${y} ${z}" /> -->
<parent link="footprint" />
<child link="base_realsense_front_${id}" />
</joint>
<link name="base_realsense_front_${id}">
<collision>
<!-- <origin xyz="${x} ${y} ${z+1}" rpy="0 0 0" /> -->
<geometry>
<box size="0.01 0.005 0.005" />
</geometry>
</collision>
<visual>
<!-- <origin xyz="${x} ${y} ${z+1}" rpy="0 0 0" /> -->
<geometry>
<box size="0.01 0.005 0.005" />
</geometry>
</visual>
<inertial>
<mass value="1e-5" />
<!-- <origin xyz="${x} ${y} ${z}" rpy="0 0 0" /> -->
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>
<!-- <material>Gazebo/Brown</material> -->
</link>
<gazebo reference="base_realsense_front_${id}">
<sensor name='color' type='camera'>
<pose>0 -0.046 0.004 0 0 0</pose>
<camera name='__default__'>
<horizontal_fov>1.047</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
<format>RGB_INT8</format>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
<noise>
<type>gaussian</type>
<mean>0</mean>
<stddev>0.007</stddev>
</noise>
</camera>
<always_on>1</always_on>
<update_rate>60</update_rate>
<visualize>1</visualize>
<plugin name="realsense_plugin" filename="librealsense_gazebo_plugin.so">
<prefix>cam</prefix>
<depthUpdateRate>60.0</depthUpdateRate>
<colorUpdateRate>60.0</colorUpdateRate>
<infraredUpdateRate>60.0</infraredUpdateRate>
<depthTopicName>depth/image_raw</depthTopicName>
<depthCameraInfoTopicName>depth/camera_info</depthCameraInfoTopicName>
<colorTopicName>color/image_raw</colorTopicName>
<colorCameraInfoTopicName>color/camera_info</colorCameraInfoTopicName>
<infrared1TopicName>infra1/image_raw</infrared1TopicName>
<infrared1CameraInfoTopicName>infra1/camera_info</infrared1CameraInfoTopicName>
<infrared2TopicName>infra2/image_raw</infrared2TopicName>
<infrared2CameraInfoTopicName>infra2/camera_info</infrared2CameraInfoTopicName>
<colorOpticalframeName>color_optical_frame</colorOpticalframeName>
<depthOpticalframeName>depth_optical_frame</depthOpticalframeName>
<infrared1OpticalframeName>infrared1_optical_frame</infrared1OpticalframeName>
<infrared2OpticalframeName>infrared2_optical_frame</infrared2OpticalframeName>
<rangeMinDepth>0.2</rangeMinDepth>
<rangeMaxDepth>10.0</rangeMaxDepth>
<pointCloud>false</pointCloud>
<pointCloudTopicName>depth/points</pointCloudTopicName>
<pointCloudCutoff>0.5</pointCloudCutoff>
</plugin>
</sensor>
</gazebo>
<!-- <gazebo reference="base_light_front_${id}">
<sensor name='cameracolor' type='camera'>
<camera name='camera'>
<horizontal_fov>1.047</horizontal_fov>
<image>
<width>320</width>
<height>240</height>
</image>
<clip>
<near>0.001</near>
<far>10</far>
</clip>
</camera>
<always_on>1</always_on>
<updateRate>30.0</updateRate>
<visualize>1</visualize>
</sensor>
</gazebo>
<gazebo>
<plugin name="realsense_gazebo_plugin" filename="librealsense_gazebo_plugin.so">
<prefix>camera</prefix>
<colorUpdateRate>30.0</colorUpdateRate>
<colorTopicName>color/image_raw</colorTopicName>
<depthImageTopicName>depth/image_raw</depthImageTopicName>
<pointCloudTopicName>depth/points</pointCloudTopicName>
<colorCameraInfoTopicName>color/camera_info</colorCameraInfoTopicName>
<colorOpticalframeName>optical_frame</colorOpticalframeName>
</plugin>
</gazebo> -->
However, when I launch the robot, start the simulation and list the topics from ROS, I can't find any topic related to the camera besides /camera/parameterdescriptions and /camera/parameterupdates. Am I missing something?
I use Gazebo11 with ROS Noetic on Linux Mint 20 (Ulyana).
Thanks in advance!
Asked by Lucas_bmp on 2021-12-17 01:16:31 UTC
Comments