0
$\begingroup$

I have set up 2 Monocular Cameras as a stereo camera in ROS2. I successfully published the 2 rectified and calibrated images through the following formats:

/left/camera_info
/left/image_rect
/parameter_events
/right/camera_info
/right/image_rect
/rosout

AND

/parameter_events
/rosout
/stereo/left/camera_info
/stereo/left/image_rect
/stereo/right/camera_info
/stereo/right/image_rect

Then, I tried to make a disparity image by running this:

ros2 run stereo_image_proc disparity_node --ros-args --params-file disparity-params.yaml

NOTE: Here, I didn't know what to use for the disparity-params.yaml so I just made a blank file called that.

Then, I ran ros2 topic list and I saw the /disparity topic. To actually see the disparity, I ran ros2 run image_view disparity_view --ros-args --remap image:=/disparity but this never displayed anything, not even a blank window. There was also no command-line output.

Also, I tried using stereo_view from the image_view package to see if that works. I this:

ros2 run image_view stereo_view --ros-args --remap stereo:=stereo --ros-args --remap image:=image_rect

This gives me the following error:

terminate called after throwing an instance of 'rclcpp::exceptions::InvalidTopicNameError'
  what():  Invalid topic name: topic name must not contain repeated '/':
  '/stereo/left//image'

Is there anything I can do to fix this problem? Also, let me know if there is any other information you need.

Specs:

  • Ubuntu 20.04 64 bit VM
  • ROS 2 Foxy
  • Monocular USB Webcams
$\endgroup$
3
  • 1
    $\begingroup$ When I look at [the documentation](wiki.ros.org/stereo_image_proc), it looks like there are defaults for the parameters, so do you really need a blank file? What happens if you omit --params-file disparity-params.yaml from the command? If you follow along with a tutorial like this, at which step exactly does it fail? $\endgroup$
    – Chuck
    Jun 1 at 19:06
  • $\begingroup$ It doesn't fail, but a disparity never shows up. When I run image_view to see and tune the disparity it never opens a window or I get a black box and if I try to use stereo_view, then I get the error above. So in the tutorial, I fail when it says, "Now, you can view the DisparityImage using the disparity_view node: ros2 run image_view disparity_view --ros-args --remap image:=/disparity"" $\endgroup$ Jun 1 at 19:31
  • $\begingroup$ The tutorial seems to run you through setting up the full stereo pipeline. If you need more help resolving your issue, please edit your question to provide enough information to reproduce your setup so that we can try to help you. An MCVE would be very helpful: robotics.meta.stackexchange.com/questions/1302/… $\endgroup$
    – Tully
    Oct 6 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.