Main Page
Classes
Files
File List
File Members
src
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
{
18
ROS_ERROR_STREAM
(
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
}
ros::NodeHandle
ros::init
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ROS_INFO
#define ROS_INFO(...)
ros::NodeHandle::param
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
udp_listener.h
ros::spin
ROSCPP_DECL void spin()
ros.h
UDPListener
Definition:
udp_listener.h:6
ROS_ERROR_STREAM
#define ROS_ERROR_STREAM(args)
main
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