$search

planning_models::KinematicModel Class Reference

Definition of a kinematic model. This class is not thread safe, however multiple instances can be created. More...

#include <kinematic_model.h>

List of all members.

Classes

class  AttachedBodyModel
 Class defining bodies that can be attached to robot links. This is useful when handling objects picked up by the robot. More...
class  FixedJointModel
 A fixed joint. More...
class  FloatingJointModel
 A floating joint. More...
struct  GroupConfig
class  JointModel
 A joint from the robot. Contains the transform applied by the joint type. More...
class  JointModelGroup
class  LinkModel
 A link from the robot. Contains the constant transform applied to the link and its geometry. More...
struct  MultiDofConfig
class  PlanarJointModel
 A planar joint. More...
class  PrismaticJointModel
 A prismatic joint. More...
class  RevoluteJointModel
 A revolute joint. More...

Public Member Functions

void addAttachedBodyModel (const std::string &link_name, AttachedBodyModel *att_body_model)
bool addModelGroup (const GroupConfig &group)
void clearAllAttachedBodyModels ()
void clearLinkAttachedBodyModel (const std::string &link_name, const std::string &att_name)
void clearLinkAttachedBodyModels (const std::string &link_name)
void copyFrom (const KinematicModel &source)
void exclusiveLock (void) const
 Provide interface to get an exclusive lock to change the model. Use carefully!
void exclusiveUnlock (void) const
 Provide interface to release an exclusive lock. Use carefully!
std::vector< const
AttachedBodyModel * > 
getAttachedBodyModels () const
std::vector< std::string > getChildJointModelNames (const JointModel *parent) const
 Get the set of joint names that follow a parent joint in the kinematic chain.
std::vector< std::string > getChildJointModelNames (const LinkModel *parent) const
 Get the set of joint names that follow a parent link in the kinematic chain.
void getChildJointModels (const JointModel *parent, std::vector< const JointModel * > &links) const
 Get the set of joint models that follow a parent joint in the kinematic chain.
void getChildJointModels (const LinkModel *parent, std::vector< const JointModel * > &links) const
 Get the set of joint models that follow a parent link in the kinematic chain.
std::vector< std::string > getChildLinkModelNames (const JointModel *parent) const
 Get the set of link names that follow a parent link in the kinematic chain.
std::vector< std::string > getChildLinkModelNames (const LinkModel *parent) const
 Get the set of link names that follow a parent link in the kinematic chain.
void getChildLinkModels (const JointModel *parent, std::vector< const LinkModel * > &links) const
 Get the set of link models that follow a parent joint in the kinematic chain.
void getChildLinkModels (const LinkModel *parent, std::vector< const LinkModel * > &links) const
 Get the set of link models that follow a parent link in the kinematic chain.
const JointModelgetJointModel (const std::string &joint) const
 Get a joint by its name.
const std::map< std::string,
GroupConfig > & 
getJointModelGroupConfigMap () const
const std::map< std::string,
JointModelGroup * > & 
getJointModelGroupMap () const
void getJointModelNames (std::vector< std::string > &joints) const
 Get the array of joint names, in the order they appear in the robot state.
const std::vector< JointModel * > & getJointModels () const
 Get the array of joints, in the order they appear in the robot state.
const LinkModelgetLinkModel (const std::string &link) const
 Get a link by its name.
void getLinkModelNames (std::vector< std::string > &links) const
 Get the link names in the order they should be updated.
const std::vector< LinkModel * > & getLinkModels () const
 Get the array of joints, in the order they should be updated.
const std::vector< LinkModel * > & getLinkModelsWithCollisionGeometry () const
const JointModelGroupgetModelGroup (const std::string &name) const
void getModelGroupNames (std::vector< std::string > &getModelGroupNames) const
const std::string & getName (void) const
 General the model name.
std::string getRobotName () const
const JointModelgetRoot (void) const
 Get the root joint.
bool hasJointModel (const std::string &name) const
 Check if a joint exists.
bool hasLinkModel (const std::string &name) const
 Check if a link exists.
bool hasModelGroup (const std::string &group) const
 KinematicModel (const urdf::Model &model, const std::vector< GroupConfig > &group_configs, const std::vector< MultiDofConfig > &multi_dof_configs)
 Construct a kinematic model from a parsed description and a list of planning groups.
 KinematicModel (const KinematicModel &source)
 Construct a kinematic model from another one.
void printModelInfo (std::ostream &out=std::cout) const
 Print information about the constructed model.
void removeModelGroup (const std::string &group)
void replaceAttachedBodyModels (const std::string &link_name, std::vector< AttachedBodyModel * > &attached_body_vector)
void sharedLock (void) const
 Provide interface to get a shared lock for reading model data.
void sharedUnlock (void) const
 Provide interface to release a shared lock.
 ~KinematicModel (void)
 Destructor. Clear all memory.

Private Member Functions

void buildGroups (const std::vector< GroupConfig > &)
JointModelbuildRecursive (LinkModel *parent, const urdf::Link *link, const std::vector< MultiDofConfig > &multi_dof_configs)
JointModelconstructJointModel (const urdf::Joint *urdfJointModel, const urdf::Link *child_link, const std::vector< MultiDofConfig > &multi_dof_configs)
LinkModelconstructLinkModel (const urdf::Link *urdfLink)
shapes::ShapeconstructShape (const urdf::Geometry *geom)
JointModelcopyJointModel (const JointModel *joint)
JointModelcopyRecursive (LinkModel *parent, const LinkModel *link)

Private Attributes

std::map< std::string,
GroupConfig
joint_model_group_config_map_
std::map< std::string,
JointModelGroup * > 
joint_model_group_map_
std::map< std::string,
JointModel * > 
joint_model_map_
 A map from joint names to their instances.
std::vector< JointModel * > joint_model_vector_
 The vector of joints in the model, in the order they appear in the state vector.
std::map< std::string,
LinkModel * > 
link_model_map_
 A map from link names to their instances.
std::vector< LinkModel * > link_model_vector_
 The vector of links that are updated when computeTransforms() is called, in the order they are updated.
std::vector< LinkModel * > link_models_with_collision_geometry_vector_
 Only links that have collision geometry specified.
boost::shared_mutex lock_
 Shared lock for changing models.
std::string model_name_
 The name of the model.
JointModelroot_
 The root joint.

Detailed Description

Definition of a kinematic model. This class is not thread safe, however multiple instances can be created.

Definition at line 58 of file kinematic_model.h.


Constructor & Destructor Documentation

planning_models::KinematicModel::KinematicModel ( const KinematicModel source  ) 

Construct a kinematic model from another one.

Definition at line 66 of file kinematic_model.cpp.

planning_models::KinematicModel::KinematicModel ( const urdf::Model model,
const std::vector< GroupConfig > &  group_configs,
const std::vector< MultiDofConfig > &  multi_dof_configs 
)

Construct a kinematic model from a parsed description and a list of planning groups.

Author:
Ioan Sucan

Definition at line 48 of file kinematic_model.cpp.

planning_models::KinematicModel::~KinematicModel ( void   ) 

Destructor. Clear all memory.

Definition at line 71 of file kinematic_model.cpp.


Member Function Documentation

void planning_models::KinematicModel::addAttachedBodyModel ( const std::string &  link_name,
AttachedBodyModel att_body_model 
)

Definition at line 773 of file kinematic_model.cpp.

bool planning_models::KinematicModel::addModelGroup ( const GroupConfig group  ) 

Definition at line 179 of file kinematic_model.cpp.

void planning_models::KinematicModel::buildGroups ( const std::vector< GroupConfig > &  group_configs  )  [private]

Definition at line 132 of file kinematic_model.cpp.

planning_models::KinematicModel::JointModel * planning_models::KinematicModel::buildRecursive ( LinkModel parent,
const urdf::Link link,
const std::vector< MultiDofConfig > &  multi_dof_configs 
) [private]

Definition at line 281 of file kinematic_model.cpp.

void planning_models::KinematicModel::clearAllAttachedBodyModels (  ) 

Definition at line 717 of file kinematic_model.cpp.

void planning_models::KinematicModel::clearLinkAttachedBodyModel ( const std::string &  link_name,
const std::string &  att_name 
)

Definition at line 761 of file kinematic_model.cpp.

void planning_models::KinematicModel::clearLinkAttachedBodyModels ( const std::string &  link_name  ) 

Definition at line 736 of file kinematic_model.cpp.

planning_models::KinematicModel::JointModel * planning_models::KinematicModel::constructJointModel ( const urdf::Joint urdfJointModel,
const urdf::Link child_link,
const std::vector< MultiDofConfig > &  multi_dof_configs 
) [private]

Definition at line 316 of file kinematic_model.cpp.

planning_models::KinematicModel::LinkModel * planning_models::KinematicModel::constructLinkModel ( const urdf::Link urdfLink  )  [private]

Definition at line 422 of file kinematic_model.cpp.

shapes::Shape * planning_models::KinematicModel::constructShape ( const urdf::Geometry geom  )  [private]

Definition at line 453 of file kinematic_model.cpp.

void planning_models::KinematicModel::copyFrom ( const KinematicModel source  ) 

Definition at line 107 of file kinematic_model.cpp.

planning_models::KinematicModel::JointModel * planning_models::KinematicModel::copyJointModel ( const JointModel joint  )  [private]

Definition at line 581 of file kinematic_model.cpp.

planning_models::KinematicModel::JointModel * planning_models::KinematicModel::copyRecursive ( LinkModel parent,
const LinkModel link 
) [private]

Definition at line 560 of file kinematic_model.cpp.

void planning_models::KinematicModel::exclusiveLock ( void   )  const

Provide interface to get an exclusive lock to change the model. Use carefully!

Definition at line 83 of file kinematic_model.cpp.

void planning_models::KinematicModel::exclusiveUnlock ( void   )  const

Provide interface to release an exclusive lock. Use carefully!

Definition at line 88 of file kinematic_model.cpp.

std::vector< const planning_models::KinematicModel::AttachedBodyModel * > planning_models::KinematicModel::getAttachedBodyModels ( void   )  const

Definition at line 726 of file kinematic_model.cpp.

std::vector< std::string > planning_models::KinematicModel::getChildJointModelNames ( const JointModel parent  )  const

Get the set of joint names that follow a parent joint in the kinematic chain.

Definition at line 706 of file kinematic_model.cpp.

std::vector< std::string > planning_models::KinematicModel::getChildJointModelNames ( const LinkModel parent  )  const

Get the set of joint names that follow a parent link in the kinematic chain.

Definition at line 694 of file kinematic_model.cpp.

void planning_models::KinematicModel::getChildJointModels ( const JointModel parent,
std::vector< const JointModel * > &  links 
) const

Get the set of joint models that follow a parent joint in the kinematic chain.

void planning_models::KinematicModel::getChildJointModels ( const LinkModel parent,
std::vector< const JointModel * > &  links 
) const

Get the set of joint models that follow a parent link in the kinematic chain.

std::vector< std::string > planning_models::KinematicModel::getChildLinkModelNames ( const JointModel parent  )  const

Get the set of link names that follow a parent link in the kinematic chain.

Definition at line 682 of file kinematic_model.cpp.

std::vector< std::string > planning_models::KinematicModel::getChildLinkModelNames ( const LinkModel parent  )  const

Get the set of link names that follow a parent link in the kinematic chain.

Definition at line 670 of file kinematic_model.cpp.

void planning_models::KinematicModel::getChildLinkModels ( const JointModel parent,
std::vector< const LinkModel * > &  links 
) const

Get the set of link models that follow a parent joint in the kinematic chain.

void planning_models::KinematicModel::getChildLinkModels ( const LinkModel parent,
std::vector< const LinkModel * > &  links 
) const

Get the set of link models that follow a parent link in the kinematic chain.

const planning_models::KinematicModel::JointModel * planning_models::KinematicModel::getJointModel ( const std::string &  joint  )  const

Get a joint by its name.

Definition at line 511 of file kinematic_model.cpp.

const std::map<std::string, GroupConfig>& planning_models::KinematicModel::getJointModelGroupConfigMap (  )  const [inline]

Definition at line 687 of file kinematic_model.h.

const std::map<std::string, JointModelGroup*>& planning_models::KinematicModel::getJointModelGroupMap (  )  const [inline]

Definition at line 682 of file kinematic_model.h.

void planning_models::KinematicModel::getJointModelNames ( std::vector< std::string > &  joints  )  const

Get the array of joint names, in the order they appear in the robot state.

Definition at line 552 of file kinematic_model.cpp.

const std::vector<JointModel*>& planning_models::KinematicModel::getJointModels (  )  const [inline]

Get the array of joints, in the order they appear in the robot state.

Definition at line 632 of file kinematic_model.h.

const planning_models::KinematicModel::LinkModel * planning_models::KinematicModel::getLinkModel ( const std::string &  link  )  const

Get a link by its name.

Definition at line 523 of file kinematic_model.cpp.

void planning_models::KinematicModel::getLinkModelNames ( std::vector< std::string > &  links  )  const

Get the link names in the order they should be updated.

Definition at line 543 of file kinematic_model.cpp.

const std::vector<LinkModel*>& planning_models::KinematicModel::getLinkModels (  )  const [inline]

Get the array of joints, in the order they should be updated.

Definition at line 638 of file kinematic_model.h.

const std::vector<LinkModel*>& planning_models::KinematicModel::getLinkModelsWithCollisionGeometry (  )  const [inline]

Definition at line 643 of file kinematic_model.h.

const JointModelGroup* planning_models::KinematicModel::getModelGroup ( const std::string &  name  )  const [inline]

Definition at line 676 of file kinematic_model.h.

void planning_models::KinematicModel::getModelGroupNames ( std::vector< std::string > &  getModelGroupNames  )  const

Definition at line 535 of file kinematic_model.cpp.

const std::string & planning_models::KinematicModel::getName ( void   )  const

General the model name.

Definition at line 103 of file kinematic_model.cpp.

std::string planning_models::KinematicModel::getRobotName (  )  const [inline]

Definition at line 705 of file kinematic_model.h.

const planning_models::KinematicModel::JointModel * planning_models::KinematicModel::getRoot ( void   )  const

Get the root joint.

Definition at line 491 of file kinematic_model.cpp.

bool planning_models::KinematicModel::hasJointModel ( const std::string &  name  )  const

Check if a joint exists.

Definition at line 496 of file kinematic_model.cpp.

bool planning_models::KinematicModel::hasLinkModel ( const std::string &  name  )  const

Check if a link exists.

Definition at line 501 of file kinematic_model.cpp.

bool planning_models::KinematicModel::hasModelGroup ( const std::string &  group  )  const

Definition at line 506 of file kinematic_model.cpp.

void planning_models::KinematicModel::printModelInfo ( std::ostream &  out = std::cout  )  const

Print information about the constructed model.

void planning_models::KinematicModel::removeModelGroup ( const std::string &  group  ) 

Definition at line 172 of file kinematic_model.cpp.

void planning_models::KinematicModel::replaceAttachedBodyModels ( const std::string &  link_name,
std::vector< AttachedBodyModel * > &  attached_body_vector 
)

Definition at line 747 of file kinematic_model.cpp.

void planning_models::KinematicModel::sharedLock ( void   )  const

Provide interface to get a shared lock for reading model data.

Definition at line 93 of file kinematic_model.cpp.

void planning_models::KinematicModel::sharedUnlock ( void   )  const

Provide interface to release a shared lock.

Definition at line 98 of file kinematic_model.cpp.


Member Data Documentation

Definition at line 736 of file kinematic_model.h.

Definition at line 735 of file kinematic_model.h.

A map from joint names to their instances.

Definition at line 721 of file kinematic_model.h.

The vector of joints in the model, in the order they appear in the state vector.

Definition at line 724 of file kinematic_model.h.

A map from link names to their instances.

Definition at line 718 of file kinematic_model.h.

The vector of links that are updated when computeTransforms() is called, in the order they are updated.

Definition at line 727 of file kinematic_model.h.

Only links that have collision geometry specified.

Definition at line 730 of file kinematic_model.h.

boost::shared_mutex planning_models::KinematicModel::lock_ [mutable, private]

Shared lock for changing models.

Definition at line 712 of file kinematic_model.h.

The name of the model.

Definition at line 715 of file kinematic_model.h.

The root joint.

Definition at line 733 of file kinematic_model.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


planning_models
Author(s): Ioan Sucan/isucan@willowgarage.com
autogenerated on Fri Mar 1 14:16:23 2013