-
Notifications
You must be signed in to change notification settings - Fork 580
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 Node - pause service: check if request is different than current state. #3265
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3265 +/- ##
==========================================
- Coverage 45.94% 45.59% -0.34%
==========================================
Files 716 716
Lines 62393 62379 -14
Branches 7543 7544 +1
==========================================
- Hits 28659 28435 -224
- Misses 33568 33777 +209
- Partials 166 167 +1 ☔ View full report in Codecov by Sentry. |
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.
This is a good change, but also noting that #3259 was recently merged which may help with this. Checking if you have this commit locally?
Besides that, just one small comment to reduce duplication.
Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com>
Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com>
Thanks for this suggestion, I didn't have that commit locally indeed. Now I get the Collision monitor could not be started error immediately, which is good enough for me. I did apply you suggestion. Feel free to close this PR (since my actual problem was already solved by #3259), or to still merge it if you like to have this check on the servo pause state. |
…t state. (#3265) * Return if requested pause state is already active. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> * Reuse logger message with a shared string variable. Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> --------- Signed-off-by: Jelmer de Wolde <jelmer.de.wolde@alliander.com> (cherry picked from commit 0af5e0f)
Description
When using the servo_node from moveit_servo, the service call to /servo_node/pause_servo hangs for a while (sometimes even up to a minute on my machine) when requesting pause = false while the pause status was already false. This behavior can be experienced by running the demo:
ros2 launch moveit_servo demo_ros_api.launch.py
And calling the service:
ros2 service call /servo_node/pause_servo std_srvs/srv/SetBool '{data: false}'
After a while, the following error is logged:
[moveit_servo_demo_container.moveit.ros.move_group.collision_monitor]: Collision monitor could not be started
To avoid this behavior, I propose this change to first check whether the requested pause state is different compared to the current pause state. If not, the response will be returned with the message that nothing is changed since the requested pause stated was already active.
Checklist