Remap inside a launch file vs remapping during rosbag play
Hi All,
Goal (more of getting to know tutorial): Trying to run this particular code http://wiki.ros.org/image_pipeline/Tutorials/Simple%20image%20processor on an image from a rosbag.
Instead of changing the topic name inside the code (obviously this works), I tried the remap option in a launch file, which I thought is the better way. Tried the following two launch scripts,
launch_file1:
<launch>
<node name="image_shrinker_node" pkg="image_shrinker" type="image_shrinker" output="screen">
<remap from="/ns/camera1/image_raw" to="/camera/image_raw"/>
</node>
</launch>
launch_file2:
<launch>
<remap from="/ns/camera1/image_raw" to="/camera/image_raw"/>
<node name="image_shrinker_node" pkg="image_shrinker" type="image_shrinker" output="screen">
</node>
</launch>
Neither seems to work. The only I could get this to work is remapping it during rosbag play as, rosbag play bag_file.bag /ns/camera1/image_raw:=/camera/image_raw
Can anyone help me figure out what went wrong in the launch file?
Thank you