#include <ros/ros.h>
#include <protobuf_comm/peer.h>
#include <llsf_msgs/BeaconSignal.pb.h>
#include <llsf_msgs/VersionInfo.pb.h>
#include <llsf_msgs/GameState.pb.h>
#include <llsf_msgs/MachineInfo.pb.h>
#include <llsf_msgs/RobotInfo.pb.h>
#include <llsf_msgs/ExplorationInfo.pb.h>
#include <llsf_msgs/MachineReport.pb.h>
#include <llsf_msgs/OrderInfo.pb.h>
#include <llsf_msgs/RingInfo.pb.h>
#include <llsf_msgs/MachineInstructions.pb.h>
#include <rcll_ros_msgs/BeaconSignal.h>
#include <rcll_ros_msgs/GameState.h>
#include <rcll_ros_msgs/Team.h>
#include <rcll_ros_msgs/MachineInfo.h>
#include <rcll_ros_msgs/ExplorationInfo.h>
#include <rcll_ros_msgs/MachineReportInfo.h>
#include <rcll_ros_msgs/OrderInfo.h>
#include <rcll_ros_msgs/RingInfo.h>
#include <rcll_ros_msgs/SendBeaconSignal.h>
#include <rcll_ros_msgs/SendMachineReport.h>
#include <rcll_ros_msgs/SendPrepareMachine.h>
#include <tf2/LinearMath/Quaternion.h>
#include <tf2/utils.h>
#include <mutex>
#include <condition_variable>
#include <chrono>
Go to the source code of this file.
#define GET_PRIV_PARAM | ( | P | ) |
{ \ if (! ros::param::get("~" #P, cfg_ ## P ## _)) { \ ROS_ERROR("Failed to retrieve parameter " #P ", aborting"); \ exit(-1); \ } \ }
Definition at line 57 of file rcll_refbox_peer_node.cpp.
void handle_message | ( | boost::asio::ip::udp::endpoint & | sender, |
uint16_t | component_id, | ||
uint16_t | msg_type, | ||
std::shared_ptr< google::protobuf::Message > | msg | ||
) |
Definition at line 142 of file rcll_refbox_peer_node.cpp.
void handle_recv_error | ( | boost::asio::ip::udp::endpoint & | endpoint, |
std::string | msg | ||
) |
Definition at line 110 of file rcll_refbox_peer_node.cpp.
void handle_send_error | ( | std::string | msg | ) |
Definition at line 117 of file rcll_refbox_peer_node.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 631 of file rcll_refbox_peer_node.cpp.
int pb_to_ros_team_color | ( | const llsf_msgs::Team & | team_color | ) |
Definition at line 124 of file rcll_refbox_peer_node.cpp.
llsf_msgs::Team ros_to_pb_team_color | ( | int | team_color | ) |
Definition at line 133 of file rcll_refbox_peer_node.cpp.
void setup_private_peer | ( | llsf_msgs::Team | team_color | ) |
Definition at line 329 of file rcll_refbox_peer_node.cpp.
bool srv_cb_send_beacon | ( | rcll_ros_msgs::SendBeaconSignal::Request & | req, |
rcll_ros_msgs::SendBeaconSignal::Response & | res | ||
) |
Definition at line 371 of file rcll_refbox_peer_node.cpp.
bool srv_cb_send_machine_report | ( | rcll_ros_msgs::SendMachineReport::Request & | req, |
rcll_ros_msgs::SendMachineReport::Response & | res | ||
) |
Definition at line 421 of file rcll_refbox_peer_node.cpp.
bool srv_cb_send_prepare_machine | ( | rcll_ros_msgs::SendPrepareMachine::Request & | req, |
rcll_ros_msgs::SendPrepareMachine::Response & | res | ||
) |
Definition at line 466 of file rcll_refbox_peer_node.cpp.
std::condition_variable cdv_machine_info_ |
Definition at line 104 of file rcll_refbox_peer_node.cpp.
std::string cfg_crypto_cipher_ |
Definition at line 73 of file rcll_refbox_peer_node.cpp.
std::string cfg_crypto_key_ |
Definition at line 72 of file rcll_refbox_peer_node.cpp.
std::string cfg_peer_address_ |
Definition at line 74 of file rcll_refbox_peer_node.cpp.
bool cfg_peer_cyan_local_ |
Definition at line 79 of file rcll_refbox_peer_node.cpp.
Definition at line 80 of file rcll_refbox_peer_node.cpp.
Definition at line 82 of file rcll_refbox_peer_node.cpp.
Definition at line 81 of file rcll_refbox_peer_node.cpp.
Definition at line 83 of file rcll_refbox_peer_node.cpp.
Definition at line 84 of file rcll_refbox_peer_node.cpp.
Definition at line 86 of file rcll_refbox_peer_node.cpp.
Definition at line 85 of file rcll_refbox_peer_node.cpp.
Definition at line 75 of file rcll_refbox_peer_node.cpp.
Definition at line 76 of file rcll_refbox_peer_node.cpp.
Definition at line 78 of file rcll_refbox_peer_node.cpp.
Definition at line 77 of file rcll_refbox_peer_node.cpp.
std::string cfg_robot_name_ |
Definition at line 69 of file rcll_refbox_peer_node.cpp.
Definition at line 70 of file rcll_refbox_peer_node.cpp.
int cfg_team_color_ |
Definition at line 71 of file rcll_refbox_peer_node.cpp.
std::string cfg_team_name_ |
Definition at line 68 of file rcll_refbox_peer_node.cpp.
std::shared_ptr<MachineInfo> msg_machine_info_ |
Definition at line 105 of file rcll_refbox_peer_node.cpp.
std::mutex mtx_machine_info_ |
Definition at line 103 of file rcll_refbox_peer_node.cpp.
ProtobufBroadcastPeer* peer_private_ = NULL |
Definition at line 101 of file rcll_refbox_peer_node.cpp.
ProtobufBroadcastPeer* peer_public_ = NULL |
Definition at line 100 of file rcll_refbox_peer_node.cpp.
Definition at line 88 of file rcll_refbox_peer_node.cpp.
Definition at line 91 of file rcll_refbox_peer_node.cpp.
Definition at line 89 of file rcll_refbox_peer_node.cpp.
Definition at line 90 of file rcll_refbox_peer_node.cpp.
Definition at line 92 of file rcll_refbox_peer_node.cpp.
Definition at line 93 of file rcll_refbox_peer_node.cpp.
Definition at line 94 of file rcll_refbox_peer_node.cpp.
Definition at line 96 of file rcll_refbox_peer_node.cpp.
Definition at line 97 of file rcll_refbox_peer_node.cpp.
Definition at line 98 of file rcll_refbox_peer_node.cpp.