Robowflex
v0.1
Making MoveIt Easy
|
Collection of methods relating to transforms and transform math. More...
Functions | |
RobotPose | identity () |
Creates the Identity pose. More... | |
RobotPose | createPoseXYZ (double x, double y, double z) |
Creates a robot pose from a linear component and zero orientation. More... | |
RobotPose | createPoseXYZ (const Eigen::Ref< const Eigen::Vector3d > &translation) |
Creates a robot pose from a linear component and zero orientation. More... | |
RobotPose | createPoseXYZ (double x, double y, double z, double X, double Y, double Z) |
Creates a robot pose from a linear component and XYZ convention Euler angles. More... | |
RobotPose | createPoseXYZ (const Eigen::Ref< const Eigen::Vector3d > &translation, const Eigen::Ref< const Eigen::Vector3d > &rotation) |
Creates a robot pose from a linear component and XYZ convention Euler angles. More... | |
RobotPose | createPoseQ (double x, double y, double z, double W, double X, double Y, double Z) |
Creates a robot pose from a linear component and a Quaternion. More... | |
RobotPose | createPoseQ (const Eigen::Ref< const Eigen::Vector3d > &translation, const Eigen::Ref< const Eigen::Vector4d > &rotation) |
Creates a robot pose from a linear component and a quaternion. More... | |
RobotPose | createPoseQ (const Eigen::Ref< const Eigen::Vector3d > &translation, const Eigen::Quaterniond &rotation) |
Creates a robot pose from a linear component and a quaternion. More... | |
Eigen::Quaterniond | getPoseRotation (const RobotPose &pose) |
Get the rotational component of a robot pose. More... | |
Eigen::Vector3d | pointMsgToEigen (const geometry_msgs::Point &msg) |
Converts a point message to an Eigen::Vector3d. More... | |
geometry_msgs::Point | pointEigenToMsg (const Eigen::Vector3d &vector) |
Converts an Eigen::Vector3d to a point message. More... | |
Eigen::Vector3d | vectorMsgToEigen (const geometry_msgs::Vector3 &msg) |
Converts a vector message to an Eigen::Vector3d. More... | |
geometry_msgs::Vector3 | vectorEigenToMsg (const Eigen::Vector3d &vector) |
Converts an Eigen::Vector3d to a vector message. More... | |
RobotPose | poseMsgToEigen (const geometry_msgs::Pose &msg) |
Converts a pose message to RobotPose. More... | |
geometry_msgs::Pose | poseEigenToMsg (const RobotPose &pose) |
Converts an RobotPose to a pose message. More... | |
Eigen::Quaterniond | quaternionMsgToEigen (const geometry_msgs::Quaternion &msg) |
Converts a quaternion message to Eigen::Quaterniond. More... | |
geometry_msgs::Quaternion | quaternionEigenToMsg (const Eigen::Quaterniond &quaternion) |
Converts an Eigen::Quaterniond to a quaternion message. More... | |
moveit_msgs::BoundingVolume | getBoundingVolume (const RobotPose &pose, const GeometryConstPtr &geometry) |
Get a bounding volume message for given geometry at a pose. More... | |
moveit_msgs::PositionConstraint | getPositionConstraint (const std::string &ee_name, const std::string &base_name, const RobotPose &pose, const GeometryConstPtr &geometry) |
Get a position constraint message. More... | |
Eigen::Vector3d | samplePositionConstraint (const moveit_msgs::PositionConstraint &pc) |
moveit_msgs::OrientationConstraint | getOrientationConstraint (const std::string &ee_name, const std::string &base_name, const Eigen::Quaterniond &orientation, const Eigen::Vector3d &tolerances) |
Get an orientation constraint message. More... | |
Eigen::Quaterniond | sampleOrientation (const Eigen::Quaterniond &orientation, const Eigen::Vector3d &tolerances) |
Sample an orientation from a given orientation with XYZ Euler angle tolerances. More... | |
Eigen::Quaterniond | sampleOrientationUniform (const Eigen::Vector3d &tolerances) |
Sample an orientation within the XYZ Euler angle tolerances. More... | |
Eigen::Quaterniond | offsetOrientation (const Eigen::Quaterniond &orientation, const Eigen::Vector3d &axis, double value) |
Offset an orientation by a rotation about an axis. More... | |
Eigen::Vector3d | samplePositionUniform (const Eigen::Vector3d &bounds) |
Sample a position within the given bounds using a uniform distribution. More... | |
Eigen::Vector3d | samplePositionGaussian (const Eigen::Vector3d &stddev) |
Sample a position from a gaussian distribution with mean zero and given standard deviation. More... | |
RobotPose | samplePoseUniform (const Eigen::Vector3d &pos_bounds, const Eigen::Vector3d &orn_bounds) |
Sample a pose within the given position, orientation bounds. More... | |
RobotPose | samplePoseGaussian (const Eigen::Vector3d &pos_stddev, const Eigen::Vector3d &orn_bounds) |
Sample a pose with gaussian sampling for the position with given standard deviations and uniform sampling for the orientation within the given bounds. More... | |
RobotPose | transformMsgToEigen (const geometry_msgs::TransformStamped &tf) |
Decode a message as a transform. More... | |
geometry_msgs::TransformStamped | transformEigenToMsg (const std::string &source, const std::string &target, const RobotPose &tf) |
Encode a transform as a message. More... | |
double | angleNormalize (double v) |
Normalize an angle between -pi to pi. More... | |
double | toDegrees (double v) |
Convert an angle to degrees. More... | |
double | toRadians (double v) |
Convert an angle to radians. More... | |
bool | isVecZero (const Eigen::Ref< const Eigen::VectorXd > &v, double tolerance=constants::eps) |
Checks if a vector is close to zero. More... | |
Collection of methods relating to transforms and transform math.
double robowflex::TF::angleNormalize | ( | double | v | ) |
RobotPose robowflex::TF::createPoseQ | ( | const Eigen::Ref< const Eigen::Vector3d > & | translation, |
const Eigen::Quaterniond & | rotation | ||
) |
Creates a robot pose from a linear component and a quaternion.
[in] | translation | translation component. |
[in] | rotation | rotational component. |
Definition at line 59 of file tf.cpp.
RobotPose robowflex::TF::createPoseQ | ( | const Eigen::Ref< const Eigen::Vector3d > & | translation, |
const Eigen::Ref< const Eigen::Vector4d > & | rotation | ||
) |
Creates a robot pose from a linear component and a quaternion.
[in] | translation | translation component. |
[in] | rotation | rotational component (W, X, Y, Z quaternion values). |
Definition at line 53 of file tf.cpp.
RobotPose robowflex::TF::createPoseQ | ( | double | x, |
double | y, | ||
double | z, | ||
double | W, | ||
double | X, | ||
double | Y, | ||
double | Z | ||
) |
Creates a robot pose from a linear component and a Quaternion.
[in] | x | X-axis translation. |
[in] | y | Y-axis translation. |
[in] | z | Z-axis translation. |
[in] | W | Real quaternion component. |
[in] | X | i quaternion component. |
[in] | Y | j quaternion component. |
[in] | Z | k quaternion component. |
RobotPose robowflex::TF::createPoseXYZ | ( | const Eigen::Ref< const Eigen::Vector3d > & | translation | ) |
RobotPose robowflex::TF::createPoseXYZ | ( | const Eigen::Ref< const Eigen::Vector3d > & | translation, |
const Eigen::Ref< const Eigen::Vector3d > & | rotation | ||
) |
RobotPose robowflex::TF::createPoseXYZ | ( | double | x, |
double | y, | ||
double | z | ||
) |
Creates a robot pose from a linear component and zero orientation.
[in] | x | X-axis translation. |
[in] | y | Y-ayis translation. |
[in] | z | Z-azis translation. |
Definition at line 14 of file tf.cpp.
RobotPose robowflex::TF::createPoseXYZ | ( | double | x, |
double | y, | ||
double | z, | ||
double | X, | ||
double | Y, | ||
double | Z | ||
) |
Creates a robot pose from a linear component and XYZ convention Euler angles.
[in] | x | X-axis translation. |
[in] | y | Y-ayis translation. |
[in] | z | Z-azis translation. |
[in] | X | Rotation about X. |
[in] | Y | Rotation about Y. |
[in] | Z | Rotation about Z. |
moveit_msgs::BoundingVolume robowflex::TF::getBoundingVolume | ( | const RobotPose & | pose, |
const GeometryConstPtr & | geometry | ||
) |
Get a bounding volume message for given geometry at a pose.
[in] | pose | Pose to place geometry at. |
[in] | geometry | Geometry to get bounding volume for. |
Definition at line 151 of file tf.cpp.
moveit_msgs::OrientationConstraint robowflex::TF::getOrientationConstraint | ( | const std::string & | ee_name, |
const std::string & | base_name, | ||
const Eigen::Quaterniond & | orientation, | ||
const Eigen::Vector3d & | tolerances | ||
) |
Get an orientation constraint message.
[in] | ee_name | The name of the end-effector link. |
[in] | base_name | The frame of pose and orientation. |
[in] | orientation | The desired orientation. |
[in] | tolerances | XYZ Euler angle tolerances about orientation. |
Definition at line 189 of file tf.cpp.
Eigen::Quaterniond robowflex::TF::getPoseRotation | ( | const RobotPose & | pose | ) |
moveit_msgs::PositionConstraint robowflex::TF::getPositionConstraint | ( | const std::string & | ee_name, |
const std::string & | base_name, | ||
const RobotPose & | pose, | ||
const GeometryConstPtr & | geometry | ||
) |
Get a position constraint message.
[in] | ee_name | The name of the end-effector link. |
[in] | base_name | The frame of pose and orientation. |
[in] | pose | The pose of geometry in base_frame. |
[in] | geometry | The geometry describing the position constraint. |
Definition at line 169 of file tf.cpp.
RobotPose robowflex::TF::identity | ( | ) |
bool robowflex::TF::isVecZero | ( | const Eigen::Ref< const Eigen::VectorXd > & | v, |
double | tolerance = constants::eps |
||
) |
Eigen::Quaterniond robowflex::TF::offsetOrientation | ( | const Eigen::Quaterniond & | orientation, |
const Eigen::Vector3d & | axis, | ||
double | value | ||
) |
Offset an orientation by a rotation about an axis.
[in] | orientation | Orientation to offset. |
[in] | axis | Axis to offset orientation about. |
[in] | value | Value by which to offset. |
geometry_msgs::Point robowflex::TF::pointEigenToMsg | ( | const Eigen::Vector3d & | vector | ) |
Eigen::Vector3d robowflex::TF::pointMsgToEigen | ( | const geometry_msgs::Point & | msg | ) |
geometry_msgs::Pose robowflex::TF::poseEigenToMsg | ( | const RobotPose & | pose | ) |
RobotPose robowflex::TF::poseMsgToEigen | ( | const geometry_msgs::Pose & | msg | ) |
Converts a pose message to RobotPose.
[in] | msg | Message to convert. |
Definition at line 114 of file tf.cpp.
geometry_msgs::Quaternion robowflex::TF::quaternionEigenToMsg | ( | const Eigen::Quaterniond & | quaternion | ) |
Converts an Eigen::Quaterniond to a quaternion message.
[in] | quaternion | Quaternion to convert. |
Eigen::Quaterniond robowflex::TF::quaternionMsgToEigen | ( | const geometry_msgs::Quaternion & | msg | ) |
Eigen::Quaterniond robowflex::TF::sampleOrientation | ( | const Eigen::Quaterniond & | orientation, |
const Eigen::Vector3d & | tolerances | ||
) |
Sample an orientation from a given orientation with XYZ Euler angle tolerances.
[in] | orientation | The desired mean orientation. |
[in] | tolerances | XYZ Euler angle tolerances about orientation. |
Definition at line 207 of file tf.cpp.
Eigen::Quaterniond robowflex::TF::sampleOrientationUniform | ( | const Eigen::Vector3d & | tolerances | ) |
Sample an orientation within the XYZ Euler angle tolerances.
[in] | tolerances | XYZ Euler angle tolerances about orientation. |
Definition at line 218 of file tf.cpp.
RobotPose robowflex::TF::samplePoseGaussian | ( | const Eigen::Vector3d & | pos_stddev, |
const Eigen::Vector3d & | orn_bounds | ||
) |
Sample a pose with gaussian sampling for the position with given standard deviations and uniform sampling for the orientation within the given bounds.
[in] | pos_stddev | The desired position standard deviations. |
[in] | orn_bounds | The desired orientation bounds. |
Definition at line 253 of file tf.cpp.
RobotPose robowflex::TF::samplePoseUniform | ( | const Eigen::Vector3d & | pos_bounds, |
const Eigen::Vector3d & | orn_bounds | ||
) |
Sample a pose within the given position, orientation bounds.
[in] | pos_bounds | The desired position bounds. |
[in] | orn_bounds | The desired orientation bounds. |
Definition at line 244 of file tf.cpp.
Eigen::Vector3d robowflex::TF::samplePositionConstraint | ( | const moveit_msgs::PositionConstraint & | pc | ) |
Eigen::Vector3d robowflex::TF::samplePositionGaussian | ( | const Eigen::Vector3d & | stddev | ) |
Sample a position from a gaussian distribution with mean zero and given standard deviation.
[in] | stddev | The desired standard deviation for the position. |
Definition at line 239 of file tf.cpp.
Eigen::Vector3d robowflex::TF::samplePositionUniform | ( | const Eigen::Vector3d & | bounds | ) |
Sample a position within the given bounds using a uniform distribution.
[in] | bounds | The desired mean orientation. |
double robowflex::TF::toDegrees | ( | double | v | ) |
Convert an angle to degrees.
[in] | v | The angle in radians. |
Definition at line 298 of file tf.cpp.
double robowflex::TF::toRadians | ( | double | v | ) |
geometry_msgs::TransformStamped robowflex::TF::transformEigenToMsg | ( | const std::string & | source, |
const std::string & | target, | ||
const RobotPose & | tf | ||
) |
RobotPose robowflex::TF::transformMsgToEigen | ( | const geometry_msgs::TransformStamped & | tf | ) |
geometry_msgs::Vector3 robowflex::TF::vectorEigenToMsg | ( | const Eigen::Vector3d & | vector | ) |
Eigen::Vector3d robowflex::TF::vectorMsgToEigen | ( | const geometry_msgs::Vector3 & | msg | ) |