Closed ehvenimunis closed 3 years ago
Hi Salih,
Are you asking if the package computes the heading of the robot to point to the next waypoint?
This package only returns a vector of waypoints. But you can compute the direction of the connecting segment quite easily. Let's assume std::vector<Eigen::Vector3d> waypoints
is the vector of waypoints.
for (size_t i = 0; i < waypoints.size() - 1; ++i) {
const Eigen::Vector3d direction = waypoints[i + 1] - waypoints[i];
const double heading = std::atan2(direction.y(), direction.x());
}
I hope that answers your question.
Yes, I asked if the package calculates the robot's direction to point to the next waypoint. I got the solution with a similar line of code.
Thanks @rikba
Hello,
When I get to one point, I want it to look at the other point. Is there anything in your work made for this?
Thanks, Salih.