Robowflex  v0.1
Making MoveIt Easy
adapter.h
Go to the documentation of this file.
1 /* Author: Zachary Kingston */
2 
3 #ifndef ROBOWFLEX_ADAPTER_
4 #define ROBOWFLEX_ADAPTER_
5 
6 #include <type_traits>
7 
8 #include <Eigen/Geometry>
9 #include <Eigen/StdVector>
10 
11 #include <moveit/transforms/transforms.h>
12 
13 namespace robowflex
14 {
15  /** \brief A pose (point in SE(3)) used in various functions. Defined from what \e MoveIt! uses.
16  *
17  * Either an Eigen::Affine3d or Eigen::Isometry3d. These are both transforms, and thus code using a
18  * RobotPose will generally work for both.
19  */
20  using RobotPose = std::decay< //
21  decltype( //
22  std::declval<moveit::core::Transforms>().getTransform("") //
23  ) //
24  >::type;
25 
26  /** \brief A vector of poses.
27  */
29 
30  /** \brief Convert the Robowflex pose type to another transform type.
31  */
32  template <typename M>
33  M toMatrix(const RobotPose &pose)
34  {
35  M newpose;
36  newpose.matrix() = pose.matrix();
37  return newpose;
38  }
39 } // namespace robowflex
40 
41 #endif
Main namespace. Contains all library classes and functions.
Definition: scene.cpp:25
M toMatrix(const RobotPose &pose)
Convert the Robowflex pose type to another transform type.
Definition: adapter.h:33
std::decay< decltype(std::declval< moveit::core::Transforms >().getTransform("")) >::type RobotPose
A pose (point in SE(3)) used in various functions. Defined from what MoveIt! uses.
Definition: adapter.h:24