Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings from inner TF2 not wrapped by ROS logging when used via TF. #22

Open
hershwg opened this issue Jul 23, 2013 · 3 comments
Open
Assignees
Labels

Comments

@hershwg
Copy link
Member

hershwg commented Jul 23, 2013

The first line in the log here is shown for reference, it is what a normal ROS log message looks like. The following lines come from tf2/src/buffer_core.cpp. In that file you can see it is using something called "logWarn()", but apparently this is not connected to the normal ROS logging when used via the older TF API.

[INFO] [WallTime: 1374596992.623081] No target received yet.
Warning: Invalid argument passed to canTransform argument target_frame in tf2 frame_ids cannot be empty
         at line 122 in /tmp/buildd/ros-hydro-tf2-0.4.5-0precise-20130721-0218/src/buffer_core.cpp
@hershwg
Copy link
Member Author

hershwg commented Jul 23, 2013

This is important to me because rosconsole log messages can be made to tell you what node is emitting the error message. Since everything in the whole system uses TF (and thus now TF2), I have no idea where this error is coming from.

@tfoote
Copy link
Member

tfoote commented Aug 3, 2013

I think the fix is to add rosconsole_bridge as a dependency of tf2_ros. I'll work up a test case shortly.

@tfoote
Copy link
Member

tfoote commented Aug 17, 2013

I can reproduce the problem with this simple program, depending on tf. lookupTransform goes out over ros but canTransform's warnings do no.

#include <ros/ros.h>
#include <tf/transform_listener.h>

int main(int argc, char** argv){
  ros::init(argc, argv, "my_tf_listener");
  ros::NodeHandle node;
  tf::TransformListener listener;
  ros::Rate rate(10.0);
  while (node.ok()){
    tf::StampedTransform transform;
  try{
    listener.canTransform("", "other", ros::Time(0));
    listener.lookupTransform("", "/turtle1", ros::Time(0), transform);
  }
  catch (tf::TransformException ex){
    ROS_ERROR("%s",ex.what());
  }
  rate.sleep();
  }
  return 0;
}

From which I get this:

Error:   Invalid argument passed to canTransform argument target_frame in tf2 frame_ids cannot be empty
         at line 122 in /home/tfoote/work/geometry_experimental/src/geometry_experimental/tf2/src/buffer_core.cpp
[ERROR] [1376692168.915507885]: Invalid argument passed to lookupTransform argument target_frame in tf2 frame_ids cannot be empty

Showing rosconsole working properly for the

I've explicitly changed libtf2.so to link against rosconsole_bridge.so but I'm still not getting the output on rosout. @isucan any suggestions?

@ghost ghost assigned tfoote Aug 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants