-
Notifications
You must be signed in to change notification settings - Fork 946
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] Keep updating joints, even while waiting for a valid command #2027
Conversation
This prevents a potential jump in joint angles when jogging resumes
Tried this out with UR5 and it definitely fixed jumping issues when resuming jogging, so it does what it promises. 👍 |
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.
Overall seems reasonable. I would encourage you to cleanup the behavior if (!stale_command)
but I don't believe that issue to be critical
shared_variables.lock(); | ||
bool stale_command = shared_variables.command_is_stale; | ||
shared_variables.unlock(); | ||
bool valid_nonzero_command = !stale_command && (have_nonzero_cartesian_cmd || have_nonzero_joint_cmd); |
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: There is a lot of behavior that occurs if !stale_command
which makes this a little hard to reason about. Maybe put all of that in a single block instead of checking the value of stale_command
three times?
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.
OK, I like that. And it's more efficient too
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.
See previous comment about optionally cleaning up the behavior if (!stale_command)
, regarding the pdf... Wouldn't it be better to put this in the moveit_tutorials not in the moveit codebase? I have been trying to consolidate higher level moveit documentation there rather than have it spread across the tutorials, the website and the repos.
Codecov Report
@@ Coverage Diff @@
## master #2027 +/- ##
==========================================
- Coverage 54.08% 53.97% -0.11%
==========================================
Files 319 319
Lines 24997 24997
==========================================
- Hits 13519 13492 -27
- Misses 11478 11505 +27
Continue to review full report at Codecov.
|
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 to me
moveit#2027) * Keep updating joints, even while waiting for a valid command This prevents a potential jump in joint angles when jogging resumes * Simplify some logic, add a flowchart pdf * Delete pdf, clean up !stale_command usage
moveit#2027) * Keep updating joints, even while waiting for a valid command This prevents a potential jump in joint angles when jogging resumes * Simplify some logic, add a flowchart pdf * Delete pdf, clean up !stale_command usage
moveit#2027) * Keep updating joints, even while waiting for a valid command This prevents a potential jump in joint angles when jogging resumes * Simplify some logic, add a flowchart pdf * Delete pdf, clean up !stale_command usage
This prevents a potential jump in joint angles when jogging resumes