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

ROSJava messages missing "callerid" field

asked 2011-12-05 02:02:44 -0500

shawn3 gravatar image

updated 2011-12-06 00:49:31 -0500

I've been running rosjava nodes on my PC and connecting them to rospy and roscpp nodes on the same PC. I can get publish and subscribe of basic messages to work fine. However, if I try to publish tf's or use actionlib_java, I get errors revolving around missing callerids.

The following is an example of this issue using the actionlib_java sample Fibonacci server and the actionlib_tutorial sample (python) Fibonacci client:

I got the ROSJava example Actionlib server (/org.ros.actionlib_java/src/tutorials/java/org/ros/actionlib/example/ to connect to the python actionlib client (ros/common_tutorials/actionlib_tutorials/simple_action_clients/ provided in ROS electric, but I get callerid errors.

To get this to run, I first noticed that running failed with

java.lang.NullPointerException: Node name not specified.
        at org.ros.actionlib.example.RunFibonacciSimpleActionServer.main(
        at org.ros.actionlib.example.RunFibonacciSimpleActionServer.main(

So, on line 28 of, I added a name to the node


Then it runs, but does not connect. If I look at rxgraph (with all topics turned on), I see that where the rospy client is looking for the action messages (status, result, feedback, etc) in the /fibonacci namespace, the ROSJava server is broadcasting in the global namespace (i.e., without a namespace). To get these to connect, I remapped the rospy client's topics into the global namespace using the following launch file:

  <node name="fibonacci_client" pkg="actionlib_tutorials" type="">
    <remap from="/fibonacci/goal" to="/goal" />
    <remap from="/fibonacci/cancel" to="/cancel" />
    <remap from="/fibonacci/feedback" to="/feedback" />
    <remap from="/fibonacci/status" to="/status" />
    <remap from="/fibonacci/result" to="/result" />

Now the nodes connect, but the rospy node crashes with the following error:

process[fibonacci_client-2]: started with pid [11301]
Traceback (most recent call last):
  File "/other/ros/common_tutorials/actionlib_tutorials/simple_action_clients/", line 66, in <module>
    result = fibonacci_client()
  File "/other/ros/common_tutorials/actionlib_tutorials/simple_action_clients/", line 47, in fibonacci_client
  File "/other/ros/common/actionlib/src/actionlib/", line 68, in wait_for_server
    return self.action_client.wait_for_server(timeout)
  File "/other/ros/common/actionlib/src/actionlib/", line 577, in wait_for_server
    server_id = self.last_status_msg._connection_header['callerid']
KeyError: 'callerid'
[fibonacci_client-2] process has died [pid 11301, exit code 1].

It seems to be missing the "callerid" attribute.

As an aside, I've seen the same problem when I publish tf's from a rosjava node and receive them with a roscpp node. In particular, libtf within the roscpp node gets angry that the callerid is missing from the tf's it receives. If I "roswtf" the setup, I'll see that the rosjava nodes appear as two different nodes: one with the correct node name (e.g., tf_publisher) but not connected to any other nodes and one ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-12-06 07:31:55 -0500

I had the "missing callerid" warning issued in c++ when I instantiated tfMessages from a bagfile and published it (not via the tf broadcaster but a regular publisher). Since the warnings were quite annoying I tried to fix it, but couldn't find much information except this.

For roscpp I fixed this not really quick but hopefully not too dirty by manually setting msg->__connection_header["caller_id"] = "name_of_my_node", but I am not sure whether this is a good way to go.

edit flag offensive delete link more


Thanks for the info. It doesn't seem that ROSJava gives me access to this field in the outgoing messages (on the publication side). I could try catching messages on the subscriber side and fixing them up, but that's only a bandaid.
shawn3 gravatar image shawn3  ( 2011-12-06 12:21:10 -0500 )edit
Optimally, you could trace down the place in the publisher code of rosjava, fix it there and submit a patch :-)
Felix Endres gravatar image Felix Endres  ( 2011-12-06 19:21:50 -0500 )edit
tfoote gravatar image tfoote  ( 2011-12-12 06:34:30 -0500 )edit

answered 2012-01-05 04:04:19 -0500

damonkohler gravatar image

updated 2012-01-05 04:04:39 -0500

This should be fixed at head.

edit flag offensive delete link more

Question Tools


Asked: 2011-12-05 02:02:44 -0500

Seen: 475 times

Last updated: Jan 05 '12