Identical Message sent to topic from different publishers not received by subscriber depending on origin.

asked 2018-12-11 10:10:15 -0500

LukeAI gravatar image

updated 2018-12-12 07:17:08 -0500

I am using Autoware and trying to write a node, /image_benchmarker that loads images, converts them into sensor_msgs::Image and then sends them as messages to /image_raw, to which /vision_darknet_detect is subscribed. I am getting no output at all from /vision_darknet_detect when I run player.py but if I run the Autoware package, /kitti_player with the same input image I do get a result. Having inspected the messages passing through the /image_raw topic - I've found that the image messages produced by /kitti_player and my /image_benchmarker are identical byte for byte. There appear to be no other connections between kitti_player and /vision_darknet_detect. Having edited /vision_darknet_detect to print to screen whenever the callback for /image_raw messages is called I have found that when kitti_player sends the image to /image_raw - /vision_darknet_detect recieves it but when player.py sends an identical message to the same topic, it does not.

I find this very confusing as I thought that ROS nodes were origin-agnostic regarding their topic subscriptions. I wrote another node, listener.py that also subscribes to /image_raw and receives, decodes and displays the image from both origins as expected.

Any guidance in this issue would be very much appreciated! (Autoware, Kinetic, ROS1, Ubuntu 16.04)

rqt-graph (player.py is /image_benchmarker below) image description

The image: C:\fakepath\0000000002.png

edit retag flag offensive close merge delete

Comments

Could you please attach your image directly to your question? I've given you sufficient karma for that.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-11 14:48:34 -0500 )edit

I have done so, and added some more information. thanks for your response

LukeAI gravatar image LukeAI  ( 2018-12-12 03:49:49 -0500 )edit

I was actually referring to your rqt_graph screenshot.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-12 04:34:17 -0500 )edit

ok, added!

LukeAI gravatar image LukeAI  ( 2018-12-12 04:53:58 -0500 )edit

Are all the nodes running on the same machine? Can they all ping each other based on their ROS_HOSTNAME or ROS_IP (whichever is set)?

chris-smith gravatar image chris-smith  ( 2018-12-12 08:33:17 -0500 )edit

Yes, they are all running on the same machine and all respond to rosnode ping --all

LukeAI gravatar image LukeAI  ( 2018-12-12 09:33:26 -0500 )edit