openrave.org

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenRAVE::KinBody Class Reference

[interface] A kinematic body of links and joints. If not specified, method is not multi-thread safe. See Kinematics Body Concepts. More...

#include <kinbody.h>

Inheritance diagram for OpenRAVE::KinBody:
Inheritance graph
[legend]
Collaboration diagram for OpenRAVE::KinBody:
Collaboration graph
[legend]

Classes

class  BodyState
 Stores the state of the current body that is published in a thread safe way from the environment without requiring locking the environment. More...
 
class  GeometryInfo
 Describes the properties of a geometric primitive. More...
 
class  Joint
 Information about a joint that controls the relationship between two links. More...
 
class  JointInfo
 Describes the properties of a joint used to initialize it. More...
 
class  KinBodyStateSaver
 Helper class to save and restore the entire kinbody state. More...
 
class  Link
 A rigid body holding all its collision and rendering data. More...
 
class  LinkInfo
 Describes the properties of a link used to initialize it. More...
 
class  ManageData
 Access point of the sensor system that manages the body. More...
 
class  Mimic
 
class  MimicInfo
 Holds mimic information about position, velocity, and acceleration of one axis of the joint. More...
 

Public Types

enum  KinBodyProperty {
  Prop_JointMimic =0x1, Prop_JointLimits =0x2, Prop_JointOffset =0x4, Prop_JointProperties =0x8,
  Prop_JointAccelerationVelocityTorqueLimits =0x10, Prop_Joints =Prop_JointMimic|Prop_JointLimits|Prop_JointOffset|Prop_JointProperties|Prop_JointAccelerationVelocityTorqueLimits, Prop_Name =0x20, Prop_LinkDraw =0x40,
  Prop_LinkGeometry =0x80, Prop_LinkStatic =0x400, Prop_LinkEnable =0x800, Prop_LinkDynamics =0x1000,
  Prop_Links =Prop_LinkDraw|Prop_LinkGeometry|Prop_LinkStatic|Prop_LinkEnable|Prop_LinkDynamics, Prop_JointCustomParameters = 0x2000, Prop_LinkCustomParameters = 0x4000, Prop_RobotSensors = 0x00020000,
  Prop_Sensors = 0x00020000, Prop_RobotSensorPlacement = 0x00040000, Prop_SensorPlacement = 0x00040000, Prop_RobotActiveDOFs = 0x00080000,
  Prop_RobotManipulatorTool = 0x00100000, Prop_RobotManipulatorName = 0x00200000, Prop_RobotManipulatorSolver = 0x00400000, Prop_RobotManipulators = Prop_RobotManipulatorTool | Prop_RobotManipulatorName | Prop_RobotManipulatorSolver
}
 A set of properties for the kinbody. These properties are used to describe a set of variables used in KinBody. More...
 
enum  CheckLimitsAction { CLA_Nothing = 0, CLA_CheckLimits = 1, CLA_CheckLimitsSilent = 2, CLA_CheckLimitsThrow = 3 }
 used for specifying the type of limit checking and the messages associated with it More...
 
enum  JointType {
  JointNone = 0, JointHinge = 0x01, JointRevolute = 0x01, JointSlider = 0x11,
  JointPrismatic = 0x11, JointRR = 0x02, JointRP = 0x12, JointPR = 0x22,
  JointPP = 0x32, JointSpecialBit = 0x80000000, JointUniversal = 0x80000001, JointHinge2 = 0x80000002,
  JointSpherical = 0x80000003, JointTrajectory = 0x80000004
}
 The type of joint movement. More...
 
enum  SaveParameters {
  Save_LinkTransformation =0x00000001, Save_LinkEnable =0x00000002, Save_LinkVelocities =0x00000004, Save_JointMaxVelocityAndAcceleration =0x00000008,
  Save_ActiveDOF =0x00010000, Save_ActiveManipulator =0x00020000, Save_GrabbedBodies =0x00040000
}
 Parameters passed into the state savers to control what information gets saved. More...
 
enum  AdjacentOptions { AO_Enabled = 1, AO_ActiveDOFs = 2 }
 specifies the type of adjacent link information to receive More...
 
typedef boost::shared_ptr
< GeometryInfo
GeometryInfoPtr
 
typedef boost::shared_ptr
< GeometryInfo const > 
GeometryInfoConstPtr
 
typedef boost::shared_ptr
< LinkInfo
LinkInfoPtr
 
typedef boost::shared_ptr
< LinkInfo const > 
LinkInfoConstPtr
 
typedef boost::shared_ptr
< KinBody::Link
LinkPtr
 
typedef boost::shared_ptr
< KinBody::Link const > 
LinkConstPtr
 
typedef boost::weak_ptr
< KinBody::Link
LinkWeakPtr
 
typedef boost::shared_ptr
< MimicInfo
MimicInfoPtr
 
typedef boost::shared_ptr
< MimicInfo const > 
MimicInfoConstPtr
 
typedef boost::shared_ptr< MimicMimicPtr
 
typedef boost::shared_ptr
< Mimic const > 
MimicConstPtr
 
typedef boost::shared_ptr
< JointInfo
JointInfoPtr
 
typedef boost::shared_ptr
< JointInfo const > 
JointInfoConstPtr
 
typedef boost::shared_ptr
< KinBody::Joint
JointPtr
 
typedef boost::shared_ptr
< KinBody::Joint const > 
JointConstPtr
 
typedef boost::weak_ptr
< KinBody::Joint
JointWeakPtr
 
typedef boost::shared_ptr
< KinBody::BodyState
BodyStatePtr
 
typedef boost::shared_ptr
< KinBody::BodyState const > 
BodyStateConstPtr
 
typedef boost::shared_ptr
< KinBody::ManageData
ManageDataPtr
 
typedef boost::shared_ptr
< KinBody::ManageData const > 
ManageDataConstPtr
 
typedef boost::shared_ptr
< KinBodyStateSaver
KinBodyStateSaverPtr
 
typedef std::map< int,
std::pair< Vector, Vector > > 
ForceTorqueMap
 link index and the linear forces and torques. Value.first is linear force acting on the link's COM and Value.second is torque
 
- Public Types inherited from OpenRAVE::InterfaceBase
typedef std::map< std::string,
XMLReadablePtr,
CaseInsensitiveCompare
READERSMAP
 

Public Member Functions

virtual ~KinBody ()
 
virtual void Destroy ()
 
virtual bool InitFromBoxes (const std::vector< AABB > &boxes, bool visible)
 Create a kinbody with one link composed of an array of aligned bounding boxes.
 
virtual bool InitFromBoxes (const std::vector< OBB > &boxes, bool visible)
 Create a kinbody with one link composed of an array of oriented bounding boxes.
 
virtual bool InitFromSpheres (const std::vector< Vector > &spheres, bool visible)
 Create a kinbody with one link composed of an array of spheres.
 
virtual bool InitFromTrimesh (const TriMesh &trimesh, bool visible)
 Create a kinbody with one link composed of a triangle mesh surface.
 
virtual bool InitFromGeometries (const std::vector< KinBody::GeometryInfoConstPtr > &geometries)
 Create a kinbody with one link composed of a list of geometries.
 
virtual bool InitFromGeometries (const std::list< KinBody::GeometryInfo > &geometries)
 
virtual bool Init (const std::vector< LinkInfoConstPtr > &linkinfos, const std::vector< JointInfoConstPtr > &jointinfos)
 initializes an complex kinematics body with links and joints
 
virtual const std::string & GetName () const
 Unique name of the robot.
 
virtual void SetName (const std::string &name)
 Set the name of the body, notifies the environment and checks for uniqueness.
 
virtual void SubtractDOFValues (std::vector< dReal > &values1, const std::vector< dReal > &values2, const std::vector< int > &dofindices=std::vector< int >()) const
 Computes the configuration difference values1-values2 and stores it in values1.
 
virtual void SetDOFTorques (const std::vector< dReal > &torques, bool add)
 Adds a torque to every joint.
 
virtual const std::vector
< LinkPtr > & 
GetLinks () const
 Returns all the rigid links of the body.
 
virtual LinkPtr GetLink (const std::string &name) const
 return a pointer to the link with the given name
 
virtual void SimulationStep (dReal fElapsedTime)
 Updates the bounding box and any other parameters that could have changed by a simulation step.
 
virtual void GetLinkTransformations (std::vector< Transform > &transforms) const
 get the transformations of all the links at once
 
virtual void GetLinkTransformations (std::vector< Transform > &transforms, std::vector< int > &dofbranches) const
 get the transformations of all the links and the dof branches at once.
 
virtual void GetBodyTransformations (std::vector< Transform > &transforms) const RAVE_DEPRECATED
 
virtual Transform GetTransform () const
 queries the transfromation of the first link of the body
 
virtual bool SetVelocity (const Vector &linearvel, const Vector &angularvel)
 Set the velocity of the base link, rest of links are set to a consistent velocity so entire robot moves correctly.
 
virtual void SetDOFVelocities (const std::vector< dReal > &dofvelocities, const Vector &linearvel, const Vector &angularvel, uint32_t checklimits=CLA_CheckLimits)
 Sets the velocity of the base link and each of the joints.
 
virtual void SetDOFVelocities (const std::vector< dReal > &dofvelocities, uint32_t checklimits=CLA_CheckLimits, const std::vector< int > &dofindices=std::vector< int >())
 Sets the velocity of the joints.
 
virtual void GetLinkVelocities (std::vector< std::pair< Vector, Vector > > &velocities) const
 Returns the linear and angular velocities for each link.
 
virtual void GetLinkAccelerations (const std::vector< dReal > &dofaccelerations, std::vector< std::pair< Vector, Vector > > &linkaccelerations) const
 Returns the linear and angular accelerations for each link given the dof accelerations.
 
virtual void SetTransform (const Transform &transform)
 set the transform of the first link (the rest of the links are computed based on the joint values).
 
virtual AABB ComputeAABB () const
 Return an axis-aligned bounding box of the entire object in the world coordinate system.
 
virtual Vector GetCenterOfMass () const
 Return the center of mass of entire robot in the world coordinate system.
 
virtual void Enable (bool enable)
 Enables or disables all the links.
 
virtual bool IsEnabled () const
 
virtual bool SetVisible (bool visible)
 Sets all the links as visible or not visible.
 
virtual bool IsVisible () const
 
virtual void SetDOFValues (const std::vector< dReal > &values, uint32_t checklimits=CLA_CheckLimits, const std::vector< int > &dofindices=std::vector< int >())
 Sets the joint values of the robot.
 
virtual void SetJointValues (const std::vector< dReal > &values, bool checklimits=true)
 
virtual void SetDOFValues (const std::vector< dReal > &values, const Transform &transform, uint32_t checklimits=CLA_CheckLimits)
 Sets the joint values and transformation of the body.
 
virtual void SetJointValues (const std::vector< dReal > &values, const Transform &transform, bool checklimits=true)
 
virtual void SetLinkTransformations (const std::vector< Transform > &transforms)
 sets the transformations of all the links at once
 
virtual void SetLinkTransformations (const std::vector< Transform > &transforms, const std::vector< int > &dofbranches)
 sets the transformations of all the links and dof branches at once.
 
virtual void SetBodyTransformations (const std::vector< Transform > &transforms) RAVE_DEPRECATED
 
virtual void SetLinkVelocities (const std::vector< std::pair< Vector, Vector > > &velocities)
 sets the link velocities
 
virtual void ComputeJacobianTranslation (int linkindex, const Vector &position, std::vector< dReal > &jacobian, const std::vector< int > &dofindices=std::vector< int >()) const
 Computes the translation jacobian with respect to a world position.
 
virtual void CalculateJacobian (int linkindex, const Vector &position, std::vector< dReal > &jacobian) const
 calls std::vector version of ComputeJacobian internally
 
virtual void CalculateJacobian (int linkindex, const Vector &position, boost::multi_array< dReal, 2 > &jacobian) const
 calls std::vector version of ComputeJacobian internally, a little inefficient since it copies memory
 
virtual void CalculateRotationJacobian (int linkindex, const Vector &quat, std::vector< dReal > &jacobian) const
 Computes the rotational jacobian as a quaternion with respect to an initial rotation.
 
virtual void CalculateRotationJacobian (int linkindex, const Vector &quat, boost::multi_array< dReal, 2 > &jacobian) const
 calls std::vector version of CalculateRotationJacobian internally, a little inefficient since it copies memory
 
virtual void ComputeJacobianAxisAngle (int linkindex, std::vector< dReal > &jacobian, const std::vector< int > &dofindices=std::vector< int >()) const
 Computes the angular velocity jacobian of a specified link about the axes of world coordinates.
 
virtual void CalculateAngularVelocityJacobian (int linkindex, std::vector< dReal > &jacobian) const
 Computes the angular velocity jacobian of a specified link about the axes of world coordinates.
 
virtual void CalculateAngularVelocityJacobian (int linkindex, boost::multi_array< dReal, 2 > &jacobian) const
 calls std::vector version of CalculateAngularVelocityJacobian internally, a little inefficient since it copies memory
 
virtual void ComputeHessianTranslation (int linkindex, const Vector &position, std::vector< dReal > &hessian, const std::vector< int > &dofindices=std::vector< int >()) const
 Computes the DOFx3xDOF hessian of the linear translation.
 
virtual void ComputeHessianAxisAngle (int linkindex, std::vector< dReal > &hessian, const std::vector< int > &dofindices=std::vector< int >()) const
 Computes the DOFx3xDOF hessian of the rotation represented as angle-axis.
 
virtual void ComputeInverseDynamics (std::vector< dReal > &doftorques, const std::vector< dReal > &dofaccelerations, const ForceTorqueMap &externalforcetorque=ForceTorqueMap()) const
 Computes the inverse dynamics (torques) from the current robot position, velocity, and acceleration.
 
virtual void ComputeInverseDynamics (boost::array< std::vector< dReal >, 3 > &doftorquecomponents, const std::vector< dReal > &dofaccelerations, const ForceTorqueMap &externalforcetorque=ForceTorqueMap()) const
 Computes the separated inverse dynamics torque terms from the current robot position, velocity, and acceleration.
 
virtual bool CheckSelfCollision (CollisionReportPtr report=CollisionReportPtr()) const
 Check if body is self colliding. Links that are joined together are ignored.
 
virtual bool IsAttached (KinBodyConstPtr body) const
 
virtual void GetAttached (std::set< KinBodyPtr > &setAttached) const
 Recursively get all attached bodies of this body, including this body.
 
virtual bool IsRobot () const
 Return true if this body is derived from RobotBase.
 
virtual int GetEnvironmentId () const
 return a unique id of the body used in the environment.
 
virtual int8_t DoesAffect (int jointindex, int linkindex) const
 Returns a nonzero value if the joint effects the link transformation.
 
virtual UserDataPtr GetViewerData () const RAVE_DEPRECATED
 
virtual const std::set< int > & GetNonAdjacentLinks (int adjacentoptions=0) const
 return all possible link pairs that could get in collision.
 
virtual const std::set< int > & GetAdjacentLinks () const
 return all possible link pairs whose collisions are ignored.
 
virtual UserDataPtr GetPhysicsData () const RAVE_DEPRECATED
 
virtual UserDataPtr GetCollisionData () const RAVE_DEPRECATED
 
virtual ManageDataPtr GetManageData () const
 
virtual int GetUpdateStamp () const
 Return a unique id for every transformation state change of any link. Used to check if robot state has changed.
 
virtual void Clone (InterfaceBaseConstPtr preference, int cloningoptions)
 Clone the contents of an interface to the current interface.
 
virtual UserDataPtr RegisterChangeCallback (int properties, const boost::function< void()> &callback) const
 Register a callback with the interface.
 
void Serialize (BaseXMLWriterPtr writer, int options=0) const
 serializes the interface
 
virtual const std::string & GetKinematicsGeometryHash () const
 A md5 hash unique to the particular kinematic and geometric structure of a KinBody.
 
virtual void SetZeroConfiguration ()
 Sets the joint offsets so that the current configuration becomes the new zero state of the robot.
 
virtual void SetNonCollidingConfiguration ()
 Treats the current pose as a pose not in collision, which sets the adjacent pairs of links.
 
virtual void serialize (std::ostream &o, int options) const
 only used for hashes...
 
Basic Information

Methods for accessing basic information about joints

virtual int GetDOF () const
 Number controllable degrees of freedom of the body.
 
virtual void GetDOFValues (std::vector< dReal > &v, const std::vector< int > &dofindices=std::vector< int >()) const
 Returns all the joint values as organized by the DOF indices.
 
virtual void GetDOFVelocities (std::vector< dReal > &v, const std::vector< int > &dofindices=std::vector< int >()) const
 Returns all the joint velocities as organized by the DOF indices.
 
virtual void GetDOFLimits (std::vector< dReal > &lowerlimit, std::vector< dReal > &upperlimit, const std::vector< int > &dofindices=std::vector< int >()) const
 Returns all the joint limits as organized by the DOF indices.
 
virtual void GetDOFVelocityLimits (std::vector< dReal > &lowerlimit, std::vector< dReal > &upperlimit, const std::vector< int > &dofindices=std::vector< int >()) const
 Returns all the joint velocity limits as organized by the DOF indices.
 
virtual void GetDOFVelocityLimits (std::vector< dReal > &maxvelocities, const std::vector< int > &dofindices=std::vector< int >()) const
 Returns the max velocity for each DOF.
 
virtual void GetDOFAccelerationLimits (std::vector< dReal > &maxaccelerations, const std::vector< int > &dofindices=std::vector< int >()) const
 Returns the max acceleration for each DOF.
 
virtual void GetDOFTorqueLimits (std::vector< dReal > &maxaccelerations) const
 Returns the max torque for each DOF.
 
virtual void GetDOFMaxVel (std::vector< dReal > &v) const RAVE_DEPRECATED
 
virtual void GetDOFMaxAccel (std::vector< dReal > &v) const RAVE_DEPRECATED
 
virtual void GetDOFMaxTorque (std::vector< dReal > &v) const
 
virtual void GetDOFResolutions (std::vector< dReal > &v, const std::vector< int > &dofindices=std::vector< int >()) const
 get the dof resolutions
 
virtual void GetDOFWeights (std::vector< dReal > &v, const std::vector< int > &dofindices=std::vector< int >()) const
 get dof weights
 
virtual void SetDOFVelocityLimits (const std::vector< dReal > &maxlimits)
 
virtual void SetDOFAccelerationLimits (const std::vector< dReal > &maxlimits)
 
virtual void SetDOFTorqueLimits (const std::vector< dReal > &maxlimits)
 
virtual void SetDOFWeights (const std::vector< dReal > &weights, const std::vector< int > &dofindices=std::vector< int >())
 sets dof weights
 
virtual void SetDOFLimits (const std::vector< dReal > &lower, const std::vector< dReal > &upper)
 
const std::vector< JointPtr > & GetJoints () const
 Returns the joints making up the controllable degrees of freedom of the body.
 
const std::vector< JointPtr > & GetPassiveJoints () const
 Returns the passive joints, order does not matter.
 
virtual const std::vector
< JointPtr > & 
GetDependencyOrderedJoints () const
 Returns the joints in hierarchical order starting at the base link.
 
virtual const std::vector
< std::vector< std::pair
< LinkPtr, JointPtr > > > & 
GetClosedLoops () const
 Return the set of unique closed loops of the kinematics hierarchy.
 
virtual bool GetChain (int linkindex1, int linkindex2, std::vector< JointPtr > &vjoints) const
 Computes the minimal chain of joints that are between two links in the order of linkindex1 to linkindex2.
 
virtual bool GetChain (int linkindex1, int linkindex2, std::vector< LinkPtr > &vlinks) const
 similar to GetChain(int,int,std::vector<JointPtr>&) except returns the links along the path.
 
virtual bool IsDOFInChain (int linkindex1, int linkindex2, int dofindex) const
 Returns true if the dof index affects the relative transformation between the two links.
 
virtual int GetJointIndex (const std::string &name) const
 Return the index of the joint with the given name, else -1.
 
virtual JointPtr GetJoint (const std::string &name) const
 Return a pointer to the joint with the given name. Search in the regular and passive joints.
 
virtual JointPtr GetJointFromDOFIndex (int dofindex) const
 Returns the joint that covers the degree of freedom index.
 
Configuration Specification API

Functions dealing with configuration specifications

virtual ConfigurationSpecification GetConfigurationSpecification (const std::string &interpolation="") const
 return the configuration specification of the joint values and transform
 
virtual ConfigurationSpecification GetConfigurationSpecificationIndices (const std::vector< int > &indices, const std::string &interpolation="") const
 return the configuration specification of the specified joint indices.
 
virtual void SetConfigurationValues (std::vector< dReal >::const_iterator itvalues, uint32_t checklimits=CLA_CheckLimits)
 sets joint values and transform of the body using configuration values as specified by GetConfigurationSpecification()
 
virtual void GetConfigurationValues (std::vector< dReal > &v) const
 returns the configuration values as specified by GetConfigurationSpecification()
 
- Public Member Functions inherited from OpenRAVE::InterfaceBase
 InterfaceBase (InterfaceType type, EnvironmentBasePtr penv)
 
virtual ~InterfaceBase ()
 
InterfaceType GetInterfaceType () const
 
const std::string & GetXMLId () const
 
const std::string & GetPluginName () const
 
EnvironmentBasePtr GetEnv () const
 
const READERSMAPGetReadableInterfaces () const
 Returns the raw map reference, this is not multithread safe and the GetInterfaceMutex should be locked before using.
 
virtual XMLReadablePtr GetReadableInterface (const std::string &xmltag) const
 Returns the readable interface. [multi-thread safe]
 
virtual XMLReadablePtr SetReadableInterface (const std::string &xmltag, XMLReadablePtr readable)
 Set a new readable interface and return the previously set interface if it exists. [multi-thread safe]
 
virtual const std::string & GetDescription () const
 Documentation of the interface in reStructuredText format. See Documenting Interfaces. [multi-thread safe]
 
virtual void SetDescription (const std::string &description)
 sets a description [multi-thread safe]
 
virtual void SetUserData (const std::string &key, UserDataPtr data) const
 set user data for a specific key. [multi-thread safe]
 
virtual UserDataPtr GetUserData (const std::string &key=std::string()) const
 return the user custom data [multi-thread safe]
 
virtual bool RemoveUserData (const std::string &key) const
 removes a user data pointer. if user data pointer does not exist, then return 0, otherwise 1. [multi-thread safe]
 
virtual void SetUserData (UserDataPtr data) RAVE_DEPRECATED
 
virtual const std::string & GetURI () const
 the URI used to load the interface (sometimes this is not possible if the definition lies inside an environment file). [multi-thread safe]
 
virtual const std::string & GetXMLFilename () const
 
virtual bool SendCommand (std::ostream &os, std::istream &is)
 Used to send special commands to the interface and receive output.
 

Static Public Member Functions

static InterfaceType GetInterfaceTypeStatic ()
 return the static interface type this class points to (used for safe casting)
 

Protected Member Functions

 KinBody (InterfaceType type, EnvironmentBasePtr penv)
 constructors declared protected so that user always goes through environment to create bodies
 
KinBodyPtr shared_kinbody ()
 
KinBodyConstPtr shared_kinbody_const () const
 
virtual void SetPhysicsData (UserDataPtr pdata) RAVE_DEPRECATED
 
virtual void SetCollisionData (UserDataPtr pdata) RAVE_DEPRECATED
 
virtual void SetViewerData (UserDataPtr pdata) RAVE_DEPRECATED
 
virtual void SetManageData (ManageDataPtr pdata)
 
virtual void _ComputeInternalInformation ()
 Final post-processing stage before a kinematics body can be used.
 
virtual void _ComputeDOFLinkVelocities (std::vector< dReal > &dofvelocities, std::vector< std::pair< Vector, Vector > > &linkvelocities, bool usebaselinkvelocity=true) const
 returns the dof velocities and link velocities
 
virtual void _ComputeLinkAccelerations (const std::vector< dReal > &dofvelocities, const std::vector< dReal > &dofaccelerations, const std::vector< std::pair< Vector, Vector > > &linkvelocities, std::vector< std::pair< Vector, Vector > > &linkaccelerations, const Vector &gravity) const
 Computes accelerations of the links given all the necessary data of the robot.
 
virtual void _ParametersChanged (int parameters)
 Called to notify the body that certain groups of parameters have been changed.
 
virtual bool _IsAttached (KinBodyConstPtr body, std::set< KinBodyConstPtr > &setChecked) const
 Return true if two bodies should be considered as one during collision (ie one is grabbing the other)
 
virtual void _AttachBody (KinBodyPtr body)
 adds an attached body
 
virtual bool _RemoveAttachedBody (KinBodyPtr body)
 removes an attached body
 
virtual void _ResetInternalCollisionCache ()
 resets cached information dependent on the collision checker (usually called when the collision checker is switched or some big mode is set.
 
- Protected Member Functions inherited from OpenRAVE::InterfaceBase
virtual void RegisterCommand (const std::string &cmdname, InterfaceCommandFn fncmd, const std::string &strhelp)
 Registers a command and its help string. [multi-thread safe]
 
virtual void UnregisterCommand (const std::string &cmdname)
 Unregisters the command. [multi-thread safe]
 
virtual boost::shared_mutex & GetInterfaceMutex () const
 

Protected Attributes

std::string _name
 name of body
 
std::vector< JointPtr_vecjoints
 
std::vector< JointPtr_vTopologicallySortedJoints
 
std::vector< JointPtr_vTopologicallySortedJointsAll
 Similar to _vDependencyOrderedJoints except includes _vecjoints and _vPassiveJoints.
 
std::vector< int > _vTopologicallySortedJointIndicesAll
 the joint indices of the joints in _vTopologicallySortedJointsAll. Passive joint indices have _vecjoints.size() added to them.
 
std::vector< JointPtr_vDOFOrderedJoints
 all joints of the body ordered on how they are arranged within the degrees of freedom
 
std::vector< LinkPtr_veclinks
 
std::vector< int > _vDOFIndices
 cached start joint indices, indexed by dof indices
 
std::vector< std::pair
< int16_t, int16_t > > 
_vAllPairsShortestPaths
 all-pairs shortest paths through the link hierarchy. The first value describes the parent link index, and the second value is an index into _vecjoints or _vPassiveJoints. If the second value is greater or equal to _vecjoints.size() then it indexes into _vPassiveJoints.
 
std::vector< int8_t > _vJointsAffectingLinks
 joint x link: (jointindex*_veclinks.size()+linkindex). entry is non-zero if the joint affects the link in the forward kinematics. If negative, the partial derivative of ds/dtheta should be negated.
 
std::vector< std::vector
< std::pair< LinkPtr, JointPtr > > > 
_vClosedLoops
 
std::vector< std::vector
< std::pair< int16_t, int16_t > > > 
_vClosedLoopIndices
 
std::vector< JointPtr_vPassiveJoints
 
std::set< int > _setAdjacentLinks
 
std::vector< std::pair
< std::string, std::string > > 
_vForcedAdjacentLinks
 internally stores forced adjacent links
 
std::list< KinBodyWeakPtr_listAttachedBodies
 list of bodies that are directly attached to this body (can have duplicates)
 
std::list< UserDataWeakPtr_listRegisteredCallbacks
 callbacks to call when particular properties of the body change. the registration/deregistration of the list can happen at any point and does not modify the kinbody state exposed to the user, hence it is mutable
 
boost::array< std::set< int >, 4 > _setNonAdjacentLinks
 contains cached versions of the non-adjacent links depending on values in AdjacentOptions. Declared as mutable since data is cached.
 
int _nNonAdjacentLinkCache
 specifies what information is currently valid in the AdjacentOptions. Declared as mutable since data is cached. If 0x80000000 (ie < 0), then everything needs to be recomputed including _setNonAdjacentLinks[0].
 
std::vector< Transform_vInitialLinkTransformations
 the initial transformations of each link specifying at least one pose where the robot is collision free
 
ConfigurationSpecification _spec
 
int _environmentid
 
int _nUpdateStampId
 
int _nParametersChanged
 set of parameters that changed and need callbacks
 
ManageDataPtr _pManageData
 
uint32_t _nHierarchyComputed
 true if the joint heirarchy and other cached information is computed
 
bool _bMakeJoinedLinksAdjacent
 
- Protected Attributes inherited from OpenRAVE::InterfaceBase
std::string __description
 

Additional Inherited Members

- Protected Types inherited from OpenRAVE::InterfaceBase
typedef boost::function< bool(std::ostream
&, std::istream &)> 
InterfaceCommandFn
 The function to be executed for every command.
 

Detailed Description

[interface] A kinematic body of links and joints. If not specified, method is not multi-thread safe. See Kinematics Body Concepts.

Definition at line 42 of file kinbody.h.

Member Typedef Documentation

typedef boost::shared_ptr<KinBody::BodyState const> OpenRAVE::KinBody::BodyStateConstPtr

Definition at line 1134 of file kinbody.h.

Definition at line 1133 of file kinbody.h.

typedef std::map<int, std::pair<Vector,Vector> > OpenRAVE::KinBody::ForceTorqueMap

link index and the linear forces and torques. Value.first is linear force acting on the link's COM and Value.second is torque

Definition at line 1672 of file kinbody.h.

typedef boost::shared_ptr<GeometryInfo const> OpenRAVE::KinBody::GeometryInfoConstPtr

Definition at line 148 of file kinbody.h.

Definition at line 147 of file kinbody.h.

typedef boost::shared_ptr<KinBody::Joint const> OpenRAVE::KinBody::JointConstPtr

Definition at line 1116 of file kinbody.h.

typedef boost::shared_ptr<JointInfo const> OpenRAVE::KinBody::JointInfoConstPtr

Definition at line 707 of file kinbody.h.

typedef boost::shared_ptr<JointInfo> OpenRAVE::KinBody::JointInfoPtr

Definition at line 706 of file kinbody.h.

typedef boost::shared_ptr<KinBody::Joint> OpenRAVE::KinBody::JointPtr

Definition at line 1115 of file kinbody.h.

Definition at line 1117 of file kinbody.h.

Definition at line 1225 of file kinbody.h.

typedef boost::shared_ptr<KinBody::Link const> OpenRAVE::KinBody::LinkConstPtr

Definition at line 584 of file kinbody.h.

typedef boost::shared_ptr<LinkInfo const> OpenRAVE::KinBody::LinkInfoConstPtr

Definition at line 183 of file kinbody.h.

typedef boost::shared_ptr<LinkInfo> OpenRAVE::KinBody::LinkInfoPtr

Definition at line 182 of file kinbody.h.

typedef boost::shared_ptr<KinBody::Link> OpenRAVE::KinBody::LinkPtr

Definition at line 583 of file kinbody.h.

Definition at line 585 of file kinbody.h.

Definition at line 1177 of file kinbody.h.

Definition at line 1176 of file kinbody.h.

typedef boost::shared_ptr<Mimic const> OpenRAVE::KinBody::MimicConstPtr

Definition at line 658 of file kinbody.h.

typedef boost::shared_ptr<MimicInfo const> OpenRAVE::KinBody::MimicInfoConstPtr

Definition at line 623 of file kinbody.h.

typedef boost::shared_ptr<MimicInfo> OpenRAVE::KinBody::MimicInfoPtr

Definition at line 622 of file kinbody.h.

typedef boost::shared_ptr<Mimic> OpenRAVE::KinBody::MimicPtr

Definition at line 657 of file kinbody.h.

Member Enumeration Documentation

specifies the type of adjacent link information to receive

Enumerator:
AO_Enabled 

return only enabled link pairs

AO_ActiveDOFs 

return only link pairs that have an active in its path

Definition at line 1742 of file kinbody.h.

used for specifying the type of limit checking and the messages associated with it

Enumerator:
CLA_Nothing 

no checking

CLA_CheckLimits 
CLA_CheckLimitsSilent 

< checks and warns if the limits are overboard (default)

checks the limits and silently clamps the joint values (used if the code expects bad values as part of normal operation)

CLA_CheckLimitsThrow 

check the limits and throws if something went wrong

Definition at line 80 of file kinbody.h.

The type of joint movement.

Non-special joints that are combinations of revolution and prismatic joints. The first 4 bits specify the joint DOF, the next bits specify whether the joint is revolute (0) or prismatic (1). There can be also special joint types that are valid if the JointSpecialBit is set.

For multi-dof joints, the order is transform(parentlink) * transform(axis0) * transform(axis1) ...

Enumerator:
JointNone 
JointHinge 
JointRevolute 
JointSlider 
JointPrismatic 
JointRR 
JointRP 
JointPR 
JointPP 
JointSpecialBit 
JointUniversal 
JointHinge2 
JointSpherical 
JointTrajectory 

there is no axis defined, instead the relative transformation is directly output from the trajectory affine_transform structure

Definition at line 595 of file kinbody.h.

A set of properties for the kinbody. These properties are used to describe a set of variables used in KinBody.

Enumerator:
Prop_JointMimic 

joint mimic equations

Prop_JointLimits 

regular limits

Prop_JointOffset 
Prop_JointProperties 

resolution, weights

Prop_JointAccelerationVelocityTorqueLimits 

velocity + acceleration + torque

Prop_Joints 

all properties of all joints

Prop_Name 

name changed

Prop_LinkDraw 

toggle link geometries rendering

Prop_LinkGeometry 

the geometry of the link changed

Prop_LinkStatic 

static property of link changed

Prop_LinkEnable 

enable property of link changed

Prop_LinkDynamics 

mass/inertia properties of link changed

Prop_Links 

all properties of all links

Prop_JointCustomParameters 

when Joint::SetFloatParameters() and Joint::SetIntParameters() are called

Prop_LinkCustomParameters 

when Link::SetFloatParameters() and Link::SetIntParameters() are called

Prop_RobotSensors 

[robot only] all properties of all sensors

Prop_Sensors 
Prop_RobotSensorPlacement 

[robot only] relative sensor placement of sensors

Prop_SensorPlacement 
Prop_RobotActiveDOFs 

[robot only] active dofs changed

Prop_RobotManipulatorTool 

[robot only] the tool coordinate system changed

Prop_RobotManipulatorName 

[robot only] the manipulator name

Prop_RobotManipulatorSolver 
Prop_RobotManipulators 

[robot only] all properties of all manipulators

Definition at line 46 of file kinbody.h.

Parameters passed into the state savers to control what information gets saved.

Enumerator:
Save_LinkTransformation 

[default] save link transformations and joint branches

Save_LinkEnable 

[default] save link enable states

Save_LinkVelocities 

save the link velocities

Save_JointMaxVelocityAndAcceleration 

save the max joint velocities and accelerations for the controller DOF

Save_ActiveDOF 

[robot only], saves and restores the current active degrees of freedom

Save_ActiveManipulator 

[robot only], saves the active manipulator

Save_GrabbedBodies 

[robot only], saves the grabbed state of the bodies. This does not affect the configuraiton of those bodies.

Definition at line 1180 of file kinbody.h.

Constructor & Destructor Documentation

OpenRAVE::KinBody::~KinBody ( )
virtual

Definition at line 128 of file kinbody.cpp.

OpenRAVE::KinBody::KinBody ( InterfaceType  type,
EnvironmentBasePtr  penv 
)
protected

constructors declared protected so that user always goes through environment to create bodies

Definition at line 118 of file kinbody.cpp.

Member Function Documentation

void OpenRAVE::KinBody::_AttachBody ( KinBodyPtr  body)
protectedvirtual

adds an attached body

Definition at line 3853 of file kinbody.cpp.

void OpenRAVE::KinBody::_ComputeDOFLinkVelocities ( std::vector< dReal > &  dofvelocities,
std::vector< std::pair< Vector, Vector > > &  linkvelocities,
bool  usebaselinkvelocity = true 
) const
protectedvirtual

returns the dof velocities and link velocities

Parameters
[in]usebaselinkvelocityif true, will compute all velocities using the base link velocity. otherwise will assume it is 0

Definition at line 2701 of file kinbody.cpp.

void OpenRAVE::KinBody::_ComputeInternalInformation ( )
protectedvirtual

Final post-processing stage before a kinematics body can be used.

This method is called after the body is finished being initialized with data and before being added to the environment. Also builds the hashes. Builds the internal hierarchy and kinematic body hash.

Avoids making specific calls on the collision checker (like CheckCollision) or physics engine (like simulating velocities/torques) since this information can change depending on the attached plugin.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 2957 of file kinbody.cpp.

void OpenRAVE::KinBody::_ComputeLinkAccelerations ( const std::vector< dReal > &  dofvelocities,
const std::vector< dReal > &  dofaccelerations,
const std::vector< std::pair< Vector, Vector > > &  linkvelocities,
std::vector< std::pair< Vector, Vector > > &  linkaccelerations,
const Vector gravity 
) const
protectedvirtual

Computes accelerations of the links given all the necessary data of the robot.

See Also
GetLinkAccelerations

for passive joints that are not mimic and are not static, will call Joint::GetVelocities to get their initial velocities (this is state dependent!)

Parameters
dofvelocitiesif size is 0, will assume all velocities are 0
dofaccelerationsif size is 0, will assume all accelerations are 0

Definition at line 2737 of file kinbody.cpp.

bool OpenRAVE::KinBody::_IsAttached ( KinBodyConstPtr  body,
std::set< KinBodyConstPtr > &  setChecked 
) const
protectedvirtual

Return true if two bodies should be considered as one during collision (ie one is grabbing the other)

Definition at line 3839 of file kinbody.cpp.

void OpenRAVE::KinBody::_ParametersChanged ( int  parameters)
protectedvirtual

Called to notify the body that certain groups of parameters have been changed.

This function in calls every registers calledback that is tracking the changes. It also recomputes the hashes if geometry changed.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 4144 of file kinbody.cpp.

bool OpenRAVE::KinBody::_RemoveAttachedBody ( KinBodyPtr  body)
protectedvirtual

removes an attached body

Returns
true if body was successfully found and removed

Definition at line 3859 of file kinbody.cpp.

void OpenRAVE::KinBody::_ResetInternalCollisionCache ( )
protectedvirtual

resets cached information dependent on the collision checker (usually called when the collision checker is switched or some big mode is set.

Definition at line 3955 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::CalculateAngularVelocityJacobian ( int  linkindex,
std::vector< dReal > &  jacobian 
) const
inlinevirtual

Computes the angular velocity jacobian of a specified link about the axes of world coordinates.

Definition at line 1617 of file kinbody.h.

void OpenRAVE::KinBody::CalculateAngularVelocityJacobian ( int  linkindex,
boost::multi_array< dReal, 2 > &  jacobian 
) const
virtual

calls std::vector version of CalculateAngularVelocityJacobian internally, a little inefficient since it copies memory

Definition at line 1942 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::CalculateJacobian ( int  linkindex,
const Vector position,
std::vector< dReal > &  jacobian 
) const
inlinevirtual

calls std::vector version of ComputeJacobian internally

Definition at line 1593 of file kinbody.h.

void OpenRAVE::KinBody::CalculateJacobian ( int  linkindex,
const Vector position,
boost::multi_array< dReal, 2 > &  jacobian 
) const
virtual

calls std::vector version of ComputeJacobian internally, a little inefficient since it copies memory

Definition at line 1731 of file kinbody.cpp.

void OpenRAVE::KinBody::CalculateRotationJacobian ( int  linkindex,
const Vector quat,
std::vector< dReal > &  jacobian 
) const
virtual

Computes the rotational jacobian as a quaternion with respect to an initial rotation.

Parameters
linkindexof the link that the rotation is attached to
qInitialRotthe rotation in world space whose derivative to take from.
jacobian4xDOF matrix

Definition at line 1747 of file kinbody.cpp.

void OpenRAVE::KinBody::CalculateRotationJacobian ( int  linkindex,
const Vector quat,
boost::multi_array< dReal, 2 > &  jacobian 
) const
virtual

calls std::vector version of CalculateRotationJacobian internally, a little inefficient since it copies memory

Definition at line 1823 of file kinbody.cpp.

bool OpenRAVE::KinBody::CheckSelfCollision ( CollisionReportPtr  report = CollisionReportPtr()) const
virtual

Check if body is self colliding. Links that are joined together are ignored.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 2946 of file kinbody.cpp.

void OpenRAVE::KinBody::Clone ( InterfaceBaseConstPtr  preference,
int  cloningoptions 
)
virtual

Clone the contents of an interface to the current interface.

Parameters
preferencethe interface whose information to clone
cloningoptionsmask of CloningOptions
Exceptions
openrave_exceptionif command doesn't succeed

Reimplemented from OpenRAVE::InterfaceBase.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 4033 of file kinbody.cpp.

AABB OpenRAVE::KinBody::ComputeAABB ( ) const
virtual

Return an axis-aligned bounding box of the entire object in the world coordinate system.

Definition at line 1076 of file kinbody.cpp.

void OpenRAVE::KinBody::ComputeHessianAxisAngle ( int  linkindex,
std::vector< dReal > &  hessian,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Computes the DOFx3xDOF hessian of the rotation represented as angle-axis.

    Arjang Hourtash. "The Kinematic Hessian and Higher Derivatives", IEEE Symposium on Computational Intelligence in Robotics and Automation (CIRA), 2005.

    Can be used to find the world axis-angle acceleration
    @code 
    accel = Jacobian * dofaccelerations + dofvelocities^T * Hessian * dofvelocities
    \endcode

    It can also be used for a second-order approximation of the axis-angle given delta dof values
    @code 
    newaxisangle = axisangle + Jacobian * delta + 0.5 * delta^T * Hessian * delta
    \endcode

    H[i,j.k] = hessian[k+DOF*(j+3*i)]
    delta[j] = sum_i sum_k values[i] * H[i,j,k] * values[k]

/

Parameters
linkindexof the link that defines the frame the position is attached to /
hessianDOFx3xDOF matrix such that numpy.dot(dq,numpy.dot(hessian,dq)) is the expected second-order delta angle-axis /
dofindicesthe dof indices to compute the hessian for. If empty, will compute for all the dofs

Definition at line 2179 of file kinbody.cpp.

void OpenRAVE::KinBody::ComputeHessianTranslation ( int  linkindex,
const Vector position,
std::vector< dReal > &  hessian,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Computes the DOFx3xDOF hessian of the linear translation.

    Arjang Hourtash. "The Kinematic Hessian and Higher Derivatives", IEEE Symposium on Computational Intelligence in Robotics and Automation (CIRA), 2005.

    Can be used to find the world position acceleration
    @code 
    accel = Jacobian * dofaccelerations + dofvelocities^T * Hessian * dofvelocities
    \endcode

    It can also be used for a second-order approximation of the position given delta dof values
    @code 
    newposition = position + Jacobian * delta + 0.5 * delta^T * Hessian * delta
    \endcode

    H[i,j.k] = hessian[k+DOF*(j+3*i)]
    delta[j] = sum_i sum_k values[i] * H[i,j,k] * values[k]

/

Parameters
linkindexof the link that defines the frame the position is attached to /
positionposition in world space where to compute derivatives from. /
hessianDOFx3xDOF matrix such that numpy.dot(dq,numpy.dot(hessian,dq)) is the expected second-order delta translation /
dofindicesthe dof indices to compute the hessian for. If empty, will compute for all the dofs

Definition at line 1958 of file kinbody.cpp.

void OpenRAVE::KinBody::ComputeInverseDynamics ( std::vector< dReal > &  doftorques,
const std::vector< dReal > &  dofaccelerations,
const ForceTorqueMap externalforcetorque = ForceTorqueMap() 
) const
virtual

Computes the inverse dynamics (torques) from the current robot position, velocity, and acceleration.

The dof values are ready from GetDOFValues() and GetDOFVelocities(). Because openrave does not have a state for robot acceleration, it has to be inserted as a parameter to this function. Acceleration due to gravitation is extracted from GetEnv()->GetPhysicsEngine()->GetGravity(). The method uses Recursive Newton Euler algorithm from Walker Orin and Corke.

Parameters
[out]doftorquesThe output torques.
[in]dofaccelerationsThe dof accelerations of the current robot state. If the size is 0, assumes all accelerations are 0 (this should be faster)
[in]externalforcetorque[optional] Specifies all the external forces/torques acting on the links at their center of mass.

Definition at line 2390 of file kinbody.cpp.

void OpenRAVE::KinBody::ComputeInverseDynamics ( boost::array< std::vector< dReal >, 3 > &  doftorquecomponents,
const std::vector< dReal > &  dofaccelerations,
const ForceTorqueMap externalforcetorque = ForceTorqueMap() 
) const
virtual

Computes the separated inverse dynamics torque terms from the current robot position, velocity, and acceleration.

torques = M(dofvalues) * dofaccel + C(dofvalues,dofvel) * dofvel + G(dofvalues)

Where torques - generalized forces associated with dofvalues M - manipulator inertia tensor (symmetric joint-space inertia) C - coriolis and centripetal effects G - gravity loading + external forces due to externalforcetorque + base link angular acceleration contribution

The dof values are ready from GetDOFValues() and GetDOFVelocities(). Because openrave does not have a state for robot acceleration, it has to be inserted as a parameter to this function. Acceleration due to gravitation is extracted from GetEnv()->GetPhysicsEngine()->GetGravity(). The method uses Recursive Newton Euler algorithm from Walker Orin and Corke.

Parameters
[out]doftorquecomponentsA set of 3 torques [M(dofvalues) * dofaccel, C(dofvalues,dofvel) * dofvel, G(dofvalues)]
[in]dofaccelerationsThe dof accelerations of the current robot state. If the size is 0, assumes all accelerations are 0 (this should be faster)
[in]externalforcetorque[optional] Specifies all the external forces/torques acting on the links at their center of mass.

Definition at line 2493 of file kinbody.cpp.

void OpenRAVE::KinBody::ComputeJacobianAxisAngle ( int  linkindex,
std::vector< dReal > &  jacobian,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Computes the angular velocity jacobian of a specified link about the axes of world coordinates.

Parameters
linkindexof the link that the rotation is attached to
vjacobian3xDOF matrix

Definition at line 1839 of file kinbody.cpp.

void OpenRAVE::KinBody::ComputeJacobianTranslation ( int  linkindex,
const Vector position,
std::vector< dReal > &  jacobian,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Computes the translation jacobian with respect to a world position.

Gets the jacobian with respect to a link by computing the partial differentials for all joints that in the path from the root node to GetLinks()[index] (doesn't touch the rest of the values)

Parameters
linkindexof the link that defines the frame the position is attached to
positionposition in world space where to compute derivatives from.
jacobian3xDOF matrix
dofindicesthe dof indices to compute the jacobian for. If empty, will compute for all the dofs

Definition at line 1627 of file kinbody.cpp.

void OpenRAVE::KinBody::Destroy ( )
virtual

Reimplemented in OpenRAVE::RobotBase.

Definition at line 134 of file kinbody.cpp.

int8_t OpenRAVE::KinBody::DoesAffect ( int  jointindex,
int  linkindex 
) const
virtual

Returns a nonzero value if the joint effects the link transformation.

In closed loops, all joints on all paths to the root link are counted as affecting the link. If a mimic joint affects the link, then all the joints used in the mimic joint's computation affect the link. If negative, the partial derivative of the Jacobian should be negated.

Parameters
jointindexindex of the joint
linkindexindex of the link

Definition at line 3940 of file kinbody.cpp.

void OpenRAVE::KinBody::Enable ( bool  enable)
virtual

Enables or disables all the links.

Definition at line 3882 of file kinbody.cpp.

const std::set< int > & OpenRAVE::KinBody::GetAdjacentLinks ( ) const
virtual

return all possible link pairs whose collisions are ignored.

Definition at line 4027 of file kinbody.cpp.

void OpenRAVE::KinBody::GetAttached ( std::set< KinBodyPtr > &  setAttached) const
virtual

Recursively get all attached bodies of this body, including this body.

Parameters
setAttachedfills with the attached bodies. If any bodies are already in setAttached, then ignores recursing on their attached bodies.

Definition at line 3828 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::GetBodyTransformations ( std::vector< Transform > &  transforms) const
inlinevirtual
Deprecated:
(11/05/26)

Definition at line 1463 of file kinbody.h.

Vector OpenRAVE::KinBody::GetCenterOfMass ( ) const
virtual

Return the center of mass of entire robot in the world coordinate system.

Definition at line 1125 of file kinbody.cpp.

bool OpenRAVE::KinBody::GetChain ( int  linkindex1,
int  linkindex2,
std::vector< JointPtr > &  vjoints 
) const
virtual

Computes the minimal chain of joints that are between two links in the order of linkindex1 to linkindex2.

Passive joints are also used in the computation of the chain and can be returned. Note that a passive joint has a joint index and dof index of -1.

Parameters
[in]linkindex1the link index to start the search
[in]linkindex2the link index where the search ends
[out]vjointsthe joints to fill that describe the chain
Returns
true if the two links are connected (vjoints will be filled), false if the links are separate

Definition at line 1545 of file kinbody.cpp.

bool OpenRAVE::KinBody::GetChain ( int  linkindex1,
int  linkindex2,
std::vector< LinkPtr > &  vlinks 
) const
virtual

similar to GetChain(int,int,std::vector<JointPtr>&) except returns the links along the path.

Definition at line 1566 of file kinbody.cpp.

const std::vector< std::vector< std::pair< KinBody::LinkPtr, KinBody::JointPtr > > > & OpenRAVE::KinBody::GetClosedLoops ( ) const
virtual

Return the set of unique closed loops of the kinematics hierarchy.

Each loop is a set of link indices and joint indices. For example, a loop of link indices: [l_0,l_1,l_2] will consist of three joints connecting l_0 to l_1, l_1 to l_2, and l_2 to l_0. The first element in the pair is the link l_X, the second element in the joint connecting l_X to l_(X+1).

Definition at line 1539 of file kinbody.cpp.

virtual UserDataPtr OpenRAVE::KinBody::GetCollisionData ( ) const
inlinevirtual
Deprecated:
(12/12/11)

Definition at line 1760 of file kinbody.h.

ConfigurationSpecification OpenRAVE::KinBody::GetConfigurationSpecification ( const std::string &  interpolation = "") const
virtual

return the configuration specification of the joint values and transform

Note that the return type is by-value, so should not be used in iteration

Definition at line 4243 of file kinbody.cpp.

ConfigurationSpecification OpenRAVE::KinBody::GetConfigurationSpecificationIndices ( const std::vector< int > &  indices,
const std::string &  interpolation = "" 
) const
virtual

return the configuration specification of the specified joint indices.

Note that the return type is by-value, so should not be used in iteration

Definition at line 4256 of file kinbody.cpp.

void OpenRAVE::KinBody::GetConfigurationValues ( std::vector< dReal > &  v) const
virtual

returns the configuration values as specified by GetConfigurationSpecification()

Definition at line 4236 of file kinbody.cpp.

const std::vector< KinBody::JointPtr > & OpenRAVE::KinBody::GetDependencyOrderedJoints ( ) const
virtual

Returns the joints in hierarchical order starting at the base link.

In the case of closed loops, the joints are returned in the order closest to the root. All the joints affecting a particular joint's transformation will always come before the joint in the list.

Definition at line 1533 of file kinbody.cpp.

int OpenRAVE::KinBody::GetDOF ( ) const
virtual

Number controllable degrees of freedom of the body.

Only uses _vecjoints and last joint for computation, so can work before _ComputeInternalInformation is called.

Definition at line 424 of file kinbody.cpp.

void OpenRAVE::KinBody::GetDOFAccelerationLimits ( std::vector< dReal > &  maxaccelerations,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Returns the max acceleration for each DOF.

Parameters
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Definition at line 551 of file kinbody.cpp.

void OpenRAVE::KinBody::GetDOFLimits ( std::vector< dReal > &  lowerlimit,
std::vector< dReal > &  upperlimit,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Returns all the joint limits as organized by the DOF indices.

Parameters
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Definition at line 477 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::GetDOFMaxAccel ( std::vector< dReal > &  v) const
inlinevirtual

Definition at line 1327 of file kinbody.h.

void OpenRAVE::KinBody::GetDOFMaxTorque ( std::vector< dReal > &  v) const
virtual

Definition at line 582 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::GetDOFMaxVel ( std::vector< dReal > &  v) const
inlinevirtual
Deprecated:
(11/05/26)

Definition at line 1324 of file kinbody.h.

void OpenRAVE::KinBody::GetDOFResolutions ( std::vector< dReal > &  v,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

get the dof resolutions

Parameters
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Definition at line 593 of file kinbody.cpp.

void OpenRAVE::KinBody::GetDOFTorqueLimits ( std::vector< dReal > &  maxaccelerations) const
virtual

Returns the max torque for each DOF.

Definition at line 571 of file kinbody.cpp.

void OpenRAVE::KinBody::GetDOFValues ( std::vector< dReal > &  v,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Returns all the joint values as organized by the DOF indices.

Parameters
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Definition at line 429 of file kinbody.cpp.

void OpenRAVE::KinBody::GetDOFVelocities ( std::vector< dReal > &  v,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Returns all the joint velocities as organized by the DOF indices.

Parameters
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Definition at line 457 of file kinbody.cpp.

void OpenRAVE::KinBody::GetDOFVelocityLimits ( std::vector< dReal > &  lowerlimit,
std::vector< dReal > &  upperlimit,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Returns all the joint velocity limits as organized by the DOF indices.

Parameters
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Definition at line 504 of file kinbody.cpp.

void OpenRAVE::KinBody::GetDOFVelocityLimits ( std::vector< dReal > &  maxvelocities,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Returns the max velocity for each DOF.

Parameters
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Definition at line 531 of file kinbody.cpp.

void OpenRAVE::KinBody::GetDOFWeights ( std::vector< dReal > &  v,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

get dof weights

Parameters
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Definition at line 612 of file kinbody.cpp.

int OpenRAVE::KinBody::GetEnvironmentId ( ) const
virtual

return a unique id of the body used in the environment.

If object is not added to the environment, this will return 0. So checking if GetEnvironmentId() is 0 is a good way to check if object is present in the environment. This id will not be copied when cloning in order to respect another environment's ids.

Definition at line 3935 of file kinbody.cpp.

static InterfaceType OpenRAVE::KinBody::GetInterfaceTypeStatic ( )
inlinestatic

return the static interface type this class points to (used for safe casting)

Definition at line 1230 of file kinbody.h.

KinBody::JointPtr OpenRAVE::KinBody::GetJoint ( const std::string &  name) const
virtual

Return a pointer to the joint with the given name. Search in the regular and passive joints.

Definition at line 1612 of file kinbody.cpp.

KinBody::JointPtr OpenRAVE::KinBody::GetJointFromDOFIndex ( int  dofindex) const
virtual

Returns the joint that covers the degree of freedom index.

Note that the mapping of joint structures is not the same as the values in GetJointValues since each joint can have more than one degree of freedom.

Definition at line 1071 of file kinbody.cpp.

int OpenRAVE::KinBody::GetJointIndex ( const std::string &  name) const
virtual

Return the index of the joint with the given name, else -1.

Definition at line 1600 of file kinbody.cpp.

const std::vector<JointPtr>& OpenRAVE::KinBody::GetJoints ( ) const
inline

Returns the joints making up the controllable degrees of freedom of the body.

Definition at line 1360 of file kinbody.h.

const std::string & OpenRAVE::KinBody::GetKinematicsGeometryHash ( ) const
virtual

A md5 hash unique to the particular kinematic and geometric structure of a KinBody.

This 32 byte string can be used to check if two bodies have the same kinematic structure and can be used to index into tables when looking for body-specific models. OpenRAVE stores all such models in the OPENRAVE_HOME directory (usually ~/.openrave), indexed by the particular robot/body hashes.

Returns
md5 hash string of kinematics/geometry

Definition at line 4213 of file kinbody.cpp.

KinBody::LinkPtr OpenRAVE::KinBody::GetLink ( const std::string &  name) const
virtual

return a pointer to the link with the given name

Definition at line 1523 of file kinbody.cpp.

void OpenRAVE::KinBody::GetLinkAccelerations ( const std::vector< dReal > &  dofaccelerations,
std::vector< std::pair< Vector, Vector > > &  linkaccelerations 
) const
virtual

Returns the linear and angular accelerations for each link given the dof accelerations.

Computes accelerations of the link frames with respect to the world coordinate system are returned. The base angular velocity is used when computing accelerations. The gravity vector from the physics engine is used as the accelerations for the base link and static links. The derivate is taken with respect to the world origin fixed in space (also known as spatial acceleration). The current angles and velocities set on the robot are used. Note that this function calls the internal _ComputeLinkAccelerations function, so for users that are interested in overriding it, override _ComputeLinkAccelerations

Parameters
[in]dofaccelerationsthe accelerations of each of the DOF
[out]linkaccelerationsthe linear and angular accelerations of link (in that order)

Definition at line 2687 of file kinbody.cpp.

virtual const std::vector<LinkPtr>& OpenRAVE::KinBody::GetLinks ( ) const
inlinevirtual

Returns all the rigid links of the body.

Definition at line 1444 of file kinbody.h.

virtual void OpenRAVE::KinBody::GetLinkTransformations ( std::vector< Transform > &  transforms) const
virtual

get the transformations of all the links at once

virtual void OpenRAVE::KinBody::GetLinkTransformations ( std::vector< Transform > &  transforms,
std::vector< int > &  dofbranches 
) const
virtual

get the transformations of all the links and the dof branches at once.

Knowing the dof branches allows the robot to recover the full state of the joints with SetLinkTransformations

void OpenRAVE::KinBody::GetLinkVelocities ( std::vector< std::pair< Vector, Vector > > &  velocities) const
virtual

Returns the linear and angular velocities for each link.

Parameters
[out]velocitiesThe velocities of the link frames with respect to the world coordinate system are returned.

Definition at line 1026 of file kinbody.cpp.

virtual ManageDataPtr OpenRAVE::KinBody::GetManageData ( ) const
inlinevirtual

Definition at line 1763 of file kinbody.h.

virtual const std::string& OpenRAVE::KinBody::GetName ( ) const
inlinevirtual

Unique name of the robot.

Definition at line 1274 of file kinbody.h.

const std::set< int > & OpenRAVE::KinBody::GetNonAdjacentLinks ( int  adjacentoptions = 0) const
virtual

return all possible link pairs that could get in collision.

Parameters
adjacentoptionsa bitmask of AdjacentOptions values

Reimplemented in OpenRAVE::RobotBase.

Definition at line 3963 of file kinbody.cpp.

const std::vector<JointPtr>& OpenRAVE::KinBody::GetPassiveJoints ( ) const
inline

Returns the passive joints, order does not matter.

A passive joint is not directly controlled by the body's degrees of freedom so it has no joint index and no dof index. Passive joints allows mimic joints to be hidden from the users. However, there are cases when passive joints are not mimic; for example, suspension mechanism on vehicles.

Definition at line 1370 of file kinbody.h.

virtual UserDataPtr OpenRAVE::KinBody::GetPhysicsData ( ) const
inlinevirtual
Deprecated:
(12/12/11)

Definition at line 1756 of file kinbody.h.

Transform OpenRAVE::KinBody::GetTransform ( ) const
virtual

queries the transfromation of the first link of the body

Definition at line 765 of file kinbody.cpp.

virtual int OpenRAVE::KinBody::GetUpdateStamp ( ) const
inlinevirtual

Return a unique id for every transformation state change of any link. Used to check if robot state has changed.

The stamp is used by the collision checkers, physics engines, or any other item that needs to keep track of any changes of the KinBody as it moves. Currently stamps monotonically increment for every transformation/joint angle change.

Definition at line 1772 of file kinbody.h.

virtual UserDataPtr OpenRAVE::KinBody::GetViewerData ( ) const
inlinevirtual
Deprecated:
(12/12/11)

Definition at line 1737 of file kinbody.h.

bool OpenRAVE::KinBody::Init ( const std::vector< LinkInfoConstPtr > &  linkinfos,
const std::vector< JointInfoConstPtr > &  jointinfos 
)
virtual

initializes an complex kinematics body with links and joints

Parameters
linkinfosinformation for all the links. Links will be created in this order
jointinfosinformation for all the joints. Joints might be rearranged depending on their mimic properties

Definition at line 325 of file kinbody.cpp.

bool OpenRAVE::KinBody::InitFromBoxes ( const std::vector< AABB > &  boxes,
bool  visible 
)
virtual

Create a kinbody with one link composed of an array of aligned bounding boxes.

Parameters
boxesthe array of aligned bounding boxes that will comprise of the body
visibleif true, the boxes will be rendered in the scene

Definition at line 171 of file kinbody.cpp.

bool OpenRAVE::KinBody::InitFromBoxes ( const std::vector< OBB > &  boxes,
bool  visible 
)
virtual

Create a kinbody with one link composed of an array of oriented bounding boxes.

Parameters
boxesthe array of oriented bounding boxes that will comprise of the body
visibleif true, the boxes will be rendered in the scene

Definition at line 207 of file kinbody.cpp.

bool OpenRAVE::KinBody::InitFromGeometries ( const std::vector< KinBody::GeometryInfoConstPtr > &  geometries)
virtual

Create a kinbody with one link composed of a list of geometries.

Parameters
geometriesa list of geometry infos to be initialized into new geometry objects, note that the geometry info data is copied
visibleif true, will be rendered in the scene

Definition at line 306 of file kinbody.cpp.

bool OpenRAVE::KinBody::InitFromGeometries ( const std::list< KinBody::GeometryInfo > &  geometries)
virtual

Definition at line 297 of file kinbody.cpp.

bool OpenRAVE::KinBody::InitFromSpheres ( const std::vector< Vector > &  spheres,
bool  visible 
)
virtual

Create a kinbody with one link composed of an array of spheres.

Parameters
spheresthe XYZ position of the spheres with the W coordinate representing the individual radius
visibleif true, the boxes will be rendered in the scene

Definition at line 248 of file kinbody.cpp.

bool OpenRAVE::KinBody::InitFromTrimesh ( const TriMesh trimesh,
bool  visible 
)
virtual

Create a kinbody with one link composed of a triangle mesh surface.

Parameters
trimeshthe triangle mesh
visibleif true, will be rendered in the scene

Definition at line 276 of file kinbody.cpp.

bool OpenRAVE::KinBody::IsAttached ( KinBodyConstPtr  body) const
virtual
Returns
true if two bodies should be considered as one during collision (ie one is grabbing the other)

Definition at line 3819 of file kinbody.cpp.

bool OpenRAVE::KinBody::IsDOFInChain ( int  linkindex1,
int  linkindex2,
int  dofindex 
) const
virtual

Returns true if the dof index affects the relative transformation between the two links.

The internal implementation uses KinBody::DoesAffect, therefore mimic indices are correctly handled.

Parameters
[in]linkindex1the link index to start the search
[in]linkindex2the link index where the search ends

Definition at line 1593 of file kinbody.cpp.

bool OpenRAVE::KinBody::IsEnabled ( ) const
virtual
Returns
true if any link of the KinBody is enabled

Definition at line 3897 of file kinbody.cpp.

virtual bool OpenRAVE::KinBody::IsRobot ( ) const
inlinevirtual

Return true if this body is derived from RobotBase.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 1716 of file kinbody.h.

bool OpenRAVE::KinBody::IsVisible ( ) const
virtual
Returns
true if any link of the KinBody is visible.

Definition at line 3925 of file kinbody.cpp.

UserDataPtr OpenRAVE::KinBody::RegisterChangeCallback ( int  properties,
const boost::function< void()> &  callback 
) const
virtual

Register a callback with the interface.

Everytime a static property of the interface changes, all registered callbacks are called to update the users of the changes. Note that the callbacks will block the thread that made the parameter change.

Parameters
callback
propertiesa mask of the KinBodyProperty values that the callback should be called for when they change

Definition at line 4275 of file kinbody.cpp.

void OpenRAVE::KinBody::Serialize ( BaseXMLWriterPtr  writer,
int  options = 0 
) const
virtual

serializes the interface

The readable interfaces are also serialized within the tag, for example:

<sometag> <!-- root writer -->
<interface> <!-- first child -->
<readableinterface/> <!-- readable interface -->
</interface>
</sometag>

Depending on the writer format, extra tags might be created.

Reimplemented from OpenRAVE::InterfaceBase.

Definition at line 4180 of file kinbody.cpp.

void OpenRAVE::KinBody::serialize ( std::ostream &  o,
int  options 
) const
virtual

only used for hashes...

Reimplemented in OpenRAVE::RobotBase.

Definition at line 4185 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::SetBodyTransformations ( const std::vector< Transform > &  transforms)
inlinevirtual
Deprecated:
(11/05/26)

Definition at line 1575 of file kinbody.h.

virtual void OpenRAVE::KinBody::SetCollisionData ( UserDataPtr  pdata)
inlineprotectedvirtual
Deprecated:
(12/12/11)

Definition at line 1850 of file kinbody.h.

void OpenRAVE::KinBody::SetConfigurationValues ( std::vector< dReal >::const_iterator  itvalues,
uint32_t  checklimits = CLA_CheckLimits 
)
virtual

sets joint values and transform of the body using configuration values as specified by GetConfigurationSpecification()

Parameters
itvaluesthe iterator to the vector containing the dof values. Must have GetConfigurationSpecification().GetDOF() values!
[in]checklimitsone of CheckLimitsAction and will excplicitly check the joint limits before setting the values and clamp them.

Definition at line 4225 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFAccelerationLimits ( const std::vector< dReal > &  maxlimits)
virtual
See Also
GetDOFAccelerationLimits

Definition at line 699 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFLimits ( const std::vector< dReal > &  lower,
const std::vector< dReal > &  upper 
)
virtual
See Also
GetDOFLimits

Definition at line 655 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFTorqueLimits ( const std::vector< dReal > &  maxlimits)
virtual
See Also
GetDOFTorqueLimits

Definition at line 709 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFTorques ( const std::vector< dReal > &  torques,
bool  add 
)
virtual

Adds a torque to every joint.

Parameters
bAddif true, adds to previous torques, otherwise resets the torques on all bodies and starts from 0

Definition at line 407 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFValues ( const std::vector< dReal > &  values,
uint32_t  checklimits = CLA_CheckLimits,
const std::vector< int > &  dofindices = std::vector<int>() 
)
virtual

Sets the joint values of the robot.

Parameters
valuesthe values to set the joint angles (ordered by the dof indices)
[in]checklimitsone of CheckLimitsAction and will excplicitly check the joint limits before setting the values and clamp them.
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Reimplemented in OpenRAVE::RobotBase.

Definition at line 1200 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFValues ( const std::vector< dReal > &  values,
const Transform transform,
uint32_t  checklimits = CLA_CheckLimits 
)
virtual

Sets the joint values and transformation of the body.

Parameters
valuesthe values to set the joint angles (ordered by the dof indices)
transformrepresents the transformation of the first body.
[in]checklimitsone of CheckLimitsAction and will excplicitly check the joint limits before setting the values and clamp them.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 1185 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFVelocities ( const std::vector< dReal > &  dofvelocities,
const Vector linearvel,
const Vector angularvel,
uint32_t  checklimits = CLA_CheckLimits 
)
virtual

Sets the velocity of the base link and each of the joints.

Computes internally what the correponding velocities of each of the links should be in order to achieve consistent results with the joint velocities. Sends the velocities to the physics engine. Velocities correspond to the link's coordinate system origin.

Parameters
[in]linearvellinear velocity of base link
[in]angularvelangular velocity rotation_axis*theta_dot
[in]dofvelocities- velocities of each of the degrees of freeom
[in]checklimitsone of CheckLimitsAction and will excplicitly check the joint velocity limits before setting the values and clamp them.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 783 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFVelocities ( const std::vector< dReal > &  dofvelocities,
uint32_t  checklimits = CLA_CheckLimits,
const std::vector< int > &  dofindices = std::vector<int>() 
)
virtual

Sets the velocity of the joints.

Copies the current velocity of the base link and calls SetDOFVelocities(linearvel,angularvel,vDOFVelocities)

Parameters
[in]dofvelocities- velocities of each of the degrees of freeom
[in]checklimitsif >0, will excplicitly check the joint velocity limits before setting the values and clamp them. If == 1, then will warn if the limits are overboard, if == 2, then will not warn (used for code that knows it's giving bad values)
dofindicesthe dof indices to return the values for. If empty, will compute for all the dofs

Reimplemented in OpenRAVE::RobotBase.

Definition at line 986 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFVelocityLimits ( const std::vector< dReal > &  maxlimits)
virtual
See Also
GetDOFVelocityLimits

Definition at line 689 of file kinbody.cpp.

void OpenRAVE::KinBody::SetDOFWeights ( const std::vector< dReal > &  weights,
const std::vector< int > &  dofindices = std::vector<int>() 
)
virtual

sets dof weights

Parameters
dofindicesthe dof indices to set the values for. If empty, will use all the dofs

Definition at line 632 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::SetJointValues ( const std::vector< dReal > &  values,
bool  checklimits = true 
)
inlinevirtual

Definition at line 1550 of file kinbody.h.

virtual void OpenRAVE::KinBody::SetJointValues ( const std::vector< dReal > &  values,
const Transform transform,
bool  checklimits = true 
)
inlinevirtual

Definition at line 1561 of file kinbody.h.

void OpenRAVE::KinBody::SetLinkTransformations ( const std::vector< Transform > &  transforms)
virtual

sets the transformations of all the links at once

Reimplemented in OpenRAVE::RobotBase.

Definition at line 1142 of file kinbody.cpp.

void OpenRAVE::KinBody::SetLinkTransformations ( const std::vector< Transform > &  transforms,
const std::vector< int > &  dofbranches 
)
virtual

sets the transformations of all the links and dof branches at once.

Using dof branches allows the full joint state to be recovered

Reimplemented in OpenRAVE::RobotBase.

Definition at line 1164 of file kinbody.cpp.

void OpenRAVE::KinBody::SetLinkVelocities ( const std::vector< std::pair< Vector, Vector > > &  velocities)
virtual

sets the link velocities

Definition at line 1180 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::SetManageData ( ManageDataPtr  pdata)
inlineprotectedvirtual

Definition at line 1858 of file kinbody.h.

void OpenRAVE::KinBody::SetName ( const std::string &  name)
virtual

Set the name of the body, notifies the environment and checks for uniqueness.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 389 of file kinbody.cpp.

void OpenRAVE::KinBody::SetNonCollidingConfiguration ( )
virtual

Treats the current pose as a pose not in collision, which sets the adjacent pairs of links.

Definition at line 3948 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::SetPhysicsData ( UserDataPtr  pdata)
inlineprotectedvirtual
Deprecated:
(12/12/11)

Definition at line 1846 of file kinbody.h.

void OpenRAVE::KinBody::SetTransform ( const Transform transform)
virtual

set the transform of the first link (the rest of the links are computed based on the joint values).

Parameters
transformaffine transformation

Reimplemented in OpenRAVE::RobotBase.

Definition at line 753 of file kinbody.cpp.

bool OpenRAVE::KinBody::SetVelocity ( const Vector linearvel,
const Vector angularvel 
)
virtual

Set the velocity of the base link, rest of links are set to a consistent velocity so entire robot moves correctly.

Parameters
linearvellinear velocity
angularvelis the rotation axis * angular speed

Reimplemented in OpenRAVE::RobotBase.

Definition at line 770 of file kinbody.cpp.

virtual void OpenRAVE::KinBody::SetViewerData ( UserDataPtr  pdata)
inlineprotectedvirtual
Deprecated:
(12/12/11)

Definition at line 1855 of file kinbody.h.

bool OpenRAVE::KinBody::SetVisible ( bool  visible)
virtual

Sets all the links as visible or not visible.

Returns
true if changed

Definition at line 3907 of file kinbody.cpp.

void OpenRAVE::KinBody::SetZeroConfiguration ( )
virtual

Sets the joint offsets so that the current configuration becomes the new zero state of the robot.

When this function returns, the returned DOF values should be all zero for controllable joints. Mimic equations will use the new offsetted values when computing their joints. This is primarily used for calibrating a robot's zero position

Definition at line 4201 of file kinbody.cpp.

KinBodyPtr OpenRAVE::KinBody::shared_kinbody ( )
inlineprotected

Definition at line 1838 of file kinbody.h.

KinBodyConstPtr OpenRAVE::KinBody::shared_kinbody_const ( ) const
inlineprotected

Definition at line 1841 of file kinbody.h.

void OpenRAVE::KinBody::SimulationStep ( dReal  fElapsedTime)
virtual

Updates the bounding box and any other parameters that could have changed by a simulation step.

Reimplemented in OpenRAVE::RobotBase.

Definition at line 719 of file kinbody.cpp.

void OpenRAVE::KinBody::SubtractDOFValues ( std::vector< dReal > &  values1,
const std::vector< dReal > &  values2,
const std::vector< int > &  dofindices = std::vector<int>() 
) const
virtual

Computes the configuration difference values1-values2 and stores it in values1.

Takes into account joint limits and wrapping of circular joints.

Parameters
inout]values1 the result is stored back in this
[in]values2
dofindicesthe dof indices to compute the subtraction for. If empty, will compute for all the dofs

Definition at line 723 of file kinbody.cpp.

Member Data Documentation

bool OpenRAVE::KinBody::_bMakeJoinedLinksAdjacent
protected

Definition at line 1932 of file kinbody.h.

int OpenRAVE::KinBody::_environmentid
protected
See Also
GetEnvironmentId

Definition at line 1927 of file kinbody.h.

std::list<KinBodyWeakPtr> OpenRAVE::KinBody::_listAttachedBodies
protected

list of bodies that are directly attached to this body (can have duplicates)

Definition at line 1918 of file kinbody.h.

std::list<UserDataWeakPtr> OpenRAVE::KinBody::_listRegisteredCallbacks
mutableprotected

callbacks to call when particular properties of the body change. the registration/deregistration of the list can happen at any point and does not modify the kinbody state exposed to the user, hence it is mutable

Definition at line 1919 of file kinbody.h.

std::string OpenRAVE::KinBody::_name
protected

name of body

Definition at line 1902 of file kinbody.h.

uint32_t OpenRAVE::KinBody::_nHierarchyComputed
protected

true if the joint heirarchy and other cached information is computed

Definition at line 1931 of file kinbody.h.

int OpenRAVE::KinBody::_nNonAdjacentLinkCache
mutableprotected

specifies what information is currently valid in the AdjacentOptions. Declared as mutable since data is cached. If 0x80000000 (ie < 0), then everything needs to be recomputed including _setNonAdjacentLinks[0].

Definition at line 1922 of file kinbody.h.

int OpenRAVE::KinBody::_nParametersChanged
protected

set of parameters that changed and need callbacks

Definition at line 1929 of file kinbody.h.

int OpenRAVE::KinBody::_nUpdateStampId
mutableprotected
See Also
GetUpdateStamp

Definition at line 1928 of file kinbody.h.

ManageDataPtr OpenRAVE::KinBody::_pManageData
protected

Definition at line 1930 of file kinbody.h.

std::set<int> OpenRAVE::KinBody::_setAdjacentLinks
protected

a set of which links are connected to which if link i and j are connected then i|(j<<16) will be in the set where i<j.

Definition at line 1915 of file kinbody.h.

boost::array<std::set<int>, 4> OpenRAVE::KinBody::_setNonAdjacentLinks
mutableprotected

contains cached versions of the non-adjacent links depending on values in AdjacentOptions. Declared as mutable since data is cached.

Definition at line 1921 of file kinbody.h.

ConfigurationSpecification OpenRAVE::KinBody::_spec
protected

Definition at line 1925 of file kinbody.h.

std::vector<std::pair<int16_t,int16_t> > OpenRAVE::KinBody::_vAllPairsShortestPaths
protected

all-pairs shortest paths through the link hierarchy. The first value describes the parent link index, and the second value is an index into _vecjoints or _vPassiveJoints. If the second value is greater or equal to _vecjoints.size() then it indexes into _vPassiveJoints.

Definition at line 1910 of file kinbody.h.

std::vector< std::vector< std::pair<int16_t,int16_t> > > OpenRAVE::KinBody::_vClosedLoopIndices
protected
See Also
GetClosedLoops

Definition at line 1913 of file kinbody.h.

std::vector< std::vector< std::pair<LinkPtr,JointPtr> > > OpenRAVE::KinBody::_vClosedLoops
protected
See Also
GetClosedLoops

Definition at line 1912 of file kinbody.h.

std::vector<int> OpenRAVE::KinBody::_vDOFIndices
protected

cached start joint indices, indexed by dof indices

Definition at line 1909 of file kinbody.h.

std::vector<JointPtr> OpenRAVE::KinBody::_vDOFOrderedJoints
protected

all joints of the body ordered on how they are arranged within the degrees of freedom

Definition at line 1907 of file kinbody.h.

std::vector<JointPtr> OpenRAVE::KinBody::_vecjoints
protected
See Also
GetJoints

Definition at line 1903 of file kinbody.h.

std::vector<LinkPtr> OpenRAVE::KinBody::_veclinks
protected
See Also
GetLinks

Definition at line 1908 of file kinbody.h.

std::vector< std::pair<std::string, std::string> > OpenRAVE::KinBody::_vForcedAdjacentLinks
protected

internally stores forced adjacent links

Definition at line 1917 of file kinbody.h.

std::vector<Transform> OpenRAVE::KinBody::_vInitialLinkTransformations
protected

the initial transformations of each link specifying at least one pose where the robot is collision free

Definition at line 1923 of file kinbody.h.

std::vector<int8_t> OpenRAVE::KinBody::_vJointsAffectingLinks
protected

joint x link: (jointindex*_veclinks.size()+linkindex). entry is non-zero if the joint affects the link in the forward kinematics. If negative, the partial derivative of ds/dtheta should be negated.

Definition at line 1911 of file kinbody.h.

std::vector<JointPtr> OpenRAVE::KinBody::_vPassiveJoints
protected
See Also
GetPassiveJoints()

Definition at line 1914 of file kinbody.h.

std::vector<int> OpenRAVE::KinBody::_vTopologicallySortedJointIndicesAll
protected

the joint indices of the joints in _vTopologicallySortedJointsAll. Passive joint indices have _vecjoints.size() added to them.

Definition at line 1906 of file kinbody.h.

std::vector<JointPtr> OpenRAVE::KinBody::_vTopologicallySortedJoints
protected
See Also
GetDependencyOrderedJoints

Definition at line 1904 of file kinbody.h.

std::vector<JointPtr> OpenRAVE::KinBody::_vTopologicallySortedJointsAll
protected

Similar to _vDependencyOrderedJoints except includes _vecjoints and _vPassiveJoints.

Definition at line 1905 of file kinbody.h.


The documentation for this class was generated from the following files: