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

How can I set the image_transport parameter for image_view in a launch file?

asked 2017-07-13 12:40:19 -0500 gravatar image

updated 2017-07-13 16:16:23 -0500

I am able to set the parameter 'image_transport' using rosrun as shown below. However I am not able to set this parameter in my launch file.

This line works:

$ rosrun image_view image_view image:=/axis/image_raw _image_transport:=compressed
[ INFO] [1499966521.473123463]: Using transport "compressed"

Here is my launch file named "view_camera.launch":


    <env name="ROS_MASTER_URI" value="http://10.100.XXXXXXXXX" />
    <env name="ROS_HOSTNAME" value="XXXXXXXXX" />

    <node name="image_view" 
          output="screen" >
      <param name="image_transport" value="compressed" />
      <remap from="image" to="/axis/image_raw" />           


And here is what happens when I launch it:

   $ roslaunch ttu_camera view_camera.launch
... logging to /XXXXXXXXXXXXX/log/4c91aabc-67f1-11e7-b684-d4bed98e4239/roslaunch-robotlab-t1600-16415.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://XXXXXXXXXXXX/


 * /image_view/image_transport: compressed
 * /rosdistro: indigo
 * /rosversion: 1.11.21

    image_view (image_view/image_view)

auto-starting new master
process[master]: started with pid [16430]

setting /run_id to 4c91aabc-67f1-11e7-b684-d4bed98e4239
process[rosout-1]: started with pid [16443]
started core service [/rosout]
process[image_view-2]: started with pid [16446]
[ INFO] [1499967173.448653978]: Using transport "raw"

To me it appears that the parameter is set but is ignored. Is this a bug or am I doing something wrong?

Thank You.

edit retag flag offensive close merge delete


Does the publisher of that image support image_transport?

Ed Venator gravatar image Ed Venator  ( 2017-07-13 21:27:23 -0500 )edit

I assumed it did. Does it not come standard with indigo-all ? Thank you for your response. I will be back in the lab tomorrow. gravatar image  ( 2017-07-14 00:25:09 -0500 )edit

The Publisher is 'axis_camera'. You have given me another useful hint. Thank You, Tristan gravatar image  ( 2017-07-14 00:35:38 -0500 )edit

Ok, I have somewhat figured out my issue. I am not sure why but the node 'find_object_2d' was causing the problem. I had to uninstall it with apt-get remove and now my issue is gone.

Thank you for your help! gravatar image  ( 2017-07-14 11:18:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-14 11:30:26 -0500 gravatar image

There is a conflict with 'find_object_2d' I believe. Uninstall it with apt-get remove.

edit flag offensive delete link more

Question Tools



Asked: 2017-07-13 12:40:19 -0500

Seen: 2,446 times

Last updated: Jul 14 '17