Skip to content

Fix potential deadlock and wait until service is available#87

Merged
AndrejOrsula merged 2 commits intoAndrejOrsula:develfrom
belalhmedan90:master
Mar 4, 2025
Merged

Fix potential deadlock and wait until service is available#87
AndrejOrsula merged 2 commits intoAndrejOrsula:develfrom
belalhmedan90:master

Conversation

@belalhmedan90
Copy link
Contributor

  1. Replace rate.sleep() with rclpy.spin_once(self._node, timeout_sec=1.0) to avoid sleeping forever.
  2. Ensure Start Joint States Are present.
  3. Wait for the ROS2 Services to make sure they are available.

Signed-off-by: Andrej Orsula <orsula.andrej@gmail.com>
Copy link
Owner

@AndrejOrsula AndrejOrsula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @belalhmedan90, for your contribution!

@AndrejOrsula AndrejOrsula changed the title Update moveit2.py Fix potential deadlock and wait until service is available Mar 4, 2025
@AndrejOrsula AndrejOrsula merged commit 1f030f6 into AndrejOrsula:devel Mar 4, 2025
2 checks passed
andrewbowman23 added a commit to andrewbowman23/pymoveit2 that referenced this pull request Mar 4, 2025
andrewbowman23 added a commit to andrewbowman23/pymoveit2 that referenced this pull request Mar 4, 2025
andrewbowman23 added a commit to andrewbowman23/pymoveit2 that referenced this pull request Mar 4, 2025
Can't use rclpy.spin unless rclpy is imported.
Also, wait_until_exectued use of spin was incorrect.
andrewbowman23 added a commit to andrewbowman23/pymoveit2 that referenced this pull request Mar 4, 2025
Can't use rclpy.spin unless rclpy is imported.
Also, wait_until_executed use of spin was incorrect.
AndrejOrsula added a commit that referenced this pull request Mar 4, 2025
* Fix rclpy import and spin issues from (#87)

Can't use rclpy.spin unless rclpy is imported.
Also, wait_until_executed use of spin was incorrect.

* Apply pre-commit suggestions

Signed-off-by: Andrej Orsula <orsula.andrej@gmail.com>

---------

Signed-off-by: Andrej Orsula <orsula.andrej@gmail.com>
Co-authored-by: Andrej Orsula <orsula.andrej@gmail.com>
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.

2 participants