A planar joint. More...
#include <planar_joint_model.h>
Public Member Functions | |
virtual void | computeJointStateValues (const Eigen::Affine3d &transf, std::vector< double > &joint_values) const |
Given the transform generated by joint, compute the corresponding joint values. | |
virtual void | computeTransform (const std::vector< double > &joint_values, Eigen::Affine3d &transf) const |
Given the joint values for a joint, compute the corresponding transform. | |
virtual double | distance (const std::vector< double > &values1, const std::vector< double > &values2) const |
Compute the distance between two joint states of the same model (represented by the variable values) | |
virtual void | enforceBounds (std::vector< double > &values, const Bounds &other_bounds) const |
Force the specified values to be inside bounds and normalized. Quaternions are normalized, continuous joints are made between -Pi and Pi. | |
double | getAngularDistanceWeight () const |
virtual double | getMaximumExtent (const Bounds &other_bounds) const |
Get the extent of the state space (the maximum value distance() can ever report) | |
virtual unsigned int | getStateSpaceDimension () const |
Get the dimension of the state space that corresponds to this joint. | |
virtual void | getVariableDefaultValues (std::vector< double > &values, const Bounds &other_bounds) const |
Provide a default value for the joint given the joint variable bounds. Most joints will use the default implementation provided in this base class, but the quaternion for example needs a different implementation. The vector is NOT cleared; elements are only added with push_back. | |
virtual std::vector < moveit_msgs::JointLimits > | getVariableLimits () const |
Get the joint limits specified by the user with setLimits() or the default joint limits using getVariableLimits(), if no joint limits were specified. | |
virtual void | getVariableRandomValues (random_numbers::RandomNumberGenerator &rng, std::vector< double > &values, const Bounds &other_bounds) const |
Provide random values for the joint variables (within specified bounds). The vector is NOT cleared; elements are only added with push_back. | |
virtual void | getVariableRandomValuesNearBy (random_numbers::RandomNumberGenerator &rng, std::vector< double > &values, const Bounds &other_bounds, const std::vector< double > &near, const double distance) const |
Provide random values for the joint variables (within specified bounds). The vector is NOT cleared; elements are only added with push_back. | |
virtual void | interpolate (const std::vector< double > &from, const std::vector< double > &to, const double t, std::vector< double > &state) const |
Computes the state that lies at time t in [0, 1] on the segment that connects from state to to state. The memory location of state is not required to be different from the memory of either from or to. | |
bool | normalizeRotation (std::vector< double > &values) const |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | PlanarJointModel (const std::string &name) |
virtual bool | satisfiesBounds (const std::vector< double > &values, const Bounds &other_bounds, double margin) const |
Check if the set of values for the variables of this joint are within bounds, up to some margin. | |
void | setAngularDistanceWeight (double weight) |
virtual void | updateTransform (const std::vector< double > &joint_values, Eigen::Affine3d &transf) const |
Update a transform so that it corresponds to the new joint values assuming that transf was previously set to identity and that only calls to updateTransform() were issued afterwards. | |
Private Attributes | |
double | angular_distance_weight_ |
Friends | |
class | RobotModel |
A planar joint.
Definition at line 46 of file planar_joint_model.h.
robot_model::PlanarJointModel::PlanarJointModel | ( | const std::string & | name | ) |
Definition at line 42 of file planar_joint_model.cpp.
void robot_model::PlanarJointModel::computeJointStateValues | ( | const Eigen::Affine3d & | transform, |
std::vector< double > & | joint_values | ||
) | const [virtual] |
Given the transform generated by joint, compute the corresponding joint values.
Implements robot_model::JointModel.
Definition at line 204 of file planar_joint_model.cpp.
void robot_model::PlanarJointModel::computeTransform | ( | const std::vector< double > & | joint_values, |
Eigen::Affine3d & | transf | ||
) | const [virtual] |
Given the joint values for a joint, compute the corresponding transform.
Implements robot_model::JointModel.
Definition at line 194 of file planar_joint_model.cpp.
double robot_model::PlanarJointModel::distance | ( | const std::vector< double > & | values1, |
const std::vector< double > & | values2 | ||
) | const [virtual] |
Compute the distance between two joint states of the same model (represented by the variable values)
Implements robot_model::JointModel.
Definition at line 145 of file planar_joint_model.cpp.
void robot_model::PlanarJointModel::enforceBounds | ( | std::vector< double > & | values, |
const Bounds & | other_bounds | ||
) | const [virtual] |
Force the specified values to be inside bounds and normalized. Quaternions are normalized, continuous joints are made between -Pi and Pi.
Implements robot_model::JointModel.
Definition at line 180 of file planar_joint_model.cpp.
double robot_model::PlanarJointModel::getAngularDistanceWeight | ( | ) | const [inline] |
Definition at line 71 of file planar_joint_model.h.
double robot_model::PlanarJointModel::getMaximumExtent | ( | const Bounds & | other_bounds | ) | const [virtual] |
Get the extent of the state space (the maximum value distance() can ever report)
Implements robot_model::JointModel.
Definition at line 62 of file planar_joint_model.cpp.
unsigned int robot_model::PlanarJointModel::getStateSpaceDimension | ( | ) | const [virtual] |
Get the dimension of the state space that corresponds to this joint.
Implements robot_model::JointModel.
Definition at line 57 of file planar_joint_model.cpp.
void robot_model::PlanarJointModel::getVariableDefaultValues | ( | std::vector< double > & | values, |
const Bounds & | other_bounds | ||
) | const [virtual] |
Provide a default value for the joint given the joint variable bounds. Most joints will use the default implementation provided in this base class, but the quaternion for example needs a different implementation. The vector is NOT cleared; elements are only added with push_back.
Implements robot_model::JointModel.
Definition at line 69 of file planar_joint_model.cpp.
std::vector< moveit_msgs::JointLimits > robot_model::PlanarJointModel::getVariableLimits | ( | ) | const [virtual] |
Get the joint limits specified by the user with setLimits() or the default joint limits using getVariableLimits(), if no joint limits were specified.
Reimplemented from robot_model::JointModel.
Definition at line 222 of file planar_joint_model.cpp.
void robot_model::PlanarJointModel::getVariableRandomValues | ( | random_numbers::RandomNumberGenerator & | rng, |
std::vector< double > & | values, | ||
const Bounds & | other_bounds | ||
) | const [virtual] |
Provide random values for the joint variables (within specified bounds). The vector is NOT cleared; elements are only added with push_back.
Implements robot_model::JointModel.
Definition at line 83 of file planar_joint_model.cpp.
void robot_model::PlanarJointModel::getVariableRandomValuesNearBy | ( | random_numbers::RandomNumberGenerator & | rng, |
std::vector< double > & | values, | ||
const Bounds & | other_bounds, | ||
const std::vector< double > & | near, | ||
const double | distance | ||
) | const [virtual] |
Provide random values for the joint variables (within specified bounds). The vector is NOT cleared; elements are only added with push_back.
Implements robot_model::JointModel.
Definition at line 98 of file planar_joint_model.cpp.
void robot_model::PlanarJointModel::interpolate | ( | const std::vector< double > & | from, |
const std::vector< double > & | to, | ||
const double | t, | ||
std::vector< double > & | state | ||
) | const [virtual] |
Computes the state that lies at time t in [0, 1] on the segment that connects from state to to state. The memory location of state is not required to be different from the memory of either from or to.
Implements robot_model::JointModel.
Definition at line 119 of file planar_joint_model.cpp.
bool robot_model::PlanarJointModel::normalizeRotation | ( | std::vector< double > & | values | ) | const |
Make the yaw component of a state's value vector be in the range [-Pi, Pi]. enforceBounds() also calls this function; Return true if a change is actually made
Definition at line 166 of file planar_joint_model.cpp.
bool robot_model::PlanarJointModel::satisfiesBounds | ( | const std::vector< double > & | values, |
const Bounds & | other_bounds, | ||
double | margin | ||
) | const [virtual] |
Check if the set of values for the variables of this joint are within bounds, up to some margin.
Implements robot_model::JointModel.
Definition at line 157 of file planar_joint_model.cpp.
void robot_model::PlanarJointModel::setAngularDistanceWeight | ( | double | weight | ) | [inline] |
Definition at line 76 of file planar_joint_model.h.
void robot_model::PlanarJointModel::updateTransform | ( | const std::vector< double > & | joint_values, |
Eigen::Affine3d & | transf | ||
) | const [virtual] |
Update a transform so that it corresponds to the new joint values assuming that transf was previously set to identity and that only calls to updateTransform() were issued afterwards.
Implements robot_model::JointModel.
Definition at line 199 of file planar_joint_model.cpp.
friend class RobotModel [friend] |
Reimplemented from robot_model::JointModel.
Definition at line 48 of file planar_joint_model.h.
double robot_model::PlanarJointModel::angular_distance_weight_ [private] |
Definition at line 87 of file planar_joint_model.h.