image_transport republish via LaunchDescription and remapping
Hi there,
How can I start image_transport republish via Launch file?
I tried the following:
import launch
import launch.actions
import launch.substitutions
import launch_ros.actions
def generate_launch_description():
return launch.LaunchDescription([
launch_ros.actions.Node(package='image_tools', node_executable='cam2image', output='screen', node_name='cam2image'),
launch_ros.actions.Node(package='image_transport', node_executable='republish', arguments=[
'raw',
'--ros-args',
'-r in:=image',
'raw',
'-r out:=/camera/image_raw'
],
output='screen', node_name='republish')
])
But from the log I can see that no images are republished:
[INFO] [launch]: All log files can be found below /root/.ros/log/2020-12-03-15-29-26-520456-db7019ece524-5304
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [cam2image-1]: process started with pid [5315]
[INFO] [republish-2]: process started with pid [5316]
[cam2image-1] [INFO] [cam2image]: Publishing image #1
[cam2image-1] [INFO] [cam2image]: Publishing image #2
[cam2image-1] [INFO] [cam2image]: Publishing image #3
[cam2image-1] [INFO] [cam2image]: Publishing image #4
[cam2image-1] [INFO] [cam2image]: Publishing image #5
[cam2image-1] [INFO] [cam2image]: Publishing image #6
[cam2image-1] [INFO] [cam2image]: Publishing image #7
[cam2image-1] [INFO] [cam2image]: Publishing image #8
[cam2image-1] [INFO] [cam2image]: Publishing image #9
What is wrong with my setup? Any idea?
Thanks!
Cheers, Anthares