-
Notifications
You must be signed in to change notification settings - Fork 943
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] Update last_sent_command_ at ServoCalcs start #2249
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2249 +/- ##
==========================================
+ Coverage 57.80% 57.89% +0.09%
==========================================
Files 326 326
Lines 25625 25627 +2
==========================================
+ Hits 14812 14837 +25
+ Misses 10813 10790 -23
Continue to review full report at Codecov.
|
Thanks for a good description of what's going on. It makes sense; I don't have any suggestion for the edge case you pointed out. |
I just noticed some folders are not being installed. Would you mind adding that here? In CMakeLists, it would be:
If you install the binary (sudo apt install ros-melodic-moveit-servo), it's causing some issues. Oops. |
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 tested switching back and forth between trajectory and streaming control. No issues, code looks good too.
Done! |
@tylerjw you will probably want to merge this before the Noetic release. It adds these key lines:
|
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.
looks good, thank you for this fix
I read the title of this PR as "Update [..] at ServoCakes start" and was rather confused for a while. 🍰 |
* Move last_sent_command_ update from constructor to start * Tweak demo configs * Add install folders to CMakeLists * Add clarity to parameter warning
* Move last_sent_command_ update from constructor to start * Tweak demo configs * Add install folders to CMakeLists * Add clarity to parameter warning
* Move last_sent_command_ update from constructor to start * Tweak demo configs * Add install folders to CMakeLists * Add clarity to parameter warning
Description
I moved the initialization of
last_sent_command_
from the ServoCalcs constructor to thestart()
function. Thelast_sent_command_
is stored and published if Joint or Cartesian servoing is not done.This PR fixes a logic error resulting in bad behavior:
last_sent_command_
is stored as where servo stopped in 3 and if published may result in the manipulator jumping back to that position.This PR fixes by saving
last_sent_command_
as the current position every time servo is started.There could still be some unexpected behavior if you start the servo while the arm is moving from another input. This will suddenly stop the arm as the
last_sent_command_
is set to the current position and 0 velocity. I am unsure what should happen in this case, but am open to suggestions.