Pointcloud is published at 2Hz when using two 3D cameras gazebo_ros_depth_camera

asked 2019-01-13 13:14:41 -0500

zoid gravatar image

updated 2019-01-15 11:45:28 -0500

Carlos Agüero gravatar image

Hello,

I have a Gazebo simulation using ROS and in my mobile robot I am using two 3D cameras described by a gazebo_ros_depth_camera plugin (https://github.com/ros-simulation/gaz...). I have setup the plugin as follows:

<plugin name="camera3D_controller" filename="libgazebo_ros_depth_camera.so">
            <robotNamespace>/</robotNamespace>
                <alwaysOn>true</alwaysOn>
            <!-- Keep this zero, update_rate will control the frame rate -->
            <updateRate>200.0</updateRate>
            <cameraName>camera3D_1</cameraName>
             <imageTopicName>image_raw</imageTopicName>
            <cameraInfoTopicName>camera_info</cameraInfoTopicName>
            <depthImageTopicName>depth/image_raw</depthImageTopicName>
            <!-- neither camera info is getting published, frame_id is empty
                in points and both image headers -->
             <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
            <pointCloudTopicName>points</pointCloudTopicName>
            <frameName>camera3D_1_link</frameName>
            <!-- TODO(lucasw) is this used by depth camera at all? -->
             <hackBaseline>0.07</hackBaseline>
            <pointCloudCutoff>0.001</pointCloudCutoff>
            <distortionK1>0.0</distortionK1>
            <distortionK2>0.0</distortionK2>
            <distortionK3>0.0</distortionK3>
            <distortionT1>0.0</distortionT1>
            <distortionT2>0.0</distortionT2>
  </plugin>

Although I have the cameras setup at 200 Hz update frame rate, the publishing pointcloud rate (e.g. rostopic hz /camera3D_2/points) is between 4 to 7 Hz. Also, when I launch rviz, the publishing rate drops to 2 Hz. Do you think this is relative to some short of Gazebo physics update frequency setup, or maybe is relevant to my computer hardware resources? Any Ideas?

Thank you!

edit retag flag offensive close merge delete