Posted by @cwrx777:
In the fleet adapter, i created issue by using create_issue API.
self.update_handle.create_issue(
Tier.Error,
'emergency_stop',
{
'last_known_waypoint' : 'waypoint_1',
'timestamp': 1667273676829
}
)
However the created issue is not in the fleet_state_update message received by rmf_web.
Fleet State Update
{
"data": {
"name": "DeliveryRobot",
"robots": {
"DeliveryRobot_1": {
"battery": 0.6830000305175781,
"issues": [],
"location": {
"map": "L1",
"x": 25.0781192779541,
"y": -15.752861022949219,
"yaw": 3.0629677772521973,
},
"name": "DeliveryRobot_1",
"status": "idle",
"task_id": "",
"unix_millis_time": 1667273676867,
}
},
},
"type": "fleet_state_update",
}
Fleet State Log
{
"data": {
"name": "DeliveryRobot",
"robots": {
"DeliveryRobot_1": [
{
"seq": 758,
"text": 'Opened issue [emergency_stop]: {"last_known_waypoint":"waypoint_1","timestamp":1667273676829}',
"tier": "error",
"unix_millis_time": 1667273676839,
},
{
"seq": 759,
"text": "Dropped issue [emergency_stop]",
"tier": "warning",
"unix_millis_time": 1667273676839,
},
]
},
},
"type": "fleet_log_update",
}
Chosen answer
Answer chosen by @cwrx777 at 2022-11-01T06:39:02Z.
Answered by @mxgrey:
In the C++ documentation it’s explained that you need to hold onto the IssueTicket
that is returned to you by create_issue
. If you don’t hold onto the issue ticket, then the issue will be “dropped” so it won’t show up in the state, but it should still show up in the event log. It’s designed like this to avoid situations where robot states are permanently stuck with issues because a system integrator lost track of the ticket.
In the code snippet you provided, it looks like you are not holding onto the issue ticket.