Skip to content

Improve Action Goal Management in rosbridge for clients like roslibjs #1003

@ashkalor

Description

@ashkalor

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

  1. Client Initiates Action: The client sends an action goal through rosbridge.
  2. Client Disconnects: Due to network issues or other reasons, the client disconnects from the rosbridge server.
  3. 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

  1. 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.

  2. 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.

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