Poitcloud is published at 2Hz when using 2 3D cameras gazebo_ros_depth_camera

asked 2019-01-14 11:43:38 -0600

Zoid gravatar image


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">
            <!-- Keep this zero, update_rate will control the frame rate -->
            <!-- neither camera info is getting published, frame_id is empty
                in points and both image headers -->
            <!-- TODO(lucasw) is this used by depth camera at all? -->

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


The depth camera plugin is computationally expensive (in my situations, the depth camera instances takes more CPU than the physics and rendering engines combined) so its no shock that its inconsistent or slow in "real-time", though it may be correct in the scaled time gazebo is working in...

stevemacenski gravatar image stevemacenski  ( 2019-01-14 12:52:11 -0600 )edit

Try on a more powerful computer or server, write your own plugin to give you only the things you need, etc

stevemacenski gravatar image stevemacenski  ( 2019-01-14 12:52:43 -0600 )edit

Ok! Thank you for your answer. It makes sense. :)

Zoid gravatar image Zoid  ( 2019-01-15 02:36:04 -0600 )edit