ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to set a node to subscribe to a specific topic?

asked 2022-10-31 00:17:15 -0500

bc524 gravatar image

I have a gazebo simulation setup with multiple stereo camera. The stereo camera has their topic set to publish in the following format:


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)" />
      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

How can I set which stereo camera does the edge detection get its image from? Currently it gets it only from the stereo_1/left/image_raw.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-10-31 02:38:11 -0500

pmuthu2s gravatar image

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

edit flag offensive delete link more


thanks. will try.

bc524 gravatar image bc524  ( 2022-11-03 21:41:27 -0500 )edit

Question Tools



Asked: 2022-10-31 00:17:15 -0500

Seen: 47 times

Last updated: Oct 31 '22