yaml_parser.hpp
Go to the documentation of this file.
1 /*
2  Waypoint yaml parser
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 #ifndef _YOCS_WAYPOINT_MANAGER_YAML_PARSER_HPP_
11 #define _YOCS_WAYPOINT_MANAGER_YAML_PARSER_HPP_
12 
13 #include <fstream>
14 #include <ros/ros.h>
15 #include <yaml-cpp/yaml.h>
16 #include <yocs_msgs/TrajectoryList.h>
17 #include <yocs_msgs/WaypointList.h>
18 
19 #ifdef HAVE_NEW_YAMLCPP
20 // The >> operator disappeared in yaml-cpp 0.5, so this function is
21 // added to provide support for code written under the yaml-cpp 0.3 API.
22 template<typename T>
23 void operator >> (const YAML::Node& node, T& i)
24 {
25  i = node.as<T>();
26 }
27 #endif
28 
29 
30 namespace yocs {
31  bool loadWaypointsAndTrajectoriesFromYaml(const std::string& filename,
32  yocs_msgs::WaypointList& wps,
33  yocs_msgs::TrajectoryList& trajs);
34  void getYamlNode(const std::string& filename, YAML::Node& node);
35  void parseWaypoints(const YAML::Node& node, yocs_msgs::WaypointList& wps);
36  void parseTrajectories(const YAML::Node& node, const yocs_msgs::WaypointList& wps, yocs_msgs::TrajectoryList& trajs);
37 }
38 
39 #endif
bool loadWaypointsAndTrajectoriesFromYaml(const std::string &filename, yocs_msgs::WaypointList &wps, yocs_msgs::TrajectoryList &trajs)
Definition: yaml_parser.cpp:7
void getYamlNode(const std::string &filename, YAML::Node &node)
Definition: yaml_parser.cpp:40
void parseTrajectories(const YAML::Node &node, const yocs_msgs::WaypointList &wps, yocs_msgs::TrajectoryList &trajs)
Definition: yaml_parser.cpp:92
void parseWaypoints(const YAML::Node &node, yocs_msgs::WaypointList &wps)
Definition: yaml_parser.cpp:56


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