TraveSim Adapters  0.1
Protobuf adapters for TraveSim project
ros_side.hpp File Reference

Collection of data converters between ROS and local formats. More...

#include <iostream>
#include <geometry_msgs/Point.h>
#include <geometry_msgs/Vector3.h>
#include <gazebo_msgs/ModelState.h>
#include <gazebo_msgs/ModelStates.h>
#include "travesim_adapters/data/data_common.hpp"
#include "travesim_adapters/data/robot_state.hpp"
#include "travesim_adapters/data/entity_state.hpp"
#include "travesim_adapters/data/field_state.hpp"
Include dependency graph for ros_side.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 travesim
 
 travesim::converter
 

Macros

#define DEFAULT_Z_VALUE_BALL   0.032
 
#define DEFAULT_Z_VALUE_ROBOT   0.012
 
#define ROBOT_NAME(color, num)   color "_team/robot_" + std::to_string(num)
 
#define BALL_NAME   "vss_ball"
 
#define DEFAULT_ENTITY_NAME   BALL_NAME
 
#define DEFAULT_REFERENCE_FRAME   "world"
 

Functions

travesim::Vector2D travesim::converter::Point_to_Vector2D (geometry_msgs::Point *point)
 Function to convert geometry_msgs::Point to travesim::Vector2D. More...
 
travesim::Vector2D travesim::converter::Vector3_to_Vector2D (geometry_msgs::Vector3 *vector3)
 Function to convert geometry_msgs::Vector3 to travesim::Vector2D. More...
 
travesim::EntityState travesim::converter::ModelState_to_EntityState (gazebo_msgs::ModelState *model_state)
 Function to convert gazebo_msgs::ModelState to travesim::EntityState. More...
 
travesim::RobotState travesim::converter::ModelState_to_RobotState (gazebo_msgs::ModelState *model_state, bool is_yellow=true, int id=0)
 Function to convert gazebo_msgs::ModelState to travesim::RobotState. More...
 
geometry_msgs::Vector3 travesim::converter::Vector2D_to_Vector3 (Vector2D *vector2d)
 Function to convert travesim::Vector2D to geometry_msgs::Vector3. More...
 
geometry_msgs::Point travesim::converter::Vector2D_to_Point (Vector2D *vector2d, double z=DEFAULT_Z_VALUE_BALL)
 Function to convert travesim::Vector2D to geometry_msgs::Point. More...
 
gazebo_msgs::ModelState travesim::converter::EntityState_to_ModelState (EntityState *entity_state, double z=DEFAULT_Z_VALUE_BALL)
 Function to convert travesim::EntityState to gazebo_msgs::ModelState. More...
 
gazebo_msgs::ModelState travesim::converter::RobotState_to_ModelState (RobotState *robot_state, double z=DEFAULT_Z_VALUE_ROBOT)
 Function to convert travesim::RobotState to gazebo_msgs::ModelState. More...
 
travesim::FieldState travesim::converter::ModelStates_to_FieldState (gazebo_msgs::ModelStates::ConstPtr model_states, TeamsFormation teams_formation)
 Function to convert gazebo_msgs::ModelStates to travesim::FieldState. More...
 

Detailed Description

Collection of data converters between ROS and local formats.

Author
Felipe Gomes de Melo felip.nosp@m.e.go.nosp@m.mes@t.nosp@m.hund.nosp@m.eratz.nosp@m..org
Lucas Haug lucas.nosp@m..hau.nosp@m.g@thu.nosp@m.nder.nosp@m.atz.o.nosp@m.rg
Date
06/2021

Definition in file ros_side.hpp.

Macro Definition Documentation

◆ BALL_NAME

#define BALL_NAME   "vss_ball"

Definition at line 35 of file ros_side.hpp.

◆ DEFAULT_ENTITY_NAME

#define DEFAULT_ENTITY_NAME   BALL_NAME

Definition at line 37 of file ros_side.hpp.

◆ DEFAULT_REFERENCE_FRAME

#define DEFAULT_REFERENCE_FRAME   "world"

Definition at line 38 of file ros_side.hpp.

◆ DEFAULT_Z_VALUE_BALL

#define DEFAULT_Z_VALUE_BALL   0.032

Definition at line 30 of file ros_side.hpp.

◆ DEFAULT_Z_VALUE_ROBOT

#define DEFAULT_Z_VALUE_ROBOT   0.012

Definition at line 31 of file ros_side.hpp.

◆ ROBOT_NAME

#define ROBOT_NAME (   color,
  num 
)    color "_team/robot_" + std::to_string(num)

Definition at line 33 of file ros_side.hpp.