Open stu00608 opened 2 years ago
I would say that tf2::TimePointZero
is not the "correct" either. TEB will plan the path with respect to its knowledge of the world at a given time. In my opinion, it would make more sense to use the timestamp from the scan message. I say this because, at the end of the day, you are planning to avoid obstacles and your best guess of their poses comes from your previous measurement.
I would say that
tf2::TimePointZero
is not the "correct" either. TEB will plan the path with respect to its knowledge of the world at a given time. In my opinion, it would make more sense to use the timestamp from the scan message. I say this because, at the end of the day, you are planning to avoid obstacles and your best guess of their poses comes from your previous measurement.
I agree with you, timestamp from scan message should not affect by behavior tree.
Also, I wanna know if the version that I modified whether use timeFromSec(0)
or timestamp in latest scan message, is it gonna break the other parts inside TEB?
I think this should be fixed eventually with humble update. Since from nav2 humble release, they do have more example behavior trees that will cause this issue.
Thank you!
Also, I wanna know if the version that I modified whether use
timeFromSec(0)
or timestamp in latest scan message, is it gonna break the other parts inside TEB?
Not that I can think of right now since the overall behavior depends a lot on all the timestamps in your tf-tree.
By using the zero stamp you are allowing that particular lookup to consider the latest tfs in the tree, regardless of how old they are. The possible outcomes of doing so will be platform-specific.
It seems like ROS1 TEB uses ros::Time()
instead of plan_pose.header.stamp
in ROS2.
https://github.com/rst-tu-dortmund/teb_local_planner/blob/0e839074c3407ff9ee2206a49567a20bd49fd8cc/src/teb_local_planner_ros.cpp#L718
How about changing it similar to ROS1 method?
There is a comment block seems doing the same thing in ros2_master
branch.
Is there any reason to use plan_pose.header.stamp
in newer version?
This seems to be ported to crystal long time ago from this PR by @vinnamkim
Hey @vinnamkim , if possible can you explain your decision for changing the lookup time stamp? Thanks
Problem
navigate_w_replanning_only_if_path_becomes_invalid.xml
, the global plan only publish once, as long as the path is valid, it won't triggercomputePathToPose
.teb_local_planner_ros.cpp
, lookup transform will take the stamp from global path. teb_local_planner_ros.cpp:724tf2::timeFromSec(0)
(The second argument of lookupTransform)Conclusion
Looking forwarfd to your reply, thanks!