main.cpp
Go to the documentation of this file.
1 #include "udp_listener.h"
2 #include <ros/ros.h>
3 
4 int main(int argc, char* argv[])
5 {
6  ros::init(argc, argv, "ixblue_ins_driver");
7  ros::NodeHandle nh("~");
8 
9  std::string ip;
10  int udp_port;
11  nh.param("udp_port", udp_port, 8200);
12  nh.param("ip", ip, std::string("0.0.0.0"));
13  ROS_INFO("UDP port : %d", udp_port);
14  ROS_INFO("IP adress : %s", ip.c_str());
15 
16  if(udp_port > std::numeric_limits<uint16_t>::max())
17  {
19  "UDP Port can't be greater than : " << std::numeric_limits<uint16_t>::max());
20  return -1;
21  }
22 
23  UDPListener udpListener(ip, static_cast<uint16_t>(udp_port));
24 
25  ros::spin();
26  return 0;
27 }
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
#define ROS_INFO(...)
bool param(const std::string &param_name, T &param_val, const T &default_val) const
ROSCPP_DECL void spin()
#define ROS_ERROR_STREAM(args)
int main(int argc, char *argv[])
Definition: main.cpp:4


ixblue_ins_driver
Author(s): Adrien BARRAL , Laure LE BRETON
autogenerated on Wed Jan 27 2021 03:37:01