8 #ifndef _GAMS_UTILITY_ROS_ROS_PARSER_ 9 #define _GAMS_UTILITY_ROS_ROS_PARSER_ 11 #include "madara/knowledge/KnowledgeBase.h" 12 #include "madara/knowledge/containers/NativeDoubleVector.h" 13 #include "madara/knowledge/containers/NativeIntegerVector.h" 14 #include "madara/knowledge/containers/Double.h" 15 #include "madara/knowledge/containers/String.h" 16 #include "madara/knowledge/containers/Integer.h" 17 #include "madara/knowledge/containers/StringVector.h" 23 #pragma GCC diagnostic push 24 #pragma GCC diagnostic ignored "-Wpedantic" 25 #pragma GCC diagnostic ignored "-Wreorder" 29 #include "ros/serialization.h" 30 #include "rosbag/bag.h" 31 #include "rosbag/view.h" 32 #include "rosbag/message_instance.h" 33 #include <ros_type_introspection/ros_introspection.hpp> 34 #include <topic_tools/shape_shifter.h> 36 #include <tf/transform_datatypes.h> 38 #include <geometry_msgs/Quaternion.h> 39 #include <geometry_msgs/Twist.h> 40 #include <geometry_msgs/Pose.h> 41 #include <nav_msgs/Odometry.h> 42 #include <sensor_msgs/Imu.h> 43 #include <sensor_msgs/LaserScan.h> 44 #include <sensor_msgs/CompressedImage.h> 45 #include <sensor_msgs/PointCloud2.h> 46 #include <sensor_msgs/Range.h> 47 #include <sensor_msgs/FluidPressure.h> 48 #include <geometry_msgs/TransformStamped.h> 49 #include <tf2_msgs/TFMessage.h> 50 #include <std_msgs/String.h> 51 #include <std_msgs/Int32.h> 54 #pragma GCC diagnostic pop 57 namespace logger = madara::logger;
58 namespace knowledge = madara::knowledge;
59 namespace containers = knowledge::containers;
70 RosParser (knowledge::KnowledgeBase * kb, std::string world_frame,
71 std::string base_frame,
74 std::string container_name);
75 void parse_message (
const topic_tools::ShapeShifter::ConstPtr& m,
76 std::string container_name);
80 RosIntrospection::ROSType type, std::string definition);
82 std::string container_name);
86 std::string container_name);
88 std::string container_name);
90 std::string container_name);
92 containers::NativeDoubleVector *orientation);
94 containers::NativeDoubleVector *point);
96 std::string container_name);
98 containers::NativeDoubleVector *target);
100 std::string container_name);
102 std::string container_name);
104 std::string container_name);
106 std::string container_name);
109 std::string container_name);
114 containers::NativeDoubleVector *target);
116 containers::NativeDoubleVector *target);
121 containers::NativeIntegerVector *target);
124 containers::NativeIntegerVector *target);
152 #endif // _GAMS_ROS_TOPIC_PARSER_ void parse_int_array(boost::array< int, N > *array, containers::NativeIntegerVector *target)
RosParser(knowledge::KnowledgeBase *kb, std::string world_frame, std::string base_frame, std::string frame_prefix=gams::pose::ReferenceFrame::default_prefix())
std::string frame_prefix_
void parse_twist(geometry_msgs::Twist *twist, std::string container_name)
void parse_unknown(const rosbag::MessageInstance m, std::string container_name)
void parse_pose(geometry_msgs::Pose *pose, std::string container_name)
void registerMessageDefinition(std::string topic_name, RosIntrospection::ROSType type, std::string definition)
void parse_laserscan(sensor_msgs::LaserScan *laser, std::string container_name)
std::map< std::string, RosIntrospection::RenamedValues > renamed_vectors_
void parse_pointcloud2(sensor_msgs::PointCloud2 *pointcloud, std::string container_name)
std::string ros_to_gams_name(std::string ros_topic_name)
std::vector< uint8_t > parser_buffer_
void parse_vector3(geometry_msgs::Vector3 *vec, containers::NativeDoubleVector *target)
void parse_imu(sensor_msgs::Imu *imu, std::string container_name)
void parse_message(const rosbag::MessageInstance m, std::string container_name)
std::map< std::string, RosIntrospection::FlatMessage > flat_containers_
void parse_point(geometry_msgs::Point *point_msg, containers::NativeDoubleVector *point)
static const std::string & default_prefix()
Return the default prefix for load/save operations.
void parse_tf_message(tf2_msgs::TFMessage *tf)
void parse_quaternion(geometry_msgs::Quaternion *quat, containers::NativeDoubleVector *orientation)
knowledge::EvalSettings eval_settings_
Contains all GAMS-related tools, classes and code.
void parse_float64_array(boost::array< double, N > *array, containers::NativeDoubleVector *target)
knowledge::KnowledgeBase * knowledge_
void parse_fluidpressure(sensor_msgs::FluidPressure *press, std::string container_name)
gams::pose::Pose Pose
Represents a combination of Location and Orientation within a single reference frame.
gams::pose::Quaternion Quaternion
Used internally to implement angle operations.
RosIntrospection::Parser parser_
void parse_odometry(nav_msgs::Odometry *odom, std::string container_name)
void parse_range(sensor_msgs::Range *range, std::string container_name)
void parse_compressed_image(sensor_msgs::CompressedImage *img, std::string container_name)