How to add camera_info to run depthimage_to_laserscan?

asked 2020-07-14 04:48:14 -0500

jorgemia gravatar image

updated 2020-07-14 04:51:05 -0500

I recorded the depth topic from my intel d435 camera to a rosbag whilst running my robot outside. I now wanted to use the depthimage_to_laserscan node to see the laserscan that is generated from the rosbag file but I just realised I should have recorded the camera info topic as well.

Is there a way to feed the node the camera_info topic so that it publishes the laserscan correctly?

I tried to record the camera_info topic at home (in a different scenario) and played both rosbags at the same time to see if maybe that would work, however, I'm getting the following error: Topics '/d400/depth/image_rect_raw' and '/d400/depth/camera_info' do not appear to be synchronized. In the last 10s:. So, if I managed to sync them somehow could it possibly work? Or could I provide the camera info somehow?

edit retag flag offensive close merge delete

Comments

you can set use_sim_time to true and it should work after that.

Choco93 gravatar image Choco93  ( 2020-07-14 06:14:43 -0500 )edit

@Choco93 I tried but it seems the topics are still not synced. Is there anything else I need to do?

jorgemia gravatar image jorgemia  ( 2020-07-14 07:17:53 -0500 )edit

add --clock to your rosbag play as well

Choco93 gravatar image Choco93  ( 2020-07-14 07:20:21 -0500 )edit

@Choco93 yeah I did that as well but it seems the topics are still not synced.

jorgemia gravatar image jorgemia  ( 2020-07-14 07:37:55 -0500 )edit

just to make sure are you following this order? Running roscore, setting use_sim_time: true, playing bag with --clock

Choco93 gravatar image Choco93  ( 2020-07-14 08:37:11 -0500 )edit