If you have video/image file on your disk and you want to publish it without coding, you can use the following nodes:
Publishing Images
Here are some examples to publish an image:
1 |
rosrun image_publisher image_publisher <path_to_image_file> |
And more Advanced launch file:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<!-- Example of run: roslaunch image_publisher.launch image_file:=image.png --> <launch> <arg name="image_file" default="/opt/ros/kinetic/share/turtlesim/images/kinetic.png" /> <node pkg="image_publisher" type="image_publisher" name="image_publisher" args="$(arg image_file)"> <param name="frame_id" value="camera_frame" /> <param name="publish_rate" value="1" /> <param name="camera_info_url" value="file:///$(env HOME)/.ros/camera_info/camera.yaml" /> </node> </launch> |