Can I change which topic usb_cam is publishing? [closed]
Can I change the topic which each node publishes? I'm using usb_cam with multiple nodes and each node will run in different devices, I need them to publish on different topics so the server can send them instructions individually.
Have you tried to remap the topics ?
oh, hello! thanks for commenting. Yes, I've tried to change the
<remap from="image" to="/usb_cam/image_raw"/>
to<remap from="image" to="/raspImages"/>
but it just throw a error on image_view, saying that it couldn't read from that topic, so the remap worked for changing what topic a node should subscribe but I don't know how to make it change a publisher's topic.Can you show the full launch file please ? There might be more remapping required.
<launch> <node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" > <param name="video_device" value="/dev/video0" /> <param name="image_width" value="640" /> <param name="image_height" value="480" /> <param name="pixel_format" value="yuyv" /> <param name="camera_frame_id" value="usb_cam" /> <param name="io_method" value="mmap"/> </node> <node name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen"> <remap from="image" to="/usb_cam/image_raw"/> <param name="autosize" value="true" /> </node> </launch>
from link text
I just switched the image_view remap. Which... thinking about it now, the image_view is just the visualization node, I think, it's supposed to not be able to subscribe to a different node that the node called usb_cam is publishing...but the problem remains.