ethz-asl / nbvplanner

A real-time capable exploration and inspection path planner (next best view planning)
342 stars 120 forks source link

Error running demo launch file #30

Open Krada-Jhin opened 3 years ago

Krada-Jhin commented 3 years ago

hey Im glad to see your work , in my computer there is some trouble .

"navigation" passed to lookupTransform argument target_frame does not exist.

Lookup would require extrapolation at time 0.250000000, but only time 0.310000000 is in the buffer, when looking up transform from frame [world] to frame [navigation]

QQ截图20201010175653 QQ截图20201010175359

I wounder is there any package I missed? so I come to ask if there are same issue. thanks

Zyhlibrary commented 2 years ago

Maybe i found the reason for this error, you can correct this error by adding function waitForTransform( ,ros::Duration(3.0)); before .lookupTransform(*) int the project.

emilcw commented 1 year ago

@Zyhlibrary this solution worked for me, thanks!

For clarification on what to do: Go into: catkin_ws/src/nbvplanner/nbvplanner/src/rrt.cpp and do Ctrl + F and simply search for .lookupTransform. You should find it in 4 places. Right above each .lookupTransform in the first 3 cases, simply add the line listener.waitForTransform(params_.navigationFrame_, pose.header.frame_id, pose.header.stamp, ros::Duration(3.0)); and it the last case add listener.waitForTransform(targetFrame, params_.navigationFrame_, ros::Time(0), ros::Duration(3.0));

Then head over to: catkin_ws/src/nbvplanner/prune_pointcloud/src/prune.cc Find the .lookupTransform as described above and add the line tf_listener_.waitForTransform(pointcloudIn->header.frame_id, *it, time_to_lookup, ros::Duration(3.0)); above it.

Then run catkin build and try to launch the program again.