[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>
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< Mimic > | MimicPtr |
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 | |
![]() | |
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() | |
![]() | |
InterfaceBase (InterfaceType type, EnvironmentBasePtr penv) | |
virtual | ~InterfaceBase () |
InterfaceType | GetInterfaceType () const |
const std::string & | GetXMLId () const |
const std::string & | GetPluginName () const |
EnvironmentBasePtr | GetEnv () const |
const READERSMAP & | GetReadableInterfaces () 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. | |
![]() | |
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 |
![]() | |
std::string | __description |
Additional Inherited Members | |
![]() | |
typedef boost::function< bool(std::ostream &, std::istream &)> | InterfaceCommandFn |
The function to be executed for every command. | |
[interface] A kinematic body of links and joints. If not specified, method is not multi-thread safe. See Kinematics Body Concepts.
typedef boost::shared_ptr<KinBody::BodyState const> OpenRAVE::KinBody::BodyStateConstPtr |
typedef boost::shared_ptr<KinBody::BodyState> OpenRAVE::KinBody::BodyStatePtr |
typedef std::map<int, std::pair<Vector,Vector> > OpenRAVE::KinBody::ForceTorqueMap |
typedef boost::shared_ptr<GeometryInfo const> OpenRAVE::KinBody::GeometryInfoConstPtr |
typedef boost::shared_ptr<GeometryInfo> OpenRAVE::KinBody::GeometryInfoPtr |
typedef boost::shared_ptr<KinBody::Joint const> OpenRAVE::KinBody::JointConstPtr |
typedef boost::shared_ptr<JointInfo const> OpenRAVE::KinBody::JointInfoConstPtr |
typedef boost::shared_ptr<JointInfo> OpenRAVE::KinBody::JointInfoPtr |
typedef boost::shared_ptr<KinBody::Joint> OpenRAVE::KinBody::JointPtr |
typedef boost::weak_ptr<KinBody::Joint> OpenRAVE::KinBody::JointWeakPtr |
typedef boost::shared_ptr<KinBodyStateSaver> OpenRAVE::KinBody::KinBodyStateSaverPtr |
typedef boost::shared_ptr<KinBody::Link const> OpenRAVE::KinBody::LinkConstPtr |
typedef boost::shared_ptr<LinkInfo const> OpenRAVE::KinBody::LinkInfoConstPtr |
typedef boost::shared_ptr<LinkInfo> OpenRAVE::KinBody::LinkInfoPtr |
typedef boost::shared_ptr<KinBody::Link> OpenRAVE::KinBody::LinkPtr |
typedef boost::weak_ptr<KinBody::Link> OpenRAVE::KinBody::LinkWeakPtr |
typedef boost::shared_ptr<KinBody::ManageData const> OpenRAVE::KinBody::ManageDataConstPtr |
typedef boost::shared_ptr<KinBody::ManageData> OpenRAVE::KinBody::ManageDataPtr |
typedef boost::shared_ptr<Mimic const> OpenRAVE::KinBody::MimicConstPtr |
typedef boost::shared_ptr<MimicInfo const> OpenRAVE::KinBody::MimicInfoConstPtr |
typedef boost::shared_ptr<MimicInfo> OpenRAVE::KinBody::MimicInfoPtr |
typedef boost::shared_ptr<Mimic> OpenRAVE::KinBody::MimicPtr |
used for specifying the type of limit checking and the messages associated with it
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) ...
A set of properties for the kinbody. These properties are used to describe a set of variables used in KinBody.
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 |
Parameters passed into the state savers to control what information gets saved.
|
virtual |
Definition at line 128 of file kinbody.cpp.
|
protected |
constructors declared protected so that user always goes through environment to create bodies
Definition at line 118 of file kinbody.cpp.
|
protectedvirtual |
adds an attached body
Definition at line 3853 of file kinbody.cpp.
|
protectedvirtual |
returns the dof velocities and link velocities
[in] | usebaselinkvelocity | if true, will compute all velocities using the base link velocity. otherwise will assume it is 0 |
Definition at line 2701 of file kinbody.cpp.
|
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.
|
protectedvirtual |
Computes accelerations of the links given all the necessary data of the robot.
for passive joints that are not mimic and are not static, will call Joint::GetVelocities to get their initial velocities (this is state dependent!)
dofvelocities | if size is 0, will assume all velocities are 0 |
dofaccelerations | if size is 0, will assume all accelerations are 0 |
Definition at line 2737 of file kinbody.cpp.
|
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.
|
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.
|
protectedvirtual |
removes an attached body
Definition at line 3859 of file kinbody.cpp.
|
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.
|
inlinevirtual |
|
virtual |
calls std::vector version of CalculateAngularVelocityJacobian internally, a little inefficient since it copies memory
Definition at line 1942 of file kinbody.cpp.
|
virtual |
calls std::vector version of ComputeJacobian internally, a little inefficient since it copies memory
Definition at line 1731 of file kinbody.cpp.
|
virtual |
Computes the rotational jacobian as a quaternion with respect to an initial rotation.
linkindex | of the link that the rotation is attached to |
qInitialRot | the rotation in world space whose derivative to take from. |
jacobian | 4xDOF matrix |
Definition at line 1747 of file kinbody.cpp.
|
virtual |
calls std::vector version of CalculateRotationJacobian internally, a little inefficient since it copies memory
Definition at line 1823 of file kinbody.cpp.
|
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.
|
virtual |
Clone the contents of an interface to the current interface.
preference | the interface whose information to clone |
cloningoptions | mask of CloningOptions |
openrave_exception | if command doesn't succeed |
Reimplemented from OpenRAVE::InterfaceBase.
Reimplemented in OpenRAVE::RobotBase.
Definition at line 4033 of file kinbody.cpp.
|
virtual |
Return an axis-aligned bounding box of the entire object in the world coordinate system.
Definition at line 1076 of file kinbody.cpp.
|
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]
/
linkindex | of the link that defines the frame the position is attached to / |
hessian | DOFx3xDOF matrix such that numpy.dot(dq,numpy.dot(hessian,dq)) is the expected second-order delta angle-axis / |
dofindices | the dof indices to compute the hessian for. If empty, will compute for all the dofs |
Definition at line 2179 of file kinbody.cpp.
|
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]
/
linkindex | of the link that defines the frame the position is attached to / |
position | position in world space where to compute derivatives from. / |
hessian | DOFx3xDOF matrix such that numpy.dot(dq,numpy.dot(hessian,dq)) is the expected second-order delta translation / |
dofindices | the dof indices to compute the hessian for. If empty, will compute for all the dofs |
Definition at line 1958 of file kinbody.cpp.
|
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.
[out] | doftorques | The output torques. |
[in] | dofaccelerations | The 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.
|
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.
[out] | doftorquecomponents | A set of 3 torques [M(dofvalues) * dofaccel, C(dofvalues,dofvel) * dofvel, G(dofvalues)] |
[in] | dofaccelerations | The 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.
|
virtual |
Computes the angular velocity jacobian of a specified link about the axes of world coordinates.
linkindex | of the link that the rotation is attached to |
vjacobian | 3xDOF matrix |
Definition at line 1839 of file kinbody.cpp.
|
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)
linkindex | of the link that defines the frame the position is attached to |
position | position in world space where to compute derivatives from. |
jacobian | 3xDOF matrix |
dofindices | the dof indices to compute the jacobian for. If empty, will compute for all the dofs |
Definition at line 1627 of file kinbody.cpp.
|
virtual |
Reimplemented in OpenRAVE::RobotBase.
Definition at line 134 of file kinbody.cpp.
|
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.
jointindex | index of the joint |
linkindex | index of the link |
Definition at line 3940 of file kinbody.cpp.
|
virtual |
Enables or disables all the links.
Definition at line 3882 of file kinbody.cpp.
|
virtual |
return all possible link pairs whose collisions are ignored.
Definition at line 4027 of file kinbody.cpp.
|
virtual |
Recursively get all attached bodies of this body, including this body.
setAttached | fills 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.
|
inlinevirtual |
|
virtual |
Return the center of mass of entire robot in the world coordinate system.
Definition at line 1125 of file kinbody.cpp.
|
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.
[in] | linkindex1 | the link index to start the search |
[in] | linkindex2 | the link index where the search ends |
[out] | vjoints | the joints to fill that describe the chain |
Definition at line 1545 of file kinbody.cpp.
|
virtual |
similar to GetChain(int,int,std::vector<JointPtr>&) except returns the links along the path.
Definition at line 1566 of file kinbody.cpp.
|
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.
|
inlinevirtual |
|
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.
|
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.
|
virtual |
returns the configuration values as specified by GetConfigurationSpecification()
Definition at line 4236 of file kinbody.cpp.
|
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.
|
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.
|
virtual |
Returns the max acceleration for each DOF.
dofindices | the dof indices to return the values for. If empty, will compute for all the dofs |
Definition at line 551 of file kinbody.cpp.
|
virtual |
Returns all the joint limits as organized by the DOF indices.
dofindices | the dof indices to return the values for. If empty, will compute for all the dofs |
Definition at line 477 of file kinbody.cpp.
|
inlinevirtual |
|
virtual |
Definition at line 582 of file kinbody.cpp.
|
inlinevirtual |
|
virtual |
get the dof resolutions
dofindices | the dof indices to return the values for. If empty, will compute for all the dofs |
Definition at line 593 of file kinbody.cpp.
|
virtual |
Returns the max torque for each DOF.
Definition at line 571 of file kinbody.cpp.
|
virtual |
Returns all the joint values as organized by the DOF indices.
dofindices | the dof indices to return the values for. If empty, will compute for all the dofs |
Definition at line 429 of file kinbody.cpp.
|
virtual |
Returns all the joint velocities as organized by the DOF indices.
dofindices | the dof indices to return the values for. If empty, will compute for all the dofs |
Definition at line 457 of file kinbody.cpp.
|
virtual |
Returns all the joint velocity limits as organized by the DOF indices.
dofindices | the dof indices to return the values for. If empty, will compute for all the dofs |
Definition at line 504 of file kinbody.cpp.
|
virtual |
Returns the max velocity for each DOF.
dofindices | the dof indices to return the values for. If empty, will compute for all the dofs |
Definition at line 531 of file kinbody.cpp.
|
virtual |
get dof weights
dofindices | the dof indices to return the values for. If empty, will compute for all the dofs |
Definition at line 612 of file kinbody.cpp.
|
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.
|
inlinestatic |
|
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.
|
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.
|
virtual |
Return the index of the joint with the given name, else -1.
Definition at line 1600 of file kinbody.cpp.
|
inline |
|
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.
Definition at line 4213 of file kinbody.cpp.
|
virtual |
return a pointer to the link with the given name
Definition at line 1523 of file kinbody.cpp.
|
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
[in] | dofaccelerations | the accelerations of each of the DOF |
[out] | linkaccelerations | the linear and angular accelerations of link (in that order) |
Definition at line 2687 of file kinbody.cpp.
|
inlinevirtual |
|
virtual |
get the transformations of all the links at once
|
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
|
virtual |
Returns the linear and angular velocities for each link.
[out] | velocities | The velocities of the link frames with respect to the world coordinate system are returned. |
Definition at line 1026 of file kinbody.cpp.
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
return all possible link pairs that could get in collision.
adjacentoptions | a bitmask of AdjacentOptions values |
Reimplemented in OpenRAVE::RobotBase.
Definition at line 3963 of file kinbody.cpp.
|
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.
|
inlinevirtual |
|
virtual |
queries the transfromation of the first link of the body
Definition at line 765 of file kinbody.cpp.
|
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.
|
inlinevirtual |
|
virtual |
initializes an complex kinematics body with links and joints
linkinfos | information for all the links. Links will be created in this order |
jointinfos | information for all the joints. Joints might be rearranged depending on their mimic properties |
Definition at line 325 of file kinbody.cpp.
|
virtual |
Create a kinbody with one link composed of an array of aligned bounding boxes.
boxes | the array of aligned bounding boxes that will comprise of the body |
visible | if true, the boxes will be rendered in the scene |
Definition at line 171 of file kinbody.cpp.
|
virtual |
Create a kinbody with one link composed of an array of oriented bounding boxes.
boxes | the array of oriented bounding boxes that will comprise of the body |
visible | if true, the boxes will be rendered in the scene |
Definition at line 207 of file kinbody.cpp.
|
virtual |
Create a kinbody with one link composed of a list of geometries.
geometries | a list of geometry infos to be initialized into new geometry objects, note that the geometry info data is copied |
visible | if true, will be rendered in the scene |
Definition at line 306 of file kinbody.cpp.
|
virtual |
Definition at line 297 of file kinbody.cpp.
|
virtual |
Create a kinbody with one link composed of an array of spheres.
spheres | the XYZ position of the spheres with the W coordinate representing the individual radius |
visible | if true, the boxes will be rendered in the scene |
Definition at line 248 of file kinbody.cpp.
|
virtual |
Create a kinbody with one link composed of a triangle mesh surface.
trimesh | the triangle mesh |
visible | if true, will be rendered in the scene |
Definition at line 276 of file kinbody.cpp.
|
virtual |
Definition at line 3819 of file kinbody.cpp.
|
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.
[in] | linkindex1 | the link index to start the search |
[in] | linkindex2 | the link index where the search ends |
Definition at line 1593 of file kinbody.cpp.
|
virtual |
Definition at line 3897 of file kinbody.cpp.
|
inlinevirtual |
Return true if this body is derived from RobotBase.
Reimplemented in OpenRAVE::RobotBase.
|
virtual |
Definition at line 3925 of file kinbody.cpp.
|
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.
callback | |
properties | a mask of the KinBodyProperty values that the callback should be called for when they change |
Definition at line 4275 of file kinbody.cpp.
|
virtual |
serializes the interface
The readable interfaces are also serialized within the tag, for example:
Depending on the writer format, extra tags might be created.
Reimplemented from OpenRAVE::InterfaceBase.
Definition at line 4180 of file kinbody.cpp.
|
virtual |
only used for hashes...
Reimplemented in OpenRAVE::RobotBase.
Definition at line 4185 of file kinbody.cpp.
|
inlinevirtual |
|
inlineprotectedvirtual |
|
virtual |
sets joint values and transform of the body using configuration values as specified by GetConfigurationSpecification()
itvalues | the iterator to the vector containing the dof values. Must have GetConfigurationSpecification().GetDOF() values! | |
[in] | checklimits | one of CheckLimitsAction and will excplicitly check the joint limits before setting the values and clamp them. |
Definition at line 4225 of file kinbody.cpp.
|
virtual |
Definition at line 699 of file kinbody.cpp.
|
virtual |
Definition at line 655 of file kinbody.cpp.
|
virtual |
Definition at line 709 of file kinbody.cpp.
|
virtual |
Adds a torque to every joint.
bAdd | if true, adds to previous torques, otherwise resets the torques on all bodies and starts from 0 |
Definition at line 407 of file kinbody.cpp.
|
virtual |
Sets the joint values of the robot.
values | the values to set the joint angles (ordered by the dof indices) | |
[in] | checklimits | one of CheckLimitsAction and will excplicitly check the joint limits before setting the values and clamp them. |
dofindices | the 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.
|
virtual |
Sets the joint values and transformation of the body.
values | the values to set the joint angles (ordered by the dof indices) | |
transform | represents the transformation of the first body. | |
[in] | checklimits | one 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.
|
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.
[in] | linearvel | linear velocity of base link |
[in] | angularvel | angular velocity rotation_axis*theta_dot |
[in] | dofvelocities | - velocities of each of the degrees of freeom |
[in] | checklimits | one 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.
|
virtual |
Sets the velocity of the joints.
Copies the current velocity of the base link and calls SetDOFVelocities(linearvel,angularvel,vDOFVelocities)
[in] | dofvelocities | - velocities of each of the degrees of freeom |
[in] | checklimits | if >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) |
dofindices | the 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.
|
virtual |
Definition at line 689 of file kinbody.cpp.
|
virtual |
sets dof weights
dofindices | the dof indices to set the values for. If empty, will use all the dofs |
Definition at line 632 of file kinbody.cpp.
|
inlinevirtual |
|
virtual |
sets the transformations of all the links at once
Reimplemented in OpenRAVE::RobotBase.
Definition at line 1142 of file kinbody.cpp.
|
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.
|
virtual |
sets the link velocities
Definition at line 1180 of file kinbody.cpp.
|
inlineprotectedvirtual |
|
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.
|
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.
|
inlineprotectedvirtual |
|
virtual |
set the transform of the first link (the rest of the links are computed based on the joint values).
transform | affine transformation |
Reimplemented in OpenRAVE::RobotBase.
Definition at line 753 of file kinbody.cpp.
Set the velocity of the base link, rest of links are set to a consistent velocity so entire robot moves correctly.
linearvel | linear velocity |
angularvel | is the rotation axis * angular speed |
Reimplemented in OpenRAVE::RobotBase.
Definition at line 770 of file kinbody.cpp.
|
inlineprotectedvirtual |
|
virtual |
Sets all the links as visible or not visible.
Definition at line 3907 of file kinbody.cpp.
|
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.
|
inlineprotected |
|
inlineprotected |
|
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.
|
virtual |
Computes the configuration difference values1-values2 and stores it in values1.
Takes into account joint limits and wrapping of circular joints.
inout] | values1 the result is stored back in this | |
[in] | values2 | |
dofindices | the dof indices to compute the subtraction for. If empty, will compute for all the dofs |
Definition at line 723 of file kinbody.cpp.
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
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.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |