You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a ROS2 Iron project and have encountered a perplexing issue with my action servers. I've implemented collision checking modification without using MoveIt Task Constructor (which isn't available for Iron). The core functionality works, but I'm facing a critical problem:
The Issue:
After executing a collision checking modification, ALL action servers in my main node become unresponsive. Here's what I've observed:
The modify_collision_checking function executes successfully and completes.
I receive a success message: [INFO] Completed modify_collision_checking: test_box, ['r1_gripper'], True, telling me the funciton executed all the way.
After this, no action servers in the main node respond to messages.
What I've Tried:
Other action servers work fine when used independently.
If I replace the content of modify_collision_checking with pass, it works repeatedly without issues.
The Code:
Here's a simplified version of my CollisionObjectHandler class:
And I'm setting up the action server like this in my main node (which imports CollisionObjectHandler:
fromrclpy.actionimportActionServerfromrclpy.nodeimportNodefromscript1importCollisionObjectHandlerclassPlanningAndSceneManagerServer(Node):
""" A ROS2 node for managing the scene, including mesh acquisition and object placement. """def__init__(self):
super().__init__("scene_manager_server")
self.collision_object_handler=CollisionObjectHandler(self)
self.scene_pub=self.create_publisher(
PlanningScene, "/planning_scene", qos_profile
)
self.get_planning_scene=self.create_client(
GetPlanningScene, "/get_planning_scene"
)
self._change_collision_server=ActionServer(
self,
ChangeObjectCollision,
"change_object_collision",
selfself._change_attachment_server=ActionServer(
self,...
The Question:
What could be causing all action servers to become unresponsive after modify_collision_checking executes? Is there something in this function that might be interfering with the ROS2 communication infrastructure?
Again, the function itself does not get stuck. It terminates successfully and the ActionServer sends a Success message. Only afterwards, all action servers (also these fully independent of CollistionObjectHandler) of the main script no longer receive.
Any insights or suggestions for debugging this issue would be greatly appreciated. I'm open to alternative approaches or workarounds if necessary.
The text was updated successfully, but these errors were encountered:
To be sure, I would want to see the complete application but guessing like below.
So i am expecting that modify_collision_checking is called as ActionServer.execute_callback, and modify_collision_checking calls service request get_planning_scene.call_async(req) and waiting on the result via rclpy.spin_until_future_complete in the execute_callback in the executer.
This is not recommended design, that calling the blocking call in the callback of executor.
What happens here is after rclpy.spin_until_future_complete completed, self.node is removed from the executor.
That said, modify_collision_checking function can be completed as you mentioned, but no more executable entity cannot be taken or executed in this executor anymore since the node has been removed from the executer.
This behavior is originally bug, reported #1313 and fixed with #1316.
downstream distro backports are still under review, so your distribution iron does not have this fix yet.
besides above issue and bug fix, i would like you to try async & await design for modify_collision_checking.
the followings are pseudo code, but i believe it should fix your blocking problem in the application.
I'm working on a ROS2 Iron project and have encountered a perplexing issue with my action servers. I've implemented collision checking modification without using MoveIt Task Constructor (which isn't available for Iron). The core functionality works, but I'm facing a critical problem:
The Issue:
After executing a collision checking modification, ALL action servers in my main node become unresponsive. Here's what I've observed:
modify_collision_checking
function executes successfully and completes.[INFO] Completed modify_collision_checking: test_box, ['r1_gripper'], True
, telling me the funciton executed all the way.What I've Tried:
modify_collision_checking
withpass
, it works repeatedly without issues.The Code:
Here's a simplified version of my
CollisionObjectHandler
class:And I'm setting up the action server like this in my main node (which imports CollisionObjectHandler:
The Question:
What could be causing all action servers to become unresponsive after
modify_collision_checking
executes? Is there something in this function that might be interfering with the ROS2 communication infrastructure?Again, the function itself does not get stuck. It terminates successfully and the ActionServer sends a Success message. Only afterwards, all action servers (also these fully independent of CollistionObjectHandler) of the main script no longer receive.
Any insights or suggestions for debugging this issue would be greatly appreciated. I'm open to alternative approaches or workarounds if necessary.
The text was updated successfully, but these errors were encountered: