atenpas / handle_detector

ROS package to localize handles in 3D point clouds
BSD 2-Clause "Simplified" License
25 stars 6 forks source link

"base" passed to lookupTransform argument target_frame does not exist? #7

Open yaozr opened 7 years ago

yaozr commented 7 years ago

Hi: I have run the test file pcd without any problem.

when I use this with Xtion pro live using the command 1.Start roscore: $ roscore. 2.Start openni2_launch: $ roslaunch openni2_launch openni2.launch. 3.Run the handle localization: $ roslaunch handle_detector localization_sensor.launch. I run into this error: .... terminate called after throwing an instance of 'tf2::LookupException' what(): "base" passed to lookupTransform argument target_frame does not exist.

is it because I use xtion pro live instead of the kinect, so I need to change the lines in localization.cpp lines: const std::string RANGE_SENSOR_FRAME = "camera_rgb_optical_frame"; const std::string RANGE_SENSOR_TOPIC = "/camera/depth_registered/points"; but the "base" error is still there

Just notice this might be very similar to the closed issue "terminate called after throwing an instance of 'tf2::LookupException' ", we are checking if we could fix it as the closed one, it might be due to our robot "base" frame is not seen by sensor frame somehow...

hitcww commented 6 years ago

I meet the same problem!

hitcww commented 6 years ago

how to solve the problem?

atenpas commented 6 years ago

The code attempts to transform the points from the camera frame to the base frame of the robot. The function Affordances->searchAffordances would have to be rewritten such that it does not do this. However, I don't currently have the option to implement this for Hydro or Indigo. Let me know if you're interested in a version for Kinetic.

Maybe as a workaround, you could modify _https://github.com/atenpas/handle_detector/blob/master/src/localization.cpp_ such that it does not look up the transform and stores an identity transform in the variable _gtransform.

hitcww commented 6 years ago

my rosdistro: indigo, rosversion: 1.11.21,but I also have the "base" error. terminate called after throwing an instance of 'tf2::LookupException' what(): "base" passed to lookupTransform argument target_frame does not exist. [localization-1] process has died [pid 5077, exit code -6, cmd /home/wenwu/catkin_ws/devel/lib/handle_detector/handle_detector_localization name:=localization log:=/home/wenwu/.ros/log/21610322-c9aa-11e7-a0b3-2016d8814a03/localization-1.log]. log file: /home/wenwu/.ros/log/21610322-c9aa-11e7-a0b3-2016d8814a03/localization-1*.log

hitcww commented 6 years ago

my sensor is kinect V2, I hope you can help me, thank you very much!

atenpas commented 6 years ago

@hitcww Have you tried the workaround that I've suggested above?

lchop commented 6 years ago

Hello, Any update on this ? Best regards

shanpenghui commented 5 years ago

@hitcww Have you solved this problem?I also encounter the problem but i don't know how to solve it.

shanpenghui commented 5 years ago

The reason of the problem i guess is tf buffer needs some time to fill with the data.So,i try to add a delay when i start to lookupTransform, like ros::Duration(1.0).sleep(). It seem to work! Deference is https://answers.ros.org/question/164911/move_base-and-extrapolation-errors-into-the-future/ After that i think again , found that if add some print after lookupTransform, it already started to work although throw the ERROR argument does not exist.So maybe the error can ignore at the beginning.

michaelsimmons94 commented 5 years ago

Thanks! This worked for me too!