Commit 4766a614 authored by NicolaiO's avatar NicolaiO 🐼

moved proto files to other projects

parent 36908b2b
Pipeline #60 skipped
eclipse.preferences.version=1
encoding//test/src=ISO-8859-1
encoding/<project>=UTF-8
encoding/src=UTF-8
package edu.dhbw.mannheim.tigers.sumatra.model.data;
message SSL_DetectionBall {
required float confidence = 1;
optional uint32 area = 2;
required float x = 3;
required float y = 4;
optional float z = 5;
required float pixel_x = 6;
required float pixel_y = 7;
}
message SSL_DetectionRobot {
required float confidence = 1;
optional uint32 robot_id = 2;
required float x = 3;
required float y = 4;
optional float orientation = 5;
required float pixel_x = 6;
required float pixel_y = 7;
optional float height = 8;
}
message SSL_DetectionFrame {
required uint32 frame_number = 1;
required double t_capture = 2;
required double t_sent = 3;
required uint32 camera_id = 4;
repeated SSL_DetectionBall balls = 5;
repeated SSL_DetectionRobot robots_yellow = 6;
repeated SSL_DetectionRobot robots_blue = 7;
}
package edu.dhbw.mannheim.tigers.sumatra.model.data;
// A 2D float vector.
message Vector2f {
required float x = 1;
required float y = 2;
}
// Represents a field marking as a line segment represented by a start point p1,
// and end point p2, and a line thickness. The start and end points are along
// the center of the line, so the thickness of the line extends by thickness / 2
// on either side of the line.
message SSL_FieldLineSegment {
// Name of this field marking.
required string name = 1;
// Start point of the line segment.
required Vector2f p1 = 2;
// End point of the line segment.
required Vector2f p2 = 3;
// Thickness of the line segment.
required float thickness = 4;
}
// Represents a field marking as a circular arc segment represented by center point, a
// start angle, an end angle, and an arc thickness.
message SSL_FieldCicularArc {
// Name of this field marking.
required string name = 1;
// Center point of the circular arc.
required Vector2f center = 2;
// Radius of the arc.
required float radius = 3;
// Start angle in counter-clockwise order.
required float a1 = 4;
// End angle in counter-clockwise order.
required float a2 = 5;
// Thickness of the arc.
required float thickness = 6;
}
message SSL_GeometryFieldSize {
required int32 field_length = 1;
required int32 field_width = 2;
required int32 goal_width = 3;
required int32 goal_depth = 4;
required int32 boundary_width = 5;
repeated SSL_FieldLineSegment field_lines = 6;
repeated SSL_FieldCicularArc field_arcs = 7;
}
message SSL_GeometryCameraCalibration {
required uint32 camera_id = 1;
required float focal_length = 2;
required float principal_point_x = 3;
required float principal_point_y = 4;
required float distortion = 5;
required float q0 = 6;
required float q1 = 7;
required float q2 = 8;
required float q3 = 9;
required float tx = 10;
required float ty = 11;
required float tz = 12;
optional float derived_camera_world_tx = 13;
optional float derived_camera_world_ty = 14;
optional float derived_camera_world_tz = 15;
}
message SSL_GeometryData {
required SSL_GeometryFieldSize field = 1;
repeated SSL_GeometryCameraCalibration calib = 2;
}
package edu.dhbw.mannheim.tigers.sumatra.model.data;
import "messages_robocup_ssl_geometry.proto";
message SSL_GeometryFieldSize {
required int32 line_width = 1;
required int32 field_length = 2;
required int32 field_width = 3;
required int32 boundary_width = 4;
required int32 referee_width = 5;
required int32 goal_width = 6;
required int32 goal_depth = 7;
required int32 goal_wall_width = 8;
required int32 center_circle_radius = 9;
required int32 defense_radius = 10;
required int32 defense_stretch = 11;
required int32 free_kick_from_defense_dist = 12;
required int32 penalty_spot_from_field_line_dist = 13;
required int32 penalty_line_from_spot_dist = 14;
}
// SSL_GeometryCameraCalibration is identical to the one defined in
// messages_robocup_ssl_geometry.proto .
message SSL_GeometryData {
required SSL_GeometryFieldSize field = 1;
repeated SSL_GeometryCameraCalibration calib = 2;
}
package edu.dhbw.mannheim.tigers.sumatra.model.data;
option java_package = "edu.dhbw.mannheim.tigers.sumatra.model.data";
option java_outer_classname = "RefboxRemoteControl";
import "messages_robocup_ssl_referee.proto";
// The TCP half-connection from controller to referee box carries a sequence of
// these messages, sent on demand, each preceded by its length in bytes as a
// 4-byte big-endian integer.
//
// There is no rule on how often requests can be, or need to be, sent. A remote
// control client connected to the referee box over a reliable link will
// typically send messages only when a change of game state is needed. However,
// a remote control client connected over an unreliable link (e.g. wifi) may
// wish to send a no-op request (a message with only message_id filled in) at a
// fixed frequency to detect and report connection failures. Such no-op
// requests cause no change to game state but solicit a reply from the referee
// box with the OK outcome.
//
// Each request may contain at most one action. An action is a stage, a
// command, or a card. Setting more than one action in a single request results
// in the request being rejected. This simplifies understanding the order in
// which actions occur.
message SSL_RefereeRemoteControlRequest {
// The message ID. This number may be selected arbitrarily by the client.
// It is never interpreted by the referee box. It is returned unmodified in
// the SSL_RefereeRemoteControlReply message to allow correlating replies
// to requests.
required uint32 message_id = 1;
// The stage of the game to move to, which should be omitted if the stage
// need not change.
//
// Do not use this field to enter the NORMAL_FIRST_HALF,
// NORMAL_SECOND_HALF, EXTRA_FIRST_HALF, or EXTRA_SECOND_HALF stages.
// Instead, prepare a kickoff and then issue the NORMAL_START command via
// the command field.
optional SSL_Referee.Stage stage = 2;
// The command to be issued, which should be omitted if no command should
// be issued at this time (i.e. the command currently in force may continue
// to be used, or a stage change is occurring which comes with its own new
// command). Sending a request with this field set always increments the
// command counter in the broadcast referee box packet, which implies a
// “new activity”.
//
// The TIMEOUT_YELLOW and TIMEOUT_BLUE commands must be used to report
// entering timeouts. The timeout counter and clock are updated when those
// commands are issued. STOP is used to end the timeout.
//
// HALT can be issued during a timeout to stop the timeout clock. The
// appropriate choice of TIMEOUT_YELLOW or TIMEOUT_BLUE can be issued to
// resume the timeout clock, or STOP can be issued to end the timeout.
//
// The GOAL_YELLOW and GOAL_BLUE commands must be used to report goals
// scored. The goal counters in the TeamInfo messages are incremented when
// those commands are issued.
optional SSL_Referee.Command command = 3;
// The coordinates of the Designated Position (whose purpose depends on the
// current command). This is measured in millimetres and correspond to
// SSL-Vision coordinates. this field must be present if and only if the
// command field is present and is set to a ball placement command. If the
// command field is absent, the designated position does not change. If the
// command field is present and the designated position field is absent, no
// designated position is included in the new command.
optional SSL_Referee.Point designated_position = 4;
// The card to issue.
message CardInfo {
// Which type of card to issue.
enum CardType {
CARD_YELLOW = 0;
CARD_RED = 1;
}
required CardType type = 1;
// Which team to issue the card to.
enum CardTeam {
TEAM_YELLOW = 0;
TEAM_BLUE = 1;
}
required CardTeam team = 2;
}
optional CardInfo card = 5;
// The command_counter of the most recent multicast referee packet observed
// by the remote control. If this does not match the command_counter value
// of the current referee packet, the request is rejected.
//
// The purpose of this field is to avoid race conditions between input from
// a human and input from an autonomous software referee using the remote
// control protocol. For example, consider the case where the game is in
// play (Normal Start) and the human operator presses the Halt button while
// the autonomous referee simultaneously sends the Stop command. Without
// this field:
// 1. The Halt button is pressed, resulting in a new command being started.
// 2. The autonomous referee sends the Stop command to the remote control
// port.
// 3. The Stop command is accepted and takes precedence due to arriving
// later.
// In the worst case, this could result in the operator having to press
// Halt multiple times before the field is made safe.
//
// By including the command_counter field in all requests on the remote
// control port, and autonomous referee avoids this problem. Instead, the
// situation would develop as follows:
// 1. The Halt button is pressed, resulting in a new command being started.
// 2. The autonomous referee sends the Stop command, but with the Normal
// Start command’s command_counter.
// 3. The referee box rejects the Stop command and remains halted, due to
// the mismatch in command_counter value.
// 4. The autonomous referee waits for the next multicast packet from the
// referee box, to get the new command_counter value.
// 5. The autonomous referee box observes that the game is halted and
// decides it should not send the Stop command.
//
// If this field is omitted, the check for a matching counter value is
// bypassed and requests are never rejected for this reason. This is
// appropriate for remote control software managed by a human operator,
// where no race condition is possible.
optional uint32 last_command_counter = 6;
}
// The TCP half-connection from referee box to controller carries a sequence of
// these messages, sent precisely once per received
// SSL_RefereeRemoteControlRequest message, each preceded by its length in
// bytes as as 4-byte big-endian integer.
message SSL_RefereeRemoteControlReply {
// The message ID of the request message to which this reply corresponds.
required uint32 message_id = 1;
// The outcome of the request.
enum Outcome {
// The request was accepted.
OK = 0;
// The request was rejected because it contained more than one action.
MULTIPLE_ACTIONS = 1;
// The request was rejected because the requested stage does not exist,
// is not accessible from the current game state, or is a game half
// (which must be entered by means of a NORMAL_START command, not a
// stage change).
BAD_STAGE = 2;
// The request was rejected because the requested command does not
// exist or is not accessible from the current game state.
BAD_COMMAND = 3;
// The request was rejected because a designated position was provided
// with a command that does not need one or with the command field
// absent, or the command field was set to a ball placement command but
// a designated position was not provided.
BAD_DESIGNATED_POSITION = 4;
// The request was rejected because the command_counter field does not
// match.
BAD_COMMAND_COUNTER = 5;
// The request was rejected because a card cannot be issued at this
// time.
BAD_CARD = 6;
}
required Outcome outcome = 2;
};
package edu.dhbw.mannheim.tigers.sumatra.model.data;
import "messages_robocup_ssl_detection.proto";
message Log_Frame
{
required SSL_DetectionFrame frame = 1;
required string refbox_cmd = 2;
}
message Refbox_Log
{
repeated Log_Frame log = 1;
}
package edu.dhbw.mannheim.tigers.sumatra.model.data;
option java_package = "edu.dhbw.mannheim.tigers.sumatra.model.data";
option java_outer_classname = "Referee";
// Each UDP packet contains one of these messages.
message SSL_Referee {
// The UNIX timestamp when the packet was sent, in microseconds.
// Divide by 1,000,000 to get a time_t.
required uint64 packet_timestamp = 1;
// These are the "coarse" stages of the game.
enum Stage {
// The first half is about to start.
// A kickoff is called within this stage.
// This stage ends with the NORMAL_START.
NORMAL_FIRST_HALF_PRE = 0;
// The first half of the normal game, before half time.
NORMAL_FIRST_HALF = 1;
// Half time between first and second halves.
NORMAL_HALF_TIME = 2;
// The second half is about to start.
// A kickoff is called within this stage.
// This stage ends with the NORMAL_START.
NORMAL_SECOND_HALF_PRE = 3;
// The second half of the normal game, after half time.
NORMAL_SECOND_HALF = 4;
// The break before extra time.
EXTRA_TIME_BREAK = 5;
// The first half of extra time is about to start.
// A kickoff is called within this stage.
// This stage ends with the NORMAL_START.
EXTRA_FIRST_HALF_PRE = 6;
// The first half of extra time.
EXTRA_FIRST_HALF = 7;
// Half time between first and second extra halves.
EXTRA_HALF_TIME = 8;
// The second half of extra time is about to start.
// A kickoff is called within this stage.
// This stage ends with the NORMAL_START.
EXTRA_SECOND_HALF_PRE = 9;
// The second half of extra time.
EXTRA_SECOND_HALF = 10;
// The break before penalty shootout.
PENALTY_SHOOTOUT_BREAK = 11;
// The penalty shootout.
PENALTY_SHOOTOUT = 12;
// The game is over.
POST_GAME = 13;
}
required Stage stage = 2;
// The number of microseconds left in the stage.
// The following stages have this value; the rest do not:
// NORMAL_FIRST_HALF
// NORMAL_HALF_TIME
// NORMAL_SECOND_HALF
// EXTRA_TIME_BREAK
// EXTRA_FIRST_HALF
// EXTRA_HALF_TIME
// EXTRA_SECOND_HALF
// PENALTY_SHOOTOUT_BREAK
//
// If the stage runs over its specified time, this value
// becomes negative.
optional sint32 stage_time_left = 3;
// These are the "fine" states of play on the field.
enum Command {
// All robots should completely stop moving.
HALT = 0;
// Robots must keep 50 cm from the ball.
STOP = 1;
// A prepared kickoff or penalty may now be taken.
NORMAL_START = 2;
// The ball is dropped and free for either team.
FORCE_START = 3;
// The yellow team may move into kickoff position.
PREPARE_KICKOFF_YELLOW = 4;
// The blue team may move into kickoff position.
PREPARE_KICKOFF_BLUE = 5;
// The yellow team may move into penalty position.
PREPARE_PENALTY_YELLOW = 6;
// The blue team may move into penalty position.
PREPARE_PENALTY_BLUE = 7;
// The yellow team may take a direct free kick.
DIRECT_FREE_YELLOW = 8;
// The blue team may take a direct free kick.
DIRECT_FREE_BLUE = 9;
// The yellow team may take an indirect free kick.
INDIRECT_FREE_YELLOW = 10;
// The blue team may take an indirect free kick.
INDIRECT_FREE_BLUE = 11;
// The yellow team is currently in a timeout.
TIMEOUT_YELLOW = 12;
// The blue team is currently in a timeout.
TIMEOUT_BLUE = 13;
// The yellow team just scored a goal.
// For information only.
// For rules compliance, teams must treat as STOP.
GOAL_YELLOW = 14;
// The blue team just scored a goal.
GOAL_BLUE = 15;
// Equivalent to STOP, but the yellow team must pick up the ball and
// drop it in the Designated Position.
BALL_PLACEMENT_YELLOW = 16;
// Equivalent to STOP, but the blue team must pick up the ball and drop
// it in the Designated Position.
BALL_PLACEMENT_BLUE = 17;
}
required Command command = 4;
// The number of commands issued since startup (mod 2^32).
required uint32 command_counter = 5;
// The UNIX timestamp when the command was issued, in microseconds.
// This value changes only when a new command is issued, not on each packet.
required uint64 command_timestamp = 6;
// Information about a single team.
message TeamInfo {
// The team's name (empty string if operator has not typed anything).
required string name = 1;
// The number of goals scored by the team during normal play and overtime.
required uint32 score = 2;
// The number of red cards issued to the team since the beginning of the game.
required uint32 red_cards = 3;
// The amount of time (in microseconds) left on each yellow card issued to the team.
// If no yellow cards are issued, this array has no elements.
// Otherwise, times are ordered from smallest to largest.
repeated uint32 yellow_card_times = 4 [packed=true];
// The total number of yellow cards ever issued to the team.
required uint32 yellow_cards = 5;
// The number of timeouts this team can still call.
// If in a timeout right now, that timeout is excluded.
required uint32 timeouts = 6;
// The number of microseconds of timeout this team can use.
required uint32 timeout_time = 7;
// The pattern number of this team's goalie.
required uint32 goalie = 8;
}
// Information about the two teams.
required TeamInfo yellow = 7;
required TeamInfo blue = 8;
// The coordinates of the Designated Position. These are measured in
// millimetres and correspond to SSL-Vision coordinates. These fields are
// always either both present (in the case of a ball placement command) or
// both absent (in the case of any other command).
message Point {
required float x = 1;
required float y = 2;
}
optional Point designated_position = 9;
}
package edu.dhbw.mannheim.tigers.sumatra.model.data;
import "messages_robocup_ssl_detection.proto";
import "messages_robocup_ssl_geometry.proto";
message SSL_WrapperPacket {
optional SSL_DetectionFrame detection = 1;
optional SSL_GeometryData geometry = 2;
}
package edu.dhbw.mannheim.tigers.sumatra.model.data;
import "messages_robocup_ssl_detection.proto";
import "messages_robocup_ssl_geometry_legacy.proto";
package RoboCup2014Legacy.Wrapper;
message SSL_WrapperPacket {
optional SSL_DetectionFrame detection = 1;
optional RoboCup2014Legacy.Geometry.SSL_GeometryData geometry = 2;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment