-
Notifications
You must be signed in to change notification settings - Fork 30
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
Cancel in-progress trajectories. #400
Conversation
Codecov Report
@@ Coverage Diff @@
## master #400 +/- ##
==========================================
- Coverage 78.98% 78.89% -0.09%
==========================================
Files 258 258
Lines 6296 6303 +7
==========================================
Hits 4973 4973
- Misses 1323 1330 +7
|
DART_UNUSED(lock); // Suppress unused variable warning. | ||
|
||
if (mInProgress) | ||
mGoalHandle.cancel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to print a warning something like "Attempting to abort trajectory execution but no trajectory in progress."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like a good idea. We should do this to the other TrajectoryExecutor::abort
implementations as well.
@@ -234,7 +234,11 @@ void RosTrajectoryExecutor::step( | |||
//============================================================================== | |||
void RosTrajectoryExecutor::abort() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer "cancel" instead of "abort". It seems like "cancel" and "abort" are different terms in ros_control; "cancel" is where the client requested to cancel the trajectory, and "abort" is where the server had to stop it for some other reason (e.g. force threshold has been violated).
Shouldn't we add the method to |
I think My understanding is that we're not using |
Oops- sorry I wasn't aware that the base class / |
@Tonkel said that they're using this in the feeding demo already, so it looks like this works! @gilwoolee or @jslee02 would you mind taking one last look before merging? |
@@ -43,7 +43,7 @@ class InstantaneousTrajectoryExecutor : public TrajectoryExecutor | |||
const std::chrono::system_clock::time_point& /*timepoint*/) override; | |||
|
|||
// Do nothing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: /// Does nothing
? Note three slashes.
@@ -4,6 +4,7 @@ | |||
#include <chrono> | |||
#include <future> | |||
#include <set> | |||
#include <dart/common/Console.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This can be moved to the cpp file.
@@ -58,8 +58,8 @@ class RosTrajectoryExecutor : public aikido::control::TrajectoryExecutor | |||
/// Regularly checks for the completion of a sent trajectory. | |||
void step(const std::chrono::system_clock::time_point& timepoint) override; | |||
|
|||
// Do nothing. | |||
void abort() override; | |||
// \copydoc TrajectoryExecutor::cancel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: ///
mGoalHandle.cancel(); | ||
else | ||
dtwarn << "[RosTrajectoryExecutor::cancel] Attempting to " | ||
<< "cancel trajectory, but no trajectory in progress.\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Please wrap multiple lines with curly brackets.
722ecc8
to
0dbbe07
Compare
0dbbe07
to
9e360d2
Compare
* Cancel actionlib goal. * Rename abort to cancel to match actionlib. * Add warning when no trajectory is in progress. * Update CHANGELOG.md. * Address PR comments.
There was a comment that suggested that this isn't supported by rewd_controllers yet, but it seems like it might be? We should test this out on the real hardware.
Before creating a pull request
make format
Before merging a pull request
CHANGELOG.md