Skip to content
Snippets Groups Projects
Commit 7f6fc1b4 authored by armar-user's avatar armar-user
Browse files

TrajectoryFollowingController: if trajectory is empty: don't move

parent d2f4431d
No related branches found
No related tags found
1 merge request!25RT controller and simplification
......@@ -131,6 +131,14 @@ namespace armarx::navigation::traj_ctrl
{
ARMARX_CHECK_NOT_NULL(robot) << "Robot not available";
if (trajectory.points().empty())
{
ARMARX_INFO << "Trajectory is empty.";
return TrajectoryControllerResult{
.twist = core::Twist::Zero(),
.dropPoint = {.waypoint = {.pose = core::Pose::Identity()}, .velocity = 0}};
}
const core::Pose currentPose(robot->getGlobalPose());
const auto projectedPose = trajectory.getProjection(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment