17 #ifndef GAZEBO_PHYSICS_DART_DARTTYPES_HH_ 
   18 #define GAZEBO_PHYSICS_DART_DARTTYPES_HH_ 
   20 #include <boost/shared_ptr.hpp> 
   21 #include <ignition/math/Pose3.hh> 
   22 #include <ignition/math/Quaternion.hh> 
   23 #include <ignition/math/Vector3.hh> 
   54       std::shared_ptr<dart::dynamics::BodyNode::Properties>;
 
   56       std::shared_ptr<dart::dynamics::Joint::Properties>;
 
   70           const ignition::math::Vector3d &_vec3)
 
   72         return Eigen::Vector3d(_vec3.X(), _vec3.Y(), _vec3.Z());
 
   79                   const Eigen::Vector3d &_vec3)
 
   81         return ignition::math::Vector3d(_vec3.x(), _vec3.y(), _vec3.z());
 
   88           const ignition::math::Quaterniond &_quat)
 
   90         return Eigen::Quaterniond(_quat.W(), _quat.X(), _quat.Y(), _quat.Z());
 
   97                   const Eigen::Quaterniond &_quat)
 
   99         return ignition::math::Quaterniond(
 
  100             _quat.w(), _quat.x(), _quat.y(), _quat.z());
 
  105           const ignition::math::Pose3d &_pose)
 
  111           Eigen::Isometry3d res = Eigen::Isometry3d::Identity();
 
  113           res.translation() = ConvVec3(_pose.Pos());
 
  114           res.linear() = Eigen::Matrix3d(ConvQuat(_pose.Rot()));
 
  123                   const Eigen::Isometry3d &_T)
 
  125         ignition::math::Pose3d pose;
 
  126         pose.Pos() = ConvVec3Ign(_T.translation());
 
  127         pose.Rot() = ConvQuatIgn(Eigen::Quaterniond(_T.linear()));
 
  140                   "Zero thread pitch is not allowed.\n");
 
  142         return -2.0 * M_PI / _pitch;
 
boost::shared_ptr< DARTJoint > DARTJointPtr
Definition: DARTTypes.hh:48
 
static ignition::math::Quaterniond ConvQuatIgn(const Eigen::Quaterniond &_quat)
Convert eigen quaternion to ignition quaternion. 
Definition: DARTTypes.hh:96
 
#define GZ_ASSERT(_expr, _msg)
This macro define the standard way of launching an exception inside gazebo. 
Definition: Assert.hh:24
 
static Eigen::Quaterniond ConvQuat(const ignition::math::Quaterniond &_quat)
Convert ignition quaternion to eigen quaternion. 
Definition: DARTTypes.hh:87
 
static Eigen::Isometry3d ConvPose(const ignition::math::Pose3d &_pose)
Definition: DARTTypes.hh:104
 
boost::shared_ptr< DARTModel > DARTModelPtr
Definition: DARTTypes.hh:46
 
static double InvertThreadPitch(double _pitch)
Invert thread pitch to match the different definitions of thread pitch in Gazebo and DART...
Definition: DARTTypes.hh:137
 
static ignition::math::Vector3d ConvVec3Ign(const Eigen::Vector3d &_vec3)
Convert eigen vector3d to ignition math vector3d. 
Definition: DARTTypes.hh:78
 
DART surface parameters. 
Definition: DARTSurfaceParams.hh:38
 
boost::shared_ptr< DARTLink > DARTLinkPtr
Definition: DARTTypes.hh:47
 
static Eigen::Vector3d ConvVec3(const ignition::math::Vector3d &_vec3)
Convert ignition math vector3d to eigen vector3d. 
Definition: DARTTypes.hh:69
 
boost::shared_ptr< DARTRayShape > DARTRayShapePtr
Definition: DARTTypes.hh:50
 
boost::shared_ptr< DARTPhysics > DARTPhysicsPtr
Definition: DARTTypes.hh:43
 
std::shared_ptr< dart::dynamics::BodyNode::Properties > DARTBodyNodePropPtr
Definition: DARTTypes.hh:54
 
std::shared_ptr< dart::dynamics::Joint::Properties > DARTJointPropPtr
Definition: DARTTypes.hh:56
 
boost::shared_ptr< DARTCollision > DARTCollisionPtr
Definition: DARTTypes.hh:49
 
boost::shared_ptr< DARTSurfaceParams > DARTSurfaceParamsPtr
Definition: DARTTypes.hh:51
 
static ignition::math::Pose3d ConvPoseIgn(const Eigen::Isometry3d &_T)
Convert eigen iosmetry3d to ignition math pose3d. 
Definition: DARTTypes.hh:122
 
A set of functions for converting between the math types used by gazebo and dart. ...
Definition: DARTTypes.hh:64