LCAS / limo_ros2

limo ros2 packages
2 stars 9 forks source link

[BUG]: Framerate of gazebo camera is 1Hz #23

Open marc-hanheide opened 6 months ago

marc-hanheide commented 6 months ago

Description of the bug

The framerate is 1Hz only!

I'm surprised by this comment: https://github.com/LCAS/limo_ros2/blob/10a964ab864ba3af578f375e68b0e30ed25c36eb/src/limo_description/urdf/limo_gazebo.gazebo#L91-L93

This does not appear to be working. Any of you @LeonardoGuevara, @jondave , @pulver22 encountered this as well?

Steps To Reproduce

run simulation and run ros2 topic hz /limo/depth_camera_link/image_raw

Additional Information

No response

jondave commented 6 months ago

I assume from the comment it takes the frame rate from the <sensor> tag above this where the rate is 30 Hz <update_rate>30.0</update_rate>?

https://github.com/LCAS/limo_ros2/blob/10a964ab864ba3af578f375e68b0e30ed25c36eb/src/limo_description/urdf/limo_gazebo.gazebo#L74

marc-hanheide commented 6 months ago

I assume from the comment it takes the frame rate from the <sensor> tag above this where the rate is 30 Hz <update_rate>30.0</update_rate>?

https://github.com/LCAS/limo_ros2/blob/10a964ab864ba3af578f375e68b0e30ed25c36eb/src/limo_description/urdf/limo_gazebo.gazebo#L74

Well... that appears to be the theory. But the frequency I measure is 1Hz (or rather 0.9997 Hz to be precise). Is it 30 for you?

LeonardoGuevara commented 6 months ago

I also encounter that issue. For some reason when I run ">> ros2 topic hz /limo/depth_camera_link/image_raw" nothing is printed, but I can see the image is being published in rviz, and also can see that the messages are received more or less every second (~1Hz). I am not using GPU image, could be that the reason?

marc-hanheide commented 6 months ago

no,. nothing to do with GPU. If you check the Ros parameter you seem it's set to 1Hz and when I set it to 30.it publishes at 30. Just a configuration issue.