How to set a node to subscribe to a specific topic?
I have a gazebo simulation setup with multiple stereo camera. The stereo camera has their topic set to publish in the following format:
stereo_1/left/image_raw
stereo_1/right/image_raw
stereo_2/left/image_raw
stereo_2/right/image_raw
I am using a package that calls upon the opencv_app edge detection node:
<node name="edge_detection" pkg="opencv_apps" type="edge_detection" output="$(arg stdout)" >
<remap from="image" to="$(arg camera_name)/left/$(arg image_topic)" />
<rosparam>
use_camera_info: False
debug_view: False
edge_type: 0
canny_threshold1: 100
canny_threshold2: 200
apertureSize: 3
apply_blur_pre: True
postBlurSize: 13
postBlurSigma: 3.2
apply_blur_post: False
L2gradient: False
</rosparam>
</node>
How can I set which stereo camera does the edge detection get its image from? Currently it gets it only from the stereo1/left/imageraw.
Asked by bc524 on 2022-10-31 00:17:15 UTC
Answers
According to the launch given in the repo of the open_cv apps, you need to use the image
argument during the launch, for setting the ros topic to which the image topic should be remapped to.
Hope this helps
Asked by pmuthu2s on 2022-10-31 02:38:11 UTC
Comments
thanks. will try.
Asked by bc524 on 2022-11-03 21:41:27 UTC
Comments