-
Notifications
You must be signed in to change notification settings - Fork 4
/
ssl_simulation_control.proto
90 lines (84 loc) · 3.51 KB
/
ssl_simulation_control.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
syntax = "proto2";
option go_package = "github.com/RoboCup-SSL/ssl-simulation-protocol/pkg/sim";
import "ssl_gc_common.proto";
import "ssl_simulation_config.proto";
import "ssl_simulation_error.proto";
// Teleport the ball to a new location and optionally set it to some velocity
message TeleportBall {
// x-coordinate [m]
optional float x = 1;
// y-coordinate [m]
optional float y = 2;
// z-coordinate (height) [m]
optional float z = 3;
// Velocity in x-direction [m/s]
optional float vx = 4;
// Velocity in y-direction [m/s]
optional float vy = 5;
// Velocity in z-direction [m/s]
optional float vz = 6;
// Teleport the ball safely to the target, for example by
// moving robots out of the way in case of collision and set speed of robots close-by to zero
optional bool teleport_safely = 7 [default = false];
// Adapt the angular ball velocity such that the ball is rolling
optional bool roll = 8 [default = false];
// Instead of teleporting the ball, apply some force to make sure
// the ball reaches the required position soon (velocity is ignored if true)
// WARNING: A command with by_force stays active (the move will take some time)
// until cancled by another TeleportBall command with by_force = false.
// To avoid teleporting the ball at the end and resetting its current spin,
// do not set any of the optional fields in this message to end the force without triggering
// an additional teleportation
optional bool by_force = 9 [ default = false];
}
// Teleport a robot to some location and give it a velocity
message TeleportRobot {
// Robot id to teleport
required RobotId id = 1;
// x-coordinate [m]
optional float x = 2;
// y-coordinate [m]
optional float y = 3;
// Orientation [rad], measured from the x-axis counter-clockwise
optional float orientation = 4;
// Global velocity [m/s] towards x-axis
optional float v_x = 5 [default = 0];
// Global velocity [m/s] towards y-axis
optional float v_y = 6 [default = 0];
// Angular velocity [rad/s]
optional float v_angular = 7 [default = 0];
// Robot should be present on the field?
// true -> robot will be added, if it does not exist yet
// false -> robot will be removed, if it is present
optional bool present = 8;
// Instead of teleporting, apply some force to make sure
// the robot reaches the required position soon (velocity is ignored if true)
// WARNING: A command with by_force stays active (the move will take some time)
// until cancled by another TeleportRobot command for the same bot with by_force = false.
// To avoid teleporting at the end,
// do not set any of the optional fields in this message
// to end the force without triggering
// an additional teleportation
optional bool by_force = 9 [ default = false];
}
// Control the simulation
message SimulatorControl {
// Teleport the ball
optional TeleportBall teleport_ball = 1;
// Teleport robots
repeated TeleportRobot teleport_robot = 2;
// Change the simulation speed
optional float simulation_speed = 3;
}
// Command from the connected client to the simulator
message SimulatorCommand {
// Control the simulation
optional SimulatorControl control = 1;
// Configure the simulation
optional SimulatorConfig config = 2;
}
// Response of the simulator to the connected client
message SimulatorResponse {
// List of errors, like using unsupported features
repeated SimulatorError errors = 1;
}