syntax = "proto3";

package is.robot;

option java_package = "com.is.robot";
option java_multiple_files = true;

import "is_msgs/common.proto";

// Define messages for the robot gateway and controller services

message RobotConfig {
  common.Speed speed = 1;
}

message FinalPoseTask {
  common.Pose goal = 1;
}

message PathTask {
  repeated common.Position positions = 1;
}

message TrajectoryTask {
  repeated common.Position positions = 1;
  repeated common.Speed speeds = 2;
}

message RobotTask {
  oneof Task {
    FinalPoseTask pose = 1;
    PathTask path = 2;
    TrajectoryTask trajectory = 3;
  }
  // Ratio indicating the allowed error in the positioning algorithm
  float allowed_error = 14;
  common.SamplingSettings sampling = 15;
}

message RobotControllerProgress {
  common.Speed current_speed = 1;
  common.Pose current_pose = 2;
  common.Pose desired_pose = 3;
  float error = 4;
  bool done = 5;
  int32 sources = 6;
}
