Skip to content
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

Merged
merged 3 commits into from
Apr 24, 2020
Merged

[jog_arm] Keep updating joints, even while waiting for a valid command #2027

merged 3 commits into from
Apr 24, 2020

Conversation

AndyZe
Copy link
Member

@AndyZe AndyZe commented Apr 17, 2020

This prevents a potential jump in joint angles when jogging resumes

@jliukkonen
Copy link
Contributor

Tried this out with UR5 and it definitely fixed jumping issues when resuming jogging, so it does what it promises. 👍

Copy link
Contributor

@mlautman mlautman left a 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);
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

@mlautman mlautman left a 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-io
Copy link

Codecov Report

Merging #2027 into master will decrease coverage by 0.10%.
The diff coverage is 89.47%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
...veit_experimental/moveit_jog_arm/src/jog_calcs.cpp 75.00% <89.47%> (ø)
.../move_group_interface/src/move_group_interface.cpp 37.10% <0.00%> (-3.67%) ⬇️
...nning_scene_monitor/src/planning_scene_monitor.cpp 70.95% <0.00%> (+0.44%) ⬆️
...meterization/work_space/pose_model_state_space.cpp 82.99% <0.00%> (+0.68%) ⬆️
...anning_scene_monitor/src/current_state_monitor.cpp 52.82% <0.00%> (+1.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 173d6a6...65da4b3. Read the comment docs.

Copy link
Member

@henningkayser henningkayser left a 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

@henningkayser henningkayser merged commit ad88e18 into moveit:master Apr 24, 2020
@tylerjw tylerjw mentioned this pull request May 8, 2020
20 tasks
tylerjw pushed a commit to PickNikRobotics/moveit that referenced this pull request May 12, 2020
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
tylerjw pushed a commit to PickNikRobotics/moveit that referenced this pull request May 12, 2020
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
tylerjw pushed a commit to PickNikRobotics/moveit that referenced this pull request May 20, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants