19 #ifndef MAV_PLANNING_MSGS_CONVERSIONS_DEPRECATED_H 20 #define MAV_PLANNING_MSGS_CONVERSIONS_DEPRECATED_H 22 #include <geometry_msgs/Point.h> 23 #include <geometry_msgs/Quaternion.h> 24 #include <geometry_msgs/Vector3.h> 26 #include "mav_planning_msgs/PolynomialSegment4D.h" 27 #include "mav_planning_msgs/PolynomialTrajectory4D.h" 38 PolynomialSegment4D::_x_type* array);
43 assert(segment != NULL);
56 const PolynomialTrajectory4D& msg,
58 assert(eigen_trajectory != NULL);
59 eigen_trajectory->clear();
60 eigen_trajectory->reserve(msg.segments.size());
61 for (PolynomialTrajectory4D::_segments_type::const_iterator it =
63 it != msg.segments.end(); ++it) {
66 eigen_trajectory->push_back(segment);
74 PolynomialSegment4D* msg) {
89 PolynomialTrajectory4D* msg) {
91 msg->segments.reserve(eigen_trajectory.size());
92 for (EigenPolynomialTrajectory::const_iterator it = eigen_trajectory.begin();
93 it != eigen_trajectory.end(); ++it) {
94 PolynomialSegment4D segment;
96 msg->segments.push_back(segment);
102 #endif // MAV_PLANNING_MSGS_CONVERSIONS_DEPRECATED_H void polynomialTrajectoryMsgFromEigen(const EigenPolynomialTrajectory &eigen_trajectory, PolynomialTrajectory *msg)
void vectorFromMsgArray(const PolynomialSegment::_x_type &array, Eigen::VectorXd *x)
Converts a PolynomialSegment double array to an Eigen::VectorXd.
void eigenPolynomialSegmentFromMsg(const PolynomialSegment &msg, EigenPolynomialSegment *segment)
Converts a PolynomialSegment message to an EigenPolynomialSegment structure.
void eigenPolynomialTrajectoryFromMsg(const PolynomialTrajectory &msg, EigenPolynomialTrajectory *eigen_trajectory)
Converts a PolynomialTrajectory message to a EigenPolynomialTrajectory.
std::vector< EigenPolynomialSegment > EigenPolynomialTrajectory
void polynomialSegmentMsgFromEigen(const EigenPolynomialSegment &segment, PolynomialSegment *msg)
void msgArrayFromVector(const Eigen::VectorXd &x, PolynomialSegment::_x_type *array)
Converts an Eigen::VectorXd to a PolynomialSegment double array.