Go to the documentation of this file.
44 #include <boost/function.hpp>
52 class JointModelGroup;
55 typedef boost::function<kinematics::KinematicsBasePtr(
const JointModelGroup*)>
SolverAllocatorFn;
71 struct KinematicsSolver
108 const std::vector<const JointModel*>& joint_vector,
const RobotModel* parent_model);
119 const std::string&
getName()
const
299 void addDefaultState(
const std::string& name,
const std::map<std::string, double>& default_state);
338 const std::vector<double>& seed,
double distance)
const
346 const std::vector<double>& seed,
347 const std::map<JointModel::JointType, double>& distance_map)
const
355 const std::vector<double>& distances)
const
361 const std::vector<double>& seed,
const std::vector<double>& distances)
const
378 const std::map<JointModel::JointType, double>& distance_map)
const;
383 const std::vector<double>& distances)
const;
396 double margin = 0.0)
const;
404 double distance(
const double* state1,
const double* state2)
const;
405 void interpolate(
const double* from,
const double* to,
double t,
double* state)
const;
431 void getSubgroups(std::vector<const JointModelGroup*>& sub_groups)
const;
434 bool isSubgroup(
const std::string& group)
const
534 void setSolverAllocators(
const std::pair<SolverAllocatorFn, SolverAllocatorMapFn>& solvers);
577 bool isValidVelocityMove(
const std::vector<double>& from_joint_pose,
const std::vector<double>& to_joint_pose,
581 bool isValidVelocityMove(
const double* from_joint_pose,
const double* to_joint_pose, std::size_t array_size,
586 std::vector<unsigned int>& joint_bijection)
const;
bool hasLinkModel(const std::string &link) const
Check if a link is part of this group.
A link from the robot. Contains the constant transform applied to the link and its geometry.
std::vector< unsigned int > bijection_
The mapping between the order of the joints in the group and the order of the joints in the kinematic...
std::vector< const LinkModel * > updated_link_model_with_geometry_vector_
The list of downstream link models in the order they should be updated (may include links that are no...
const std::vector< const JointModel * > & getActiveJointModels() const
Get the active joints in this group (that have controllable DOF). This does not include mimic joints.
const JointModel * getJointModel(const std::string &joint) const
Get a joint by its name. Throw an exception if the joint is not part of this group.
std::vector< const JointModel * > mimic_joints_
Joints that mimic other joints.
const std::vector< const LinkModel * > & getUpdatedLinkModelsWithGeometry() const
Get the names of the links that are to be updated when the state of this group changes....
void addDefaultState(const std::string &name, const std::map< std::string, double > &default_state)
unsigned int getActiveVariableCount() const
Get the number of variables that describe the active joints in this joint group. This excludes variab...
const std::vector< std::string > & getSubgroupNames() const
Get the names of the groups that are subsets of this one (in terms of joints set)
const std::vector< const JointModel * > & getJointRoots() const
Unlike a complete kinematic model, a group may contain disconnected parts of the kinematic tree – a s...
const std::string & getEndEffectorName() const
Return the name of the end effector, if this group is an end-effector.
const std::vector< int > & getVariableIndexList() const
Get the index locations in the complete robot state for all the variables in this group.
const std::vector< std::string > & getActiveJointModelNames() const
Get the names of the active joints in this group. These are the names of the joints returned by getJo...
std::vector< int > variable_index_list_
The list of index values this group includes, with respect to a full robot state; this includes mimic...
const std::pair< KinematicsSolver, KinematicsSolverMap > & getGroupKinematics() const
const LinkModel * getLinkModel(const std::string &link) const
Get a joint by its name. Throw an exception if the joint is not part of this group.
SolverAllocatorFn allocator_
Function type that allocates a kinematics solver for a particular group.
const std::set< const LinkModel * > & getUpdatedLinkModelsWithGeometrySet() const
Return the same data as getUpdatedLinkModelsWithGeometry() but as a set.
std::map< std::string, int > VariableIndexMap
Data type for holding mappings from variable names to their position in a state vector.
std::set< std::string > updated_link_model_with_geometry_name_set_
The list of downstream link names in the order they should be updated (may include links that are not...
const JointBoundsVector & getActiveJointModelsBounds() const
Get the bounds for all the active joints.
Definition of a kinematic model. This class is not thread safe, however multiple instances can be cre...
std::vector< int > active_joint_model_start_index_
For each active joint model in this group, hold the index at which the corresponding joint state star...
std::vector< const JointModel * > continuous_joint_model_vector_
The set of continuous joints this group contains.
std::vector< const JointModel * > active_joint_model_vector_
Active joint instances in the order they appear in the group state.
std::vector< std::string > default_states_names_
The names of the default states specified for this group in the SRDF.
void updateMimicJoints(double *values) const
Update the variable values for the state of a group with respect to the mimic joints....
std::vector< std::string > updated_link_model_with_geometry_name_vector_
The list of downstream link names in the order they should be updated (may include links that are not...
bool isValidVelocityMove(const std::vector< double > &from_joint_pose, const std::vector< double > &to_joint_pose, double dt) const
Check that the time to move between two waypoints is sufficient given velocity limits.
std::vector< const LinkModel * > updated_link_model_vector_
The list of downstream link models in the order they should be updated (may include links that are no...
std::vector< const LinkModel * > link_model_vector_
The links that are on the direct lineage between joints and joint_roots_, as well as the children of ...
const RobotModel * parent_model_
Owner model.
const RobotModel & getParentModel() const
Get the kinematic model this group is part of.
std::vector< const JointModel::Bounds * > JointBoundsVector
bool setRedundantJoints(const std::vector< std::string > &joints)
srdf::Model::Group config_
const std::vector< const JointModel * > & getMimicJointModels() const
Get the mimic joints that are part of this group.
std::set< std::string > subgroup_names_set_
The set of labelled subgroups that are included in this group.
const std::set< std::string > & getUpdatedLinkModelsWithGeometryNamesSet() const
Get the names of the links returned by getUpdatedLinkModels()
bool canSetStateFromIK(const std::string &tip) const
std::map< std::string, const JointModelGroup * > JointModelGroupMapConst
Map of names to const instances for JointModelGroup.
void printGroupInfo(std::ostream &out=std::cout) const
Print information about the constructed model.
std::vector< std::string > joint_model_name_vector_
Names of joints in the order they appear in the group state.
void setEndEffectorParent(const std::string &group, const std::string &link)
If this group is an end-effector, specify the parent group (e.g., the arm holding the eef) and the li...
const std::vector< std::string > & getLinkModelNamesWithCollisionGeometry() const
Get the names of the links that are part of this joint group and also have geometry associated with t...
const std::vector< const LinkModel * > & getLinkModels() const
Get the links that are part of this joint group.
std::map< const JointModelGroup *, SolverAllocatorFn > SolverAllocatorMapFn
Map from group instances to allocator functions & bijections.
const std::vector< std::string > & getAttachedEndEffectorNames() const
Get the names of the end effectors attached to this group.
bool getEndEffectorTips(std::vector< const LinkModel * > &tips) const
Get the unique set of end effector tips included in a particular joint model group as defined by the ...
const std::vector< std::string > & getVariableNames() const
Get the names of the variables that make up the joints included in this group. The number of returned...
void attachEndEffector(const std::string &eef_name)
Notify this group that there is an end-effector attached to it.
kinematics::KinematicsBasePtr solver_instance_
const std::string & getName() const
Get the name of the joint group.
unsigned int variable_count_
The number of variables necessary to describe this group of joints.
bool getVariableDefaultPositions(const std::string &name, std::map< std::string, double > &values) const
Get the values that correspond to a named state as read from the URDF. Return false on failure.
LinkModelMapConst link_model_map_
A map from link names to their instances.
std::vector< std::string > updated_link_model_name_vector_
The list of downstream link names in the order they should be updated (may include links that are not...
const std::vector< const JointModel * > & getContinuousJointModels() const
Get the array of continuous joints used in this group (may include mimic joints).
std::pair< std::string, std::string > end_effector_parent_
First: name of the group that is parent to this end-effector group; Second: the link this in the pare...
std::map< const JointModelGroup *, KinematicsSolver > KinematicsSolverMap
Map from group instances to allocator functions & bijections.
std::string name_
Name of group.
const JointModel * common_root_
The joint that is a common root for all joints in this group (not necessarily part of this group)
std::set< const LinkModel * > updated_link_model_with_geometry_set_
The list of downstream link models in the order they should be updated (may include links that are no...
boost::function< kinematics::KinematicsBasePtr(const JointModelGroup *)> SolverAllocatorFn
Function type that allocates a kinematics solver for a particular group.
unsigned int active_variable_count_
The number of variables necessary to describe the active joints in this group of joints.
void interpolate(const double *from, const double *to, double t, double *state) const
std::map< std::string, std::map< std::string, double > > default_states_
The set of default states specified for this group in the SRDF.
const std::vector< std::string > & getJointModelNames() const
Get the names of the joints in this group. These are the names of the joints returned by getJointMode...
std::vector< GroupMimicUpdate > group_mimic_update_
std::string end_effector_name_
The name of the end effector, if this group is an end-effector.
std::vector< std::string > link_model_with_geometry_name_vector_
The names of the links in this group that also have geometry.
const JointModel * getCommonRoot() const
Get the common root of all joint roots; not necessarily part of this group.
double distance(const double *state1, const double *state2) const
const std::vector< const JointModel * > & getFixedJointModels() const
Get the fixed joints that are part of this group.
const std::vector< std::string > & getUpdatedLinkModelNames() const
Get the names of the links returned by getUpdatedLinkModels()
void getVariableRandomPositions(random_numbers::RandomNumberGenerator &rng, double *values) const
Compute random values for the state of the joint group.
std::pair< KinematicsSolver, KinematicsSolverMap > group_kinematics_
const std::vector< std::string > & getDefaultStateNames() const
Get the names of the known default states (as specified in the SRDF)
std::map< std::string, const LinkModel * > LinkModelMapConst
Map of names to const instances for LinkModel.
void getVariableRandomPositionsNearBy(random_numbers::RandomNumberGenerator &rng, double *values, const double *seed, const double distance) const
Compute random values for the state of the joint group.
std::vector< const JointModel * > joint_roots_
The list of active joint models that are roots in this group.
const std::vector< const JointModel * > & getJointModels() const
Get all the joints in this group (including fixed and mimic joints).
std::vector< std::string > attached_end_effector_names_
If an end-effector is attached to this group, the name of that end-effector is stored in this variabl...
void getSubgroups(std::vector< const JointModelGroup * > &sub_groups) const
Get the groups that are subsets of this one (in terms of joints set)
bool hasJointModel(const std::string &joint) const
Check if a joint is part of this group.
GroupMimicUpdate(int s, int d, double f, double o)
const std::vector< std::string > & getLinkModelNames() const
Get the names of the links that are part of this joint group.
bool satisfiesPositionBounds(const double *state, double margin=0.0) const
JointModelGroup(const std::string &name, const srdf::Model::Group &config, const std::vector< const JointModel * > &joint_vector, const RobotModel *parent_model)
double default_ik_timeout_
VariableIndexMap joint_variables_index_map_
The group includes all the joint variables that make up the joints the group consists of....
std::set< const LinkModel * > updated_link_model_set_
The list of downstream link models in the order they should be updated (may include links that are no...
void setEndEffectorName(const std::string &name)
Set the name of the end-effector, and remember this group is indeed an end-effector.
void setSolverAllocators(const SolverAllocatorFn &solver, const SolverAllocatorMapFn &solver_map=SolverAllocatorMapFn())
double getDefaultIKTimeout() const
Get the default IK timeout.
void setSubgroupNames(const std::vector< std::string > &subgroups)
Set the names of the subgroups for this group.
std::set< std::string > variable_names_set_
The names of the DOF that make up this group (this is just a sequence of joint variable names; not ne...
Main namespace for MoveIt.
const std::set< const LinkModel * > & getUpdatedLinkModelsSet() const
Return the same data as getUpdatedLinkModels() but as a set.
std::vector< double > values
std::vector< std::string > link_model_name_vector_
The names of the links in this group.
const kinematics::KinematicsBaseConstPtr getSolverInstance() const
bool isEndEffector() const
Check if this group was designated as an end-effector in the SRDF.
std::vector< const JointModel * > fixed_joints_
The joints that have no DOF (fixed)
const std::vector< const LinkModel * > & getUpdatedLinkModels() const
Get the names of the links that are to be updated when the state of this group changes....
std::vector< std::string > active_joint_model_name_vector_
Names of active joints in the order they appear in the group state.
std::vector< std::string > subgroup_names_
The set of labelled subgroups that are included in this group.
std::map< std::string, const JointModel * > JointModelMapConst
Map of names to const instances for JointModel.
bool isChain() const
Check if this group is a linear chain.
void setDefaultIKTimeout(double ik_timeout)
Set the default IK timeout.
std::vector< const LinkModel * > link_model_with_geometry_vector_
std::vector< const JointModel * > joint_model_vector_
Joint instances in the order they appear in the group state.
JointModelMapConst joint_model_map_
A map from joint names to their instances. This includes all joints in the group.
const moveit::core::LinkModel * getOnlyOneEndEffectorTip() const
Get one end effector tip, throwing an error if there ends up being more in the joint model group This...
const std::vector< unsigned int > & getKinematicsSolverJointBijection() const
Return the mapping between the order of the joints in this group and the order of the joints in the k...
const std::vector< std::string > & getUpdatedLinkModelsWithGeometryNames() const
Get the names of the links returned by getUpdatedLinkModels()
std::map< std::string, JointModelGroup * > JointModelGroupMap
Map of names to instances for JointModelGroup.
unsigned int getVariableCount() const
Get the number of variables that describe this joint group. This includes variables necessary for mim...
std::vector< std::string > variable_names_
The names of the DOF that make up this group (this is just a sequence of joint variable names; not ne...
bool is_contiguous_index_list_
True if the state of this group is contiguous within the full robot state; this also means that the i...
bool enforcePositionBounds(double *state) const
const std::pair< std::string, std::string > & getEndEffectorParentGroup() const
Get the name of the group this end-effector attaches to (first) and the name of the link in that grou...
bool isSingleDOFJoints() const
Return true if the group consists only of joints that are single DOF.
bool computeIKIndexBijection(const std::vector< std::string > &ik_jnames, std::vector< unsigned int > &joint_bijection) const
std::set< std::string > updated_link_model_name_set_
The list of downstream link names in the order they should be updated (may include links that are not...
A joint from the robot. Models the transform that this joint applies in the kinematic chain....
int getVariableGroupIndex(const std::string &variable) const
Get the index of a variable within the group. Return -1 on error.
bool isLinkUpdated(const std::string &name) const
True if this name is in the set of links that are to be updated when the state of this group changes....
bool isContiguousWithinState() const
double getMaximumExtent() const
const srdf::Model::Group & getConfig() const
get the SRDF configuration this group is based on
JointBoundsVector active_joint_models_bounds_
The bounds for all the active joint models.
bool isSubgroup(const std::string &group) const
Check if the joints of group group are a subset of the joints in this group.
moveit_core
Author(s): Ioan Sucan
, Sachin Chitta , Acorn Pooley
autogenerated on Sat Dec 21 2024 03:23:41