8 if (std::isnan(origin.x()) || std::isnan(origin.y()) || std::isnan(origin.z()))
14 if (std::isnan(rotation.getAngle()))
19 auto rotationAxis = rotation.
getAxis();
20 if (std::isnan(rotationAxis.x()) || std::isnan(rotationAxis.y()) || std::isnan(rotationAxis.z()))
38 node[itmTranslation][0] = origin.
x() * 1000;
41 node[itmTranslation][1] = origin.y() * 1000;
42 node[itmTranslation][2] = origin.z() * 1000;
45 node[itmRotation][itmAngle] = rotation.
getAngle();
47 auto rotationAxis = rotation.getAxis();
48 node[itmRotation][itmAxis][0] = rotationAxis.x();
49 node[itmRotation][itmAxis][1] = rotationAxis.y();
50 node[itmRotation][itmAxis][2] = rotationAxis.z();
55 node[itmTranslation][0] = 0;
56 node[itmTranslation][1] = 0;
57 node[itmTranslation][2] = 0;
59 node[itmRotation][itmAngle] = 0;
60 node[itmRotation][itmAxis][0] = 1;
61 node[itmRotation][itmAxis][1] = 0;
62 node[itmRotation][itmAxis][2] = 0;
71 origin.
setX(node[itmTranslation][0].asDouble() / 1000);
76 origin.
setY(node[itmTranslation][1].asDouble() / 1000);
77 origin.
setZ(node[itmTranslation][2].asDouble() / 1000);
80 tf::Vector3 rotationAxis(node[itmRotation][itmAxis][0].asDouble(), node[itmRotation][itmAxis][1].asDouble(),
81 node[itmRotation][itmAxis][2].asDouble());
82 tf::Quaternion rotation(rotationAxis, node[itmRotation][itmAngle].asDouble());
97 poseMsgToTF(pose.pose, transform);
98 transform.
stamp_ = pose.header.stamp;
99 transform.
frame_id_ = pose.header.frame_id;
bool poseIsValid(const tf::Pose &pose)
tfScalar getAngle() const
tf::StampedTransform transformFromPose(geometry_msgs::PoseStamped const &pose, std::string const &childFrame)
TFSIMD_FORCE_INLINE void setX(tfScalar x)
TFSIMD_FORCE_INLINE void setY(tfScalar y)
TFSIMD_FORCE_INLINE void setZ(tfScalar z)
TFSIMD_FORCE_INLINE const tfScalar & x() const
tf::Pose poseFromNxLib(NxLibItem const &node)
void writePoseToNxLib(tf::Pose const &pose, NxLibItem const &node)