Function dwb_core::getClosestPose
Defined in File trajectory_utils.hpp
Function Documentation
-
const geometry_msgs::msg::Pose2D &dwb_core::getClosestPose(const dwb_msgs::msg::Trajectory2D &trajectory, const double time_offset)
Helper function to find a pose in the trajectory with a particular time time_offset.
Linearly searches through the poses. Once the poses time_offset is greater than the desired time_offset, the search ends, since the poses have increasing time_offsets.
- Parameters:
trajectory – The trajectory to search
time_offset – The desired time_offset
- Returns:
reference to the pose that is closest to the particular time offset