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

Servo Node - pause service: check if request is different than current state. (backport #3265) #3348

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 15, 2025

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

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

This is an automatic backport of pull request #3265 done by [Mergify](https://mergify.com).

…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)
@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 44.40%. Comparing base (7e1fc53) to head (3d84283).
Report is 1 commits behind head on jazzy.

Files with missing lines Patch % Lines
moveit_ros/moveit_servo/src/servo_node.cpp 0.00% 6 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy    #3348      +/-   ##
==========================================
- Coverage   44.40%   44.40%   -0.00%     
==========================================
  Files         701      701              
  Lines       61857    61863       +6     
  Branches     7493     7494       +1     
==========================================
+ Hits        27464    27466       +2     
- Misses      34225    34230       +5     
+ Partials      168      167       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sea-bass sea-bass merged commit 6da4b25 into jazzy Feb 15, 2025
7 checks passed
@sea-bass sea-bass deleted the mergify/bp/jazzy/pr-3265 branch February 15, 2025 04:30
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.

3 participants