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
/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.
- Ubuntu 20.04 64 bit VM
- ROS 2 Foxy
- Monocular USB Webcams