TraveSim Adapters  0.1
Protobuf adapters for TraveSim project
field_state.hpp
Go to the documentation of this file.
1 /**
2  * @file field_command.hpp
3  *
4  * @brief Field state data structure
5  *
6  * @author Lucas Haug <lucas.haug@thunderatz.org>
7  *
8  * @date 04/2021
9  */
10 
11 #ifndef __FIELD_STATE_H__
12 #define __FIELD_STATE_H__
13 
14 #include <vector>
15 #include <iostream>
16 
19 
20 namespace travesim {
21 /**
22  * @brief Data structure to hold the field state
23  *
24  */
25 class FieldState {
26  public:
27  /**
28  * @brief Construct a new Field State object
29  *
30  * @param teams_formation Number of robots per team, default is 3
31  */
33 
34  /**
35  * @brief Output stream operator overloading
36  *
37  */
38  friend std::ostream& operator <<(std::ostream& output, const FieldState& field_state);
39 
40  uint time_step; /**< ODE time step */
41 
42  uint8_t robots_per_team;
43 
44  /**
45  * @brief Field entities
46  *
47  */
49 
50  std::vector<EntityState> yellow_team;
51  std::vector<EntityState> blue_team;
52 };
53 }
54 
55 #endif // __FIELD_STATE_H__
EntityState ball
Field entities.
Definition: field_state.hpp:48
Data structure to hold the field state.
Definition: field_state.hpp:25
Entity state data structure.
std::vector< EntityState > yellow_team
Definition: field_state.hpp:50
Common constants and types for the data structures.
FieldState(TeamsFormation teams_formation=TeamsFormation::THREE_ROBOTS_PER_TEAM)
Construct a new Field State object.
Definition: field_state.cpp:19
TeamsFormation
Formation of the teams.
Definition: data_common.hpp:40
std::vector< EntityState > blue_team
Definition: field_state.hpp:51
friend std::ostream & operator<<(std::ostream &output, const FieldState &field_state)
Output stream operator overloading.
Definition: field_state.cpp:24
Data structure to hold the state of a entity in the simulation.