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
[jog_arm] Fix valid cmd flags #2013
Conversation
And reset them when incoming commands timeout
Codecov Report
@@ Coverage Diff @@
## master #2013 +/- ##
==========================================
+ Coverage 51.82% 51.88% +0.06%
==========================================
Files 319 317 -2
Lines 24959 24618 -341
==========================================
- Hits 12934 12773 -161
+ Misses 12025 11845 -180
Continue to review full report at Codecov.
|
@AndyZe Couldn't this potentially lead to sudden jerks in the motion when switching from one mode to another? In general, I think it might make sense to make this a little more explicit, i.e. setting the mode via CPP-interface, or only switching mode after repeated commands via ROS-interface |
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.
Any straight-forward way to test this? Switching modes is more of an edge case for now I assume, but would it be possible to mix joint and cartesian commands without much delay?
Edit - I looked through the code to see how the lowpass filters get applied. They are used in both Cartesian and joint control mode, so commands from the user should get smoothed regardless. So, I don't think an explicit mode is necessary. It's nice to keep the jogger agnostic to the source of incoming commands. I'll make some plots to verify the smoothing actually happens when transitioning from Cartesian -> joint control. |
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.
LGTM. Thanks for tracking this down
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.
@AndyZe great work! Tested this and didn't find any issues with it.
* Rename the 'zero command flag' variables for readability * Reset flags when incoming commands timeout * Remove debug line, clang format
* Rename the 'zero command flag' variables for readability * Reset flags when incoming commands timeout * Remove debug line, clang format
* Rename the 'zero command flag' variables for readability * Reset flags when incoming commands timeout * Remove debug line, clang format
Switching back and forth between joint commands and Cartesian commands could be buggy sometimes. The change at line 203 of jog_calcs.cpp fixes that.
Some flags were renamed and their logic was flipped to help readability