Skip to content

Commit

Permalink
Switch to using a oneof rather than a enum and distinct fields
Browse files Browse the repository at this point in the history
  • Loading branch information
caspar-ai committed Dec 17, 2020
1 parent ca4dd1c commit 6af0b96
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions osi_motionrequest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,29 @@ package osi3;
//
message MotionRequest
{
oneof motion_request
{
//
// Defines a desired state.
// If the output option is set to DESIRED_STATE this must be provided.
//
DesiredState desired_state = 1;

//
// Define different options for had function ouput.
// Each option is corresponds to a field in the message.
//
enum OutputOptions {
DESIRED_STATE = 0;
TRAJECTORY = 1;
//
// Defines a desired trajectory.
// If the output option is set to DESIRED_TRAJECTORY this must be set.
//
Trajectory desired_trajectory = 2;
}

//
// Define the option that is used to specify the motion request.
// This must be set. Additionaly the field corresponding to the specified option must be set.
//
optional OutputOptions output_option = 1;

//
// Defines a desired state.
// If the output option is set to DESIRED_STATE this must be provided.
//
optional DesiredState desired_state = 2;

//
// Defines a desired trajectory.
// If the output option is set to DESIRED_TRAJECTORY this must be set.
//
optional Trajectory desired_trajectory = 3;
}

//
// \brief Defined the trajectory desired by the had function. This trajectory is the result of the trajctory planning step
// in the HAD function. The task of the acutator management is to follow the trajectory as close as possible.
// The timestamps inside the trajecotry must be defined in global simulation time.
//
message Trajectory {
message Trajectory
{
repeated StatePoint trajectory_point = 1;
}

Expand Down

0 comments on commit 6af0b96

Please sign in to comment.