Robotics StackExchange | Archived questions

how to set image_transport parameter for /../compressed and /../compressedDepth topics

I am running Ros Kinetic on Ubuntu 16.04. I recorded a bag from a kinect 2 that only has ir and depth compressed, i.e.

/k2/ir/image/compressed

/k2/depth/image/compressedDepth

I am able to subscribe using image transport to one of them by setting imagetransport:=compressed or compressedDepth but I am not able to subscribe to both of them at the same time.

I tried to subscribe directly without using it but it does not work. I also tried to rename the topic but could not manage to make it work anyway.

Asked by Vendra on 2017-09-25 10:13:38 UTC

Comments

if you open two terminals and echo each topic in each terminal, are the messages shown?

For example, on terminal 1 you run:

rostopic echo /k2/ir/image/compressed

And on terminal 2 you run:

rostopic echo /k2/depth/image/compressedDepth

Both terminals prints the messages?

Asked by Ruben Alves on 2017-09-29 15:12:32 UTC

Yes I can, I think the bag is fine. The problem is I can't set the _image_transport parameter to both "compressed" and "compressedDepth" at the same time when launching my node, i.e. $ rosrun my_package my_node _image_transport:=compressed I can subscribe to the IR but not the depth.

Asked by Vendra on 2017-10-02 02:42:38 UTC

Answers