Skip to content

ROS 2 Humble SimpleActionState is stuck #128

@amock

Description

@amock

I encountered an issue where the SimpleActionState was waiting endlessly for a response from the action server, around line ~368:

# Wait for action to finish
self._done_cond.wait()

To address this, I modified the code as follows:

self._goal_result = None

# [...]

# Wait for action to finish
while self._goal_result is None:
    rclpy.spin_once(self.node)
    time.sleep(0.01)

My guess: Perhaps the issue is that the node isn't spinning while it's waiting for the condition to be met. As a result, it doesn't process any incoming responses from the action server, so the notify function never gets called.

Anyways, this change seems to resolve the issue, but I'm not entirely sure if this solution is the best one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions