TraveSim Adapters  0.1
Protobuf adapters for TraveSim project
teams_configurer_example.cpp
Go to the documentation of this file.
1 /**
2  * @file teams_configurer_example.cpp
3  *
4  * @author Lucas Haug <lucas.haug@thuneratz.org>
5  *
6  * @brief Example on how to use the TeamsConfigurer
7  *
8  * @date 06/2021
9  *
10  * @copyright MIT License - Copyright (c) 2021 ThundeRatz
11  *
12  */
13 
14 #include <ros/ros.h>
15 
17 
18 /*****************************************
19  * Main Function
20  *****************************************/
21 
22 int main(int argc, char** argv) {
23  ros::init(argc, argv, "teams_configurer_example");
24  ros::NodeHandle node_handle;
25 
26  travesim::TeamsConfigurer teams_configurer;
27 
28  ROS_INFO("Starting...");
29  ROS_INFO_STREAM("========== Default Config ==========" << std::endl << teams_configurer);
30 
31  while (ros::ok()) {
32  if (teams_configurer.get_reset()) {
33  ROS_INFO_STREAM("========== Current Config ==========" << std::endl << teams_configurer);
34 
35  std::string address = teams_configurer.get_address(travesim::TeamsConfigurer::TeamColor::YELLOW);
36  }
37 
38  ros::spinOnce();
39  }
40 
41  return 0;
42 }
Configurer for the teams.
TeamsConfigurer class definition.
bool get_reset(void)
Get the reset config.
int main(int argc, char **argv)
std::string get_address(TeamColor color)
Get the configured address of a team.