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 
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("~");
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 
int main(int argc, char **argv)
Definition: main.cpp:14
bool loadWaypointsAndTrajectoriesFromYaml(const std::string &filename, yocs_msgs::WaypointList &wps, yocs_msgs::TrajectoryList &trajs)
Definition: yaml_parser.cpp:7
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
#define ROS_INFO(...)
bool getParam(const std::string &key, std::string &s) const
#define ROS_ERROR(...)


yocs_waypoint_provider
Author(s): Jihoon Lee
autogenerated on Mon Jun 10 2019 15:54:09