dbc / side_x_side_stereo

ROS node to split concatenated side-by-side stereo image into left/right image pair.
MIT License
4 stars 9 forks source link

camera_info_topic cannot be set #2

Open Aikhjarto opened 3 years ago

Aikhjarto commented 3 years ago

Hi!

I have a node publishing camera data in /cam1/camera_info and /cam1/image/raw as side-by-side stereo image. I will have multiple cameras so I set the topic names tor side_x_side_stereo_node accordingly:

rosrun side_x_side_stereo side_x_side_stereo_node \
_input_image_topic:=/cam1/image_raw \
_left_output_image_topic:=/cam1/left/image_raw \
_right_output_image_topic:=/cam1/right/image_raw \
_left_camera_info_topic:=/cam1/left/camera_info \
_right_camera_info_topic:=/cam1/right/camera_info

However, the published topics look like this:

/cam1/camera_info
/cam1/image_raw
/cam1/image_raw/compressed
/cam1/image_raw/compressed/parameter_descriptions
/cam1/image_raw/compressed/parameter_updates
/cam1/image_raw/compressedDepth
/cam1/image_raw/compressedDepth/parameter_descriptions
/cam1/image_raw/compressedDepth/parameter_updates
/cam1/image_raw/theora
/cam1/image_raw/theora/parameter_descriptions
/cam1/image_raw/theora/parameter_updates
/cam1/left/image_raw
/cam1/left/image_raw/compressed
/cam1/left/image_raw/compressed/parameter_descriptions
/cam1/left/image_raw/compressed/parameter_updates
/cam1/left/image_raw/compressedDepth
/cam1/left/image_raw/compressedDepth/parameter_descriptions
/cam1/left/image_raw/compressedDepth/parameter_updates
/cam1/left/image_raw/theora
/cam1/left/image_raw/theora/parameter_descriptions
/cam1/left/image_raw/theora/parameter_updates
/cam1/right/image_raw
/cam1/right/image_raw/compressed
/cam1/right/image_raw/compressed/parameter_descriptions
/cam1/right/image_raw/compressed/parameter_updates
/cam1/right/image_raw/compressedDepth
/cam1/right/image_raw/compressedDepth/parameter_descriptions
/cam1/right/image_raw/compressedDepth/parameter_updates
/cam1/right/image_raw/theora
/cam1/right/image_raw/theora/parameter_descriptions
/cam1/right/image_raw/theora/parameter_updates
/rosout
/rosout_agg
/sxs_stereo/left/camera_info
/sxs_stereo/right/camera_info

Note, that the camera_info is published under /sxs_stereo/left/camera_info and /sxs_stereo/right/camera_info, thus ignoring the parameters _left_camera_info_topic and _right_camera_info_topic

Any idea how to fix that?

dbc commented 3 years ago

Sorry life has been busy and I did not have time to look into your issue. I see that you found a very clean solution and I just now merged your changes. Thank you!

Aikhjarto commented 3 years ago

There seems to be a bit of confusion, as my pull request #3 did not resolve this issue. My pull request did solve another issue, where the frame_id was not set correctly. For the missing frame_id problem, I did not bother to make create an issue, since I could solve it myself.

The problem mentioned in this issue still persists.

dbc commented 3 years ago

Sorry. Bad assumption on my part. Re-opening. Thanks!