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

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

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

thill@tntech.edu 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":

<launch>

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

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

</launch>

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/

SUMMARY
========

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

NODES
  /
    image_view (image_view/image_view)

auto-starting new master
process[master]: started with pid [16430]
ROS_MASTER_URI=http://localhost:11311

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

Comments

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.

thill@tntech.edu gravatar image thill@tntech.edu  ( 2017-07-14 00:25:09 -0500 )edit

The Publisher is 'axis_camera'. You have given me another useful hint. Thank You, Tristan

thill@tntech.edu gravatar image thill@tntech.edu  ( 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!

thill@tntech.edu gravatar image thill@tntech.edu  ( 2017-07-14 11:18:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

thill@tntech.edu 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

2 followers

Stats

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

Seen: 2,405 times

Last updated: Jul 14 '17