From 6af0b962ea27c7655c34eb2c1e12bcb187c356af Mon Sep 17 00:00:00 2001 From: Caspar de Haes Date: Thu, 17 Dec 2020 13:47:21 +0000 Subject: [PATCH] Switch to using a oneof rather than a enum and distinct fields --- osi_motionrequest.proto | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/osi_motionrequest.proto b/osi_motionrequest.proto index 872b0d2d5..0c78d0ab1 100644 --- a/osi_motionrequest.proto +++ b/osi_motionrequest.proto @@ -17,33 +17,20 @@ 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; } // @@ -51,7 +38,8 @@ message MotionRequest // 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; }