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
[Servo] Halt Servo command on Pose Tracking stop #2501
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2501 +/- ##
==========================================
- Coverage 60.26% 60.25% -0.00%
==========================================
Files 351 351
Lines 26476 26483 +7
==========================================
+ Hits 15952 15956 +4
- Misses 10524 10527 +3
Continue to review full report at Codecov.
|
I appreciate the bug fix! There's already a member function called
Then
|
The only issue I see with ^ is it sets |
Looks good to me, will do in a second. What do you think about removing the mutex-protected bit
As 0 velocity is 0 velocity in any frame and Servo can handle an empty frame command |
I'd rather keep the mutex to be on the safe side, TBH. |
Works for me. One thing I see about moving the halting message to Is that a problem? |
i'm OK with it |
stop_requested_ = true; | ||
|
||
// Send a 0 command to Servo to halt arm motion | ||
auto msg = moveit::util::make_shared_from_pool<geometry_msgs::TwistStamped>(); |
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.
Is this really enough? It seems like this could go in after stop_requested_
so that it has no effect.
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.
It looks fine to me. stop_requested_
stops the Pose Tracking loop. Publishing the zero twist stops the Servo loop.
* Publish Servo stop in Pose Tracking cleanup * Move publish halt to stopMotion()
* Publish Servo stop in Pose Tracking cleanup * Move publish halt to stopMotion()
* Publish Servo stop in Pose Tracking cleanup * Move publish halt to stopMotion()
Description
Small change to make Pose Tracking publish a 0 twist message for Servo when it is stopping. Before this, if you were using a velocity controller and stopped Pose Tracking during a movement, the last published command to Servo would be nonzero and the manipulator would still move, see attached.
It might be worth exposing some kind of
halt()
function in Servo itself, which I can do here if needed.Haven't been able to replicate with the Servo demonstrations (position controllers), so attached videos on hardware. In the clip, I use Pose Tracking to point the left arm camera at the right gripper, but call
stopMotion()
and cancel the pose tracking before it gets there. In the first, the arm holds the last velocity command sent until I E-stop. In the second gif, a 0-twist command is sent to Servo during Pose Tracking stopping.