TraveSim Adapters
0.1
Protobuf adapters for TraveSim project
|
Namespaces | |
converter | |
proto | |
ros_side | |
udp | |
Classes | |
class | AdapterConfigurer |
class | EntityState |
Data structure to hold the state of a entity in the simulation. More... | |
class | FieldState |
Data structure to hold the field state. More... | |
class | ReplacerConfigurer |
ReplacerConfigurer class definition. More... | |
class | RobotCommand |
Data structure to hold the command for a robot. More... | |
class | RobotState |
Data structure to hold the state of a robot in the simulation. More... | |
class | TeamCommand |
Data structure to hold the command for a team. More... | |
class | TeamsConfigurer |
TeamsConfigurer class definition. More... | |
class | Vector2D |
Data structure to hold a two dimensional vector. More... | |
class | VisionConfigurer |
VisionConfigurer class definition. More... | |
Enumerations | |
enum | IPValidation { VALID, INVALID_FORMAT, INVALID_NUMBERS, OUT_OF_RANGE } |
Type used to validate a IP string. More... | |
enum | TeamsFormation { THREE_ROBOTS_PER_TEAM = 3, FIVE_ROBOTS_PER_TEAM = 5 } |
Formation of the teams. More... | |
Functions | |
bool | ipv4_string_to_uint (std::string ip_string, uint *ip_uint) |
Converts a IPv4 in a string to a array of unsigned integers, where the most significant byte of the IP address is in the position 0 and the last significant in the position 3. More... | |
IPValidation | check_valid_ip (std::string ip, std::string min_ip, std::string max_ip) |
Checks if a IP is valid and is in the specified range. More... | |
std::string | get_error_msg (IPValidation error) |
Get the error msg based on the validation type. More... | |
std::ostream & | operator<< (std::ostream &output, const ReplacerConfigurer &repl_conf) |
std::ostream & | operator<< (std::ostream &output, const TeamsConfigurer &teams_conf) |
std::ostream & | operator<< (std::ostream &output, const VisionConfigurer &vision_conf) |
std::ostream & | operator<< (std::ostream &output, const Vector2D &vector_2d) |
std::ostream & | operator<< (std::ostream &output, const EntityState &entity_state) |
std::ostream & | operator<< (std::ostream &output, const FieldState &field_state) |
std::ostream & | operator<< (std::ostream &output, const RobotState &robot_state) |
std::ostream & | operator<< (std::ostream &output, const RobotCommand &command) |
std::ostream & | operator<< (std::ostream &output, const TeamCommand &command) |
Type used to validate a IP string.
Enumerator | |
---|---|
VALID | Valid IP address |
INVALID_FORMAT | Wrong formatted IP string |
INVALID_NUMBERS | The numbers on the ip are not representable by 8 bits |
OUT_OF_RANGE | The IP is not in the specified range |
Definition at line 37 of file configurers_utils.hpp.
Formation of the teams.
Enumerator | |
---|---|
THREE_ROBOTS_PER_TEAM | |
FIVE_ROBOTS_PER_TEAM |
Definition at line 40 of file data_common.hpp.
IPValidation travesim::check_valid_ip | ( | std::string | ip, |
std::string | min_ip, | ||
std::string | max_ip | ||
) |
Checks if a IP is valid and is in the specified range.
ip | IP string to be converted |
min_ip | Minimum IP interval value |
max_ip | Maximum IP interval value |
Definition at line 75 of file configurers_utils.cpp.
References INVALID_FORMAT, INVALID_NUMBERS, IPV4_NUM_OF_BYTES, ipv4_string_to_uint(), OUT_OF_RANGE, and VALID.
std::string travesim::get_error_msg | ( | IPValidation | error | ) |
Get the error msg based on the validation type.
error | Which error to get the message |
Definition at line 129 of file configurers_utils.cpp.
References INVALID_FORMAT, INVALID_NUMBERS, and OUT_OF_RANGE.
bool travesim::ipv4_string_to_uint | ( | std::string | ip_string, |
uint * | ip_uint | ||
) |
Converts a IPv4 in a string to a array of unsigned integers, where the most significant byte of the IP address is in the position 0 and the last significant in the position 3.
ip_string | IPv4 string to be converted |
ip_uint | Pointer where to store the converted IPv4 |
Definition at line 27 of file configurers_utils.cpp.
References IPV4_NUM_OF_BYTES.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const FieldState & | field_state | ||
) |
Definition at line 24 of file field_state.cpp.
References travesim::FieldState::ball, travesim::FieldState::blue_team, travesim::FieldState::robots_per_team, travesim::FieldState::time_step, and travesim::FieldState::yellow_team.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const RobotCommand & | command | ||
) |
Definition at line 24 of file team_command.cpp.
References travesim::RobotCommand::left_speed, PRINTING_DECIMAL_PRECISION, PRINTING_MIN_WIDTH, and travesim::RobotCommand::right_speed.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const Vector2D & | vector_2d | ||
) |
Definition at line 33 of file entity_state.cpp.
References PRINTING_DECIMAL_PRECISION, PRINTING_MIN_WIDTH, travesim::Vector2D::x, and travesim::Vector2D::y.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const RobotState & | robot_state | ||
) |
Definition at line 39 of file robot_state.cpp.
References travesim::EntityState::angular_position, travesim::EntityState::angular_velocity, travesim::RobotState::id, travesim::RobotState::is_yellow, travesim::EntityState::position, PRINTING_DECIMAL_PRECISION, PRINTING_MIN_WIDTH, and travesim::EntityState::velocity.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const TeamCommand & | command | ||
) |
Definition at line 41 of file team_command.cpp.
References PRINTING_DECIMAL_PRECISION, travesim::TeamCommand::robot_command, and travesim::TeamCommand::robots_per_team.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const VisionConfigurer & | vision_conf | ||
) |
Definition at line 53 of file vision_configurer.cpp.
References travesim::AdapterConfigurer< AdapterConfigType >::config, and travesim::AdapterConfigurer< AdapterConfigType >::reconfigured.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const EntityState & | entity_state | ||
) |
Definition at line 56 of file entity_state.cpp.
References travesim::EntityState::angular_position, travesim::EntityState::angular_velocity, travesim::EntityState::position, PRINTING_DECIMAL_PRECISION, PRINTING_MIN_WIDTH, and travesim::EntityState::velocity.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const ReplacerConfigurer & | repl_conf | ||
) |
Definition at line 58 of file replacer_configurer.cpp.
References travesim::AdapterConfigurer< AdapterConfigType >::config, and travesim::AdapterConfigurer< AdapterConfigType >::reconfigured.
std::ostream& travesim::operator<< | ( | std::ostream & | output, |
const TeamsConfigurer & | teams_conf | ||
) |
Definition at line 69 of file teams_configurer.cpp.
References travesim::AdapterConfigurer< AdapterConfigType >::config, and travesim::AdapterConfigurer< AdapterConfigType >::reconfigured.