message_traits.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <grid_map_msgs/GridMap.h>
4 #include <grid_map_msgs/GridMap.h>
5 
6 namespace ros {
7 namespace message_traits {
8 
9 template<>
10 struct HasHeader<grid_map_msgs::GridMap> : public TrueType {};
11 
12 template <>
13 struct Header<grid_map_msgs::GridMap, typename boost::enable_if<HasHeader<grid_map_msgs::GridMap>>::type>
14 {
15  static std_msgs::Header* pointer(grid_map_msgs::GridMap& m)
16  {
17  return &m.info.header;
18  }
19 
20  static std_msgs::Header const* pointer(const grid_map_msgs::GridMap& m)
21  {
22  return &m.info.header;
23  }
24 };
25 
26 template<>
27 struct FrameId<grid_map_msgs::GridMap, typename boost::enable_if<HasHeader<grid_map_msgs::GridMap>>::type>
28 {
29  static std::string* pointer(grid_map_msgs::GridMap& m)
30  {
31  return &m.info.header.frame_id;
32  }
33 
34  static std::string const* pointer(const grid_map_msgs::GridMap& m)
35  {
36  return &m.info.header.frame_id;
37  }
38 
39  static std::string value(const grid_map_msgs::GridMap& m)
40  {
41  return m.info.header.frame_id;
42  }
43 };
44 
45 template<>
46 struct TimeStamp<grid_map_msgs::GridMap, typename boost::enable_if<HasHeader<grid_map_msgs::GridMap>>::type>
47 {
48  static ros::Time* pointer(grid_map_msgs::GridMap& m)
49  {
50  return &m.info.header.stamp;
51  }
52 
53  static ros::Time const* pointer(const grid_map_msgs::GridMap& m)
54  {
55  return &m.info.header.stamp;
56  }
57 
58  static ros::Time value(const grid_map_msgs::GridMap& m)
59  {
60  return m.info.header.stamp;
61  }
62 };
63 
64 }
65 }


grid_map_ros
Author(s): Péter Fankhauser
autogenerated on Tue Jun 25 2019 20:02:19