17 #ifndef MESSAGES_UTILITY_H
18 #define MESSAGES_UTILITY_H
24 #include "gazebo/msgs/MessageTypes.hh"
50 const std::string &_data =
"");
55 void Init(google::protobuf::Message &_message,
const std::string &_id =
"");
59 void Stamp(msgs::Header *_header);
63 void Stamp(msgs::Time *_time);
66 std::string Package(
const std::string &type,
67 const google::protobuf::Message &message);
73 msgs::Vector3d
Convert(
const math::Vector3 &_v);
78 msgs::Quaternion
Convert(
const math::Quaternion &_q);
83 msgs::Pose
Convert(
const math::Pose &_p);
88 msgs::Color
Convert(
const common::Color &_c);
93 msgs::Time
Convert(
const common::Time &_t);
98 msgs::PlaneGeom
Convert(
const math::Plane &_p);
103 math::Vector3
Convert(
const msgs::Vector3d &_v);
108 math::Quaternion
Convert(
const msgs::Quaternion &_q);
113 math::Pose
Convert(
const msgs::Pose &_p);
118 void Set(common::Image &_img,
const msgs::Image &_msg);
123 common::Color
Convert(
const msgs::Color &_c);
128 common::Time
Convert(
const msgs::Time &_t);
133 math::Plane
Convert(
const msgs::PlaneGeom &_p);
138 void Set(msgs::Image *_msg,
const common::Image &_i);
143 void Set(msgs::Vector3d *_pt,
const math::Vector3 &_v);
148 void Set(msgs::Vector2d *_pt,
const math::Vector2d &_v);
153 void Set(msgs::Quaternion *_q,
const math::Quaternion &_v);
158 void Set(msgs::Pose *_p,
const math::Pose &_v);
163 void Set(msgs::Color *_c,
const common::Color &_v);
168 void Set(msgs::Time *_t,
const common::Time &_v);
173 void Set(msgs::PlaneGeom *_p,
const math::Plane &_v);
216 const google::protobuf::FieldDescriptor *GetFD(
217 google::protobuf::Message &message,
const std::string &name);
223 msgs::Header *
GetHeader(google::protobuf::Message &_message);