OpenSimulationInterface / open-simulation-interface

A generic interface for the environmental perception of automated driving functions in virtual scenarios.
Other
265 stars 124 forks source link

TrafficCommandUpdate can not feedback success information. #791

Open yanqd0 opened 3 months ago

yanqd0 commented 3 months ago

Describe the feature

Current TrafficCommandUpdate message is here (while docs are removed for short):

message TrafficCommandUpdate
{
    optional InterfaceVersion version = 1;
    optional Timestamp timestamp = 2;
    optional Identifier traffic_participant_id = 3;
    repeated DismissedAction dismissed_action = 4;

    message DismissedAction 
    {
        optional Identifier dismissed_action_id = 1;
        optional string failure_reason = 2;
    }
}

It is clear that this message is not for accepted or completed actions.

Describe the solution you would like

message TrafficCommandUpdate
{
    optional InterfaceVersion version = 1;
    optional Timestamp timestamp = 2;
    optional Identifier traffic_participant_id = 3;
    repeated DismissedAction dismissed_action = 4;

    message DismissedAction 
    {
        optional Identifier dismissed_action_id = 1;
        optional string failure_reason = 2;
    }

    repeated AcceptedAction accepted_action = 5;

    message AcceptedAction 
    {
        optional Identifier id = 1;
        optional ActionState state = 2;
        optional string description = 3;
    }

    enum ActionState {
        ACTION_STATE_UNKNOWN = 0;
        ACTION_STATE_ACCEPTED = 1;
        ACTION_STATE_RUNNING = 2;
        ACTION_STATE_SUCCESS = 3;
        ACTION_STATE_ABORTED = 4;
        ACTION_STATE_FAILED = 5;
        ACTION_STATE_CUSTOM0 = 6;
        ACTION_STATE_CUSTOM1 = 7;
        ACTION_STATE_CUSTOM2 = 8;
        ACTION_STATE_CUSTOM3 = 9;
    }
}

Or sth like that.

Describe alternatives you have considered

None.

Describe the backwards compatibility

It is backwards compatible that only extra fields are added.

Additional context

None.