-
Notifications
You must be signed in to change notification settings - Fork 568
Description
Problem
Currently, the Action class in roslibjs generates its own internal action ID using a counter. This ID doesn't help when a client disconnects and reconnects, as it doesn't correlate with the actual action state in ROS2. This internal ID is not sufficient for managing action states across disconnections and reconnections, as it does not correlate with the action's state in ROS2.
var actionGoalId = 'send_action_goal:' + this.name + ':' + ++this.ros.idCounter;
https://github.com/RobotWebTools/roslibjs/blob/develop/src/core/Action.js#L76
Example Scenario
- Client Initiates Action: The client sends an action goal through rosbridge.
- Client Disconnects: Due to network issues or other reasons, the client disconnects from the rosbridge server.
- Client Reconnects: Upon reconnection, the client has no way to reference the previous action goal using the internal ID, as it does not match the ROS2 action UUID.
Proposed Solutions
-
Expose ROS2 Action UUID: Modify rosbridge to expose the actual action UUID when an action goal is sent. This UUID should be returned to the client and can be used for all subsequent interactions with the action. This also allows the user to have flexiblity in managing the action state on their own via the status and feedback topic.
-
Support for Reconnection: Allow clients to use the action UUID to manage action states, such as subscribing to feedback ,status topics and result service even after reconnection.