Main Page
Namespaces
Classes
Files
File List
File Members
src
main.cpp
Go to the documentation of this file.
1
/*
2
Way point Manager
3
4
LICENSE : BSD - https://raw.github.com/yujinrobot/yujin_ocs/license/LICENSE
5
6
Author : Jihoon Lee
7
Date : Dec 2013
8
*/
9
10
#include "
yocs_waypoint_provider/waypoint_provider.hpp
"
11
#include "
yocs_waypoint_provider/yaml_parser.hpp
"
12
#include <yocs_msgs/WaypointList.h>
13
14
int
main
(
int
argc,
char
** argv)
15
{
16
ros::init
(argc, argv,
"waypoint_provider"
);
17
ros::NodeHandle
priv_n(
"~"
);
18
ros::NodeHandle
n;
19
yocs::WaypointProvider
* wm;
20
yocs_msgs::WaypointList wps;
21
yocs_msgs::TrajectoryList trajs;
22
std::string filename;
23
24
if
(!priv_n.
getParam
(
"filename"
, filename)) {
25
ROS_ERROR
(
"Waypoint Provider : filename argument is not set"
);
26
return
-1;
27
}
28
29
if
(!
yocs::loadWaypointsAndTrajectoriesFromYaml
(filename, wps, trajs))
30
{
31
ROS_ERROR
(
"Waypoint Provider : Failed to parse yaml[%s]"
,filename.c_str());
32
return
-1;
33
}
34
35
wm =
new
yocs::WaypointProvider
(n, wps, trajs);
36
37
ROS_INFO
(
"Waypoint Provider : Initialized"
);
38
wm->
spin
();
39
ROS_INFO
(
"Waypoint Provider : Bye Bye"
);
40
41
delete
wm;
42
43
return
0;
44
}
45
ros::NodeHandle
waypoint_provider.hpp
main
int main(int argc, char **argv)
Definition:
main.cpp:14
yocs::loadWaypointsAndTrajectoriesFromYaml
bool loadWaypointsAndTrajectoriesFromYaml(const std::string &filename, yocs_msgs::WaypointList &wps, yocs_msgs::TrajectoryList &trajs)
Definition:
yaml_parser.cpp:7
ros::init
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
yocs::WaypointProvider
Definition:
waypoint_provider.hpp:33
ROS_INFO
#define ROS_INFO(...)
yaml_parser.hpp
ros::NodeHandle::getParam
bool getParam(const std::string &key, std::string &s) const
ROS_ERROR
#define ROS_ERROR(...)
yocs::WaypointProvider::spin
void spin()
Definition:
waypoint_provider.cpp:164
yocs_waypoint_provider
Author(s): Jihoon Lee
autogenerated on Mon Jun 10 2019 15:54:09