Skip to content

Linear and rotational part as separate maneuvers #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/move_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,18 +492,19 @@ void MoveBasic::executeAction(const move_base_msgs::MoveBaseGoalConstPtr& msg)
return;
}
sleep(localizationLatency);
}

// Final rotation as specified in goal
if (do_final_rotation) {
double finalYaw = goalYaw - (yaw + requestedYaw);
if (std::abs(finalYaw) > angularTolerance) {
if (!rotate(finalYaw, drivingFrame)) {
return;
}
}

sleep(localizationLatency);
// Final rotation as specified in goal
if (do_final_rotation) {
double requestedYaw = atan2(linear.y(), linear.x());
double finalYaw = goalYaw - (yaw + requestedYaw);
if (std::abs(finalYaw) > angularTolerance) {
if (!rotate(finalYaw, drivingFrame)) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're missing a actionServer->setSucceeded(); over here, the state still never gets changed from active right now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But otherwise it does work 👍

}
}

sleep(localizationLatency);
}

actionServer->setSucceeded();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MoffKalast this line is setting it as succeeded

Copy link
Contributor

@MoffKalast MoffKalast Jun 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to get that far apparently. I'm not sure what rotate() gives back at specific times, but I'd imagine it just returns without setting the status in line 503?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yes it could be possible that the boolean we are returning from rotate function is wrong. If you are able to reproduce the issue, reopen it.

Expand Down