How can I set the image_transport parameter for image_view in a launch file?
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.
Does the publisher of that image support
image_transport
?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.
The Publisher is 'axis_camera'. You have given me another useful hint. Thank You, Tristan
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!