Robotics StackExchange | Archived questions

How to add camera_info to run depthimage_to_laserscan?

I recorded the depth topic from my intel d435 camera to a rosbag whilst running my robot outside. I now wanted to use the depthimagetolaserscan 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 camerainfo 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/imagerectraw' and '/d400/depth/camerainfo' 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?

Asked by jorgemia on 2020-07-14 04:48:14 UTC

Comments

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

Asked by Choco93 on 2020-07-14 06:14:43 UTC

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

Asked by jorgemia on 2020-07-14 07:17:53 UTC

add --clock to your rosbag play as well

Asked by Choco93 on 2020-07-14 07:20:21 UTC

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

Asked by jorgemia on 2020-07-14 07:37:55 UTC

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

Asked by Choco93 on 2020-07-14 08:37:11 UTC

Answers