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

Empty connection header topic

asked 2014-12-29 19:07:27 -0500

updated 2014-12-30 13:41:26 -0500

ahendrix gravatar image

I am trying to use a driver that reads the name of the incoming topic from the connection header. When I publish data from a C++ node, it is always empty but when I use rostopic pub it works just fine. Is there a way to ensure the connection header is populated?

Thanks,

-Tony

Edit for additional information

OS: Ubuntu 14.04

ROS:indigo 1.11.9

roscpp: 1.11.9-0trusty-20141029-0127-+0000

roscpp_core: 0.5.4-0trusty-20140724-0053-+0000

The subscriber is in C++ and is here

Works with python. Here is the C++ node

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-06-04 15:31:07 -0500

Was recently fixed in this commit.

edit flag offensive delete link more
1

answered 2014-12-30 03:00:52 -0500

ahendrix gravatar image

updated 2014-12-30 03:01:46 -0500

On the surface, this sounds like a bug in the roscpp publisher, but since this feature has existed in ROS for many years, that seems unlikely.

We're going to need quite a bit more information to debug this properly. You should edit your question to include:

  • The version of ROS and the OS that you're using
  • Which language the subscriber is written in
  • The versions of the roscpp and roscpp_core packages that you're using
  • The code for your C++ publisher which is giving you trouble

You may want to try writing the same publisher in python, to try to narrow down whether this is a difference between the python and C++ publishers, or if it's something wrong with the subscriber.

You may also want to try to reproduce this with the talker node from roscpp_tutorials and rospy_tutorials - those are "known good" nodes with well-defined behavior. If you can write a simple subscriber which reproduces this with the talker nodes, it should be easy to submit it as a bug report.

edit flag offensive delete link more

Comments

Thanks Austin, I added the additional information.

tonybaltovski gravatar image tonybaltovski  ( 2014-12-30 03:47:27 -0500 )edit

I don't see anything obviously wrong with any of that code. You should probably try to boil this down to a small subscriber program which reproduces the issue, and submit it as a bug report.

ahendrix gravatar image ahendrix  ( 2014-12-31 00:05:52 -0500 )edit

Really though, the driver should probably be using an extra callback parameter for the controller name, instead of trying to extract the controller name from the topic name. This parameter can be passed by using boost::bind()

ahendrix gravatar image ahendrix  ( 2014-12-31 00:10:24 -0500 )edit

Odd that it works for python. It seems like it should be able to extract the name from the topic. Do you mean that the callback's message should have a parameter containing the name of the controller?

tonybaltovski gravatar image tonybaltovski  ( 2015-01-02 14:06:59 -0500 )edit

Should the issue be under ros_comm or roscpp_core? I'll just stick to python for now since it works but I'd like to get this fixed. Thanks for your help.

tonybaltovski gravatar image tonybaltovski  ( 2015-01-02 14:07:05 -0500 )edit

roscpp is the public API, and it's part of ros_comm, so the issue should probably be filed there. It's the same set of developers on both repositories anyway.

ahendrix gravatar image ahendrix  ( 2015-01-03 00:50:29 -0500 )edit

Will do, thanks!

tonybaltovski gravatar image tonybaltovski  ( 2015-01-03 15:15:17 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-12-29 19:07:27 -0500

Seen: 792 times

Last updated: Jun 04 '15