yaml_parser.hpp
Go to the documentation of this file.
00001 /*
00002    Waypoint yaml parser
00003 
00004    LICENSE : BSD - https://raw.github.com/yujinrobot/yujin_ocs/license/LICENSE
00005 
00006    Author : Jihoon Lee
00007    Date   : Dec 2013
00008  */
00009 
00010 #ifndef _YOCS_WAYPOINT_MANAGER_YAML_PARSER_HPP_
00011 #define _YOCS_WAYPOINT_MANAGER_YAML_PARSER_HPP_
00012 
00013 #include <fstream>
00014 #include <ros/ros.h>
00015 #include <yaml-cpp/yaml.h>
00016 #include <yocs_msgs/TrajectoryList.h>
00017 #include <yocs_msgs/WaypointList.h>
00018 
00019 #ifdef HAVE_NEW_YAMLCPP
00020 // The >> operator disappeared in yaml-cpp 0.5, so this function is
00021 // added to provide support for code written under the yaml-cpp 0.3 API.
00022 template<typename T>
00023 void operator >> (const YAML::Node& node, T& i)
00024 {
00025   i = node.as<T>();
00026 }
00027 #endif
00028 
00029 
00030 namespace yocs {
00031   bool loadWaypointsAndTrajectoriesFromYaml(const std::string& filename,
00032                                             yocs_msgs::WaypointList& wps,
00033                                             yocs_msgs::TrajectoryList& trajs);
00034   void getYamlNode(const std::string& filename, YAML::Node& node);
00035   void parseWaypoints(const YAML::Node& node, yocs_msgs::WaypointList& wps);
00036   void parseTrajectories(const YAML::Node& node, const yocs_msgs::WaypointList& wps, yocs_msgs::TrajectoryList& trajs);
00037 }
00038 
00039 #endif


yocs_waypoint_provider
Author(s): Jihoon Lee
autogenerated on Thu Jun 6 2019 21:47:44