RobotWebTools / rosbridge_suite

Server Implementations of the rosbridge v2 Protocol
https://robotwebtools.github.io
BSD 3-Clause "New" or "Revised" License
866 stars 506 forks source link

cancel_action_goal results in action_result with no status #920

Open mirons5678 opened 2 months ago

mirons5678 commented 2 months ago

Description

If I send send_action_goal message and let the action run to completion I get back an action_result with a values field that contains a status of 4 (i.e. SUCCEEDED), e.g.:

{
  "op": "action_result",
  "action": "/robot/navigate_to_pose",
  "values": {
    "status": 4,
    "result": {
      "result": {}
    }
  },
  "result": true,
  "id": "2"
}

However, if I send a cancel_action_goal message before the action has completed, I get back an action_result with a values field that does not contain a status (I expected to see status 5 (i.e. CANCELED)).

Steps To Reproduce

Send send_action_goal followed by cancel_action_goal. Am running rosbridge with send_action_goals_in_new_thread:=true

Expected Behavior

Expect to receive an action_result with values field with status 5 (CANCELED), e.g.

{
  "op": "action_result",
  "action": "/robot/navigate_to_pose",
  "values": {
    "status": 5,
    "result": {
      "result": {}
    }
  },
  "result": true,
  "id": "2"
}

Actual Behavior

Actually receive an action_result with values field with no status, e.g.

{
  "op": "action_result",
  "action": "/robot/navigate_to_pose",
  "values": "None",
  "result": false,
  "id": "1"
}

Also see the following error log from the rosbridge server:

[rosbridge_websocket-1] [ERROR] [1712917839.725245716] [rosbridge_websocket]: [Client c19854d4-a8e8-49d2-9736-3b500c846d61] send_action_goal Exception: send_action_goal:/robot/navigate_to_pose:49724a1e-dffc-4a4d-a8f6-a66cbe77d5ec