Information about a joint that controls the relationship between two links. [詳細]
#include <kinbody.h>
Public 型 | |
typedef Mimic MIMIC | RAVE_DEPRECATED |
typedef KinBody::JointType JointType | RAVE_DEPRECATED |
Public メソッド | |
Joint (KinBodyPtr parent, KinBody::JointType type=KinBody::JointNone) | |
virtual | ~Joint () |
const std::string & | GetName () const |
The unique name of the joint. | |
dReal | GetMaxVel (int iaxis=0) const |
dReal | GetMaxAccel (int iaxis=0) const |
dReal | GetMaxTorque (int iaxis=0) const |
int | GetDOFIndex () const |
Get the degree of freedom index in the body's DOF array. | |
int | GetJointIndex () const |
Get the joint index into KinBody::GetJoints. | |
KinBodyPtr | GetParent () const |
LinkPtr | GetFirstAttached () const |
LinkPtr | GetSecondAttached () const |
KinBody::JointType | GetType () const |
virtual void | GetResolutions (std::vector< dReal > &resolutions, bool bAppend=false) const |
gets all resolutions for the joint axes | |
virtual dReal | GetResolution (int iaxis=0) const |
The discretization of the joint used when line-collision checking. | |
virtual void | SetResolution (dReal resolution, int iaxis=0) |
virtual int | GetDOF () const |
The degrees of freedom of the joint. Each joint supports a max of 3 degrees of freedom. | |
virtual bool | IsCircular (int iaxis) const |
Return true if joint axis has an identification at some of its lower and upper limits. | |
virtual bool | IsRevolute (int iaxis) const |
returns true if the axis describes a rotation around an axis. | |
virtual bool | IsPrismatic (int iaxis) const |
returns true if the axis describes a translation around an axis. | |
virtual bool | IsStatic () const |
Return true if joint can be treated as a static binding (ie all limits are 0) | |
virtual void | GetValues (std::vector< dReal > &values, bool bAppend=false) const |
Return all the joint values with the correct offsets applied. | |
virtual dReal | GetValue (int axis) const |
Return the value of the specified joint axis only. | |
virtual void | GetVelocities (std::vector< dReal > &values, bool bAppend=false) const |
Gets the joint velocities. | |
virtual dReal | GetVelocity (int axis) const |
Return the velocity of the specified joint axis only. | |
virtual void | AddTorque (const std::vector< dReal > &torques) |
Add effort (force or torque) to the joint. | |
virtual Vector | GetAnchor () const |
The anchor of the joint in global coordinates. | |
virtual Vector | GetAxis (int axis=0) const |
The axis of the joint in global coordinates. | |
virtual void | GetLimits (std::vector< dReal > &vLowerLimit, std::vector< dReal > &vUpperLimit, bool bAppend=false) const |
Get the limits of the joint. | |
virtual std::pair< dReal, dReal > | GetLimit (int iaxis=0) const |
returns the lower and upper limit of one axis of the joint | |
virtual void | SetLimits (const std::vector< dReal > &lower, const std::vector< dReal > &upper) |
virtual void | GetVelocityLimits (std::vector< dReal > &vmax, bool bAppend=false) const |
Returns the max velocities of the joint. | |
virtual void | GetVelocityLimits (std::vector< dReal > &vlower, std::vector< dReal > &vupper, bool bAppend=false) const |
virtual std::pair< dReal, dReal > | GetVelocityLimit (int iaxis=0) const |
returns the lower and upper velocity limit of one axis of the joint | |
virtual void | SetVelocityLimits (const std::vector< dReal > &vmax) |
virtual void | GetAccelerationLimits (std::vector< dReal > &vmax, bool bAppend=false) const |
Returns the max accelerations of the joint. | |
virtual dReal | GetAccelerationLimit (int iaxis=0) const |
virtual void | SetAccelerationLimits (const std::vector< dReal > &vmax) |
virtual void | GetTorqueLimits (std::vector< dReal > &vmax, bool bAppend=false) const |
Returns the max torques of the joint. | |
virtual void | SetTorqueLimits (const std::vector< dReal > &vmax) |
virtual void | GetWeights (std::vector< dReal > &weights, bool bAppend=false) const |
gets all weights for the joint axes | |
virtual dReal | GetWeight (int axis=0) const |
The weight associated with a joint's axis for computing a distance in the robot configuration space. | |
virtual void | SetWeights (const std::vector< dReal > &weights) |
virtual void | SubtractValues (std::vector< dReal > &values1, const std::vector< dReal > &values2) const |
Computes the configuration difference values1-values2 and stores it in values1. | |
virtual dReal | SubtractValue (dReal value1, dReal value2, int iaxis) const |
Returns the configuration difference value1-value2 for axis i. | |
dReal | GetWrapOffset (int iaxis=0) const |
Return internal offset parameter that determines the branch the angle centers on. | |
dReal | GetOffset (int iaxis=0) const RAVE_DEPRECATED |
virtual void | SetWrapOffset (dReal offset, int iaxis=0) |
virtual void | serialize (std::ostream &o, int options) const |
const std::map< std::string, std::vector< dReal > > & | GetFloatParameters () const |
return a map of custom float parameters | |
virtual void | SetFloatParameters (const std::string &key, const std::vector< dReal > ¶meters) |
set custom float parameters | |
const std::map< std::string, std::vector< int > > & | GetIntParameters () const |
return a map of custom integer parameters | |
virtual void | SetIntParameters (const std::string &key, const std::vector< int > ¶meters) |
set custom int parameters | |
virtual void | UpdateInfo () |
Updates several fields in _info depending on the current state of the joint. | |
const KinBody::JointInfo & | GetInfo () const |
returns the JointInfo structure containing all information. | |
const KinBody::JointInfo & | UpdateAndGetInfo () |
Calls UpdateInfo and returns the joint structure. | |
Internal Hierarchy Methods | |
virtual LinkPtr | GetHierarchyParentLink () const |
Return the parent link which the joint measures its angle off from (either GetFirstAttached() or GetSecondAttached()) | |
virtual LinkPtr | GetHierarchyChildLink () const |
Return the child link whose transformation is computed by this joint's values (either GetFirstAttached() or GetSecondAttached()) | |
virtual Vector | GetInternalHierarchyAxis (int axis=0) const |
The axis of the joint in local coordinates. | |
virtual Transform | GetInternalHierarchyLeftTransform () const |
Left multiply transform given the base body. | |
virtual Transform | GetInternalHierarchyRightTransform () const |
Right multiply transform given the base body. | |
Mimic Joint Properties | |
A mimic joint's angles are automatically determined from other joints based on a general purpose formula. A user does not have control of the the mimic joint values, even if they appear in the DOF list. | |
virtual int | GetMimicJointIndex () const RAVE_DEPRECATED |
virtual const std::vector< dReal > | GetMimicCoeffs () const RAVE_DEPRECATED |
virtual bool | IsMimic (int axis=-1) const |
Returns true if a particular axis of the joint is mimiced. | |
virtual std::string | GetMimicEquation (int axis=0, int type=0, const std::string &format="") const |
If the joint is mimic, returns the equation to compute its value. | |
virtual void | GetMimicDOFIndices (std::vector< int > &vmimicdofs, int axis=0) const |
Returns the set of DOF indices that the computation of a joint axis depends on. Order is arbitrary. | |
virtual void | SetMimicEquations (int axis, const std::string &poseq, const std::string &veleq, const std::string &acceleq="") |
Sets the mimic properties of the joint. | |
Protected メソッド | |
virtual void | _ComputePartialVelocities (std::vector< std::pair< int, dReal > > &vpartials, int iaxis, std::map< std::pair< Mimic::DOFFormat, int >, dReal > &mapcachedpartials) const |
computes the partial velocities with respect to all dependent DOFs specified by Mimic::_vmimicdofs. | |
virtual void | _ComputeInternalInformation (LinkPtr plink0, LinkPtr plink1, const Vector &vanchor, const std::vector< Vector > &vaxes, const std::vector< dReal > &vcurrentvalues) |
Compute internal transformations and specify the attached links of the joint. | |
virtual int | _Eval (int axis, uint32_t timederiv, const std::vector< dReal > &vdependentvalues, std::vector< dReal > &voutput) |
evaluates the mimic joint equation using vdependentvalues | |
virtual void | _GetVelocities (std::vector< dReal > &values, bool bAppend, const std::pair< Vector, Vector > &linkparentvelocity, const std::pair< Vector, Vector > &linkchildvelocity) const |
compute joint velocities given the parent and child link transformations/velocities | |
virtual dReal | _GetVelocity (int axis, const std::pair< Vector, Vector > &linkparentvelocity, const std::pair< Vector, Vector > &linkchildvelocity) const |
Return the velocity of the specified joint axis only. | |
Protected 変数 | |
JointInfo | _info |
boost::array< MimicPtr, 3 > | _vmimic |
the mimic properties of each of the joint axes. It is theoretically possible for a multi-dof joint to have one axes mimiced and the others free. When cloning, is it ok to copy this and assume it is constant? | |
boost::array< int, 3 > | _dofbranches |
the branch that identified joints are on. +1 means one loop around the identification. For revolute joints, the actual joint value incremented by 2*pi*branch. Branches are important for maintaining joint ranges greater than 2*pi. For circular joints, the branches can be ignored or not. | |
Information about a joint that controls the relationship between two links.
typedef Mimic MIMIC OpenRAVE::KinBody::Joint::RAVE_DEPRECATED |
OpenRAVE::KinBody::Joint::Joint | ( | KinBodyPtr | parent, |
KinBody::JointType | type = KinBody::JointNone |
||
) |
kinbodyjoint.cpp の 106 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 121 行で定義されています。
|
protectedvirtual |
Compute internal transformations and specify the attached links of the joint.
Called after the joint protected parameters {vAxes, vanchor, and _voffsets} have been initialized. vAxes and vanchor should be in the frame of plink0. Compute the left and right multiplications of the joint transformation and cleans up the attached bodies. After function completes, the following parameters are initialized: _tRight, _tLeft, _tinvRight, _tinvLeft, _attachedbodies. _attachedbodies does not necessarily contain the links in the same order as they were input.
plink0 | the first attaching link, all axes and anchors are defined in its coordinate system |
plink1 | the second attaching link |
vanchor | the anchor of the rotation axes |
vaxes | the axes in plink0's coordinate system of the joints |
vinitialvalues | the current values of the robot used to set the 0 offset of the robot |
kinbodyjoint.cpp の 566 行で定義されています。
|
protectedvirtual |
computes the partial velocities with respect to all dependent DOFs specified by Mimic::_vmimicdofs.
If the joint is not mimic, then just returns its own index
[out] | vpartials | A list of dofindex/velocity_partial pairs. The final velocity is computed by taking the dot product. The dofindices do not repeat. |
[in] | iaxis | the axis |
[in,out] | vcachedpartials | set of cached partials for each degree of freedom |
kinbodyjoint.cpp の 1225 行で定義されています。
|
protectedvirtual |
evaluates the mimic joint equation using vdependentvalues
[in] | axis | the joint axis |
[in] | timederiv | the time derivative to evaluate. 0 is position, 1 is velocity, 2 is acceleration, etc |
[in] | vdependentvalues | input values ordered with respect to _vdofformat[iaxis] |
[out] | voutput | the output values |
kinbodyjoint.cpp の 1294 行で定義されています。
|
protectedvirtual |
compute joint velocities given the parent and child link transformations/velocities
kinbodyjoint.cpp の 467 行で定義されています。
|
protectedvirtual |
Return the velocity of the specified joint axis only.
kinbodyjoint.cpp の 509 行で定義されています。
|
virtual |
Add effort (force or torque) to the joint.
kinbodyjoint.cpp の 988 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 860 行で定義されています。
|
virtual |
Returns the max accelerations of the joint.
[out] | the | max acceleration |
[in] | bAppend | if true will append to the end of the vector instead of erasing it |
kinbodyjoint.cpp の 850 行で定義されています。
|
virtual |
The anchor of the joint in global coordinates.
kinbodyjoint.cpp の 556 行で定義されています。
|
virtual |
The axis of the joint in global coordinates.
[in] | axis | the axis to get |
kinbodyjoint.cpp の 561 行で定義されています。
|
virtual |
The degrees of freedom of the joint. Each joint supports a max of 3 degrees of freedom.
kinbodyjoint.cpp の 125 行で定義されています。
|
inline |
Get the degree of freedom index in the body's DOF array.
This does not index in KinBody::GetJoints() directly! In other words, KinBody::GetDOFValues()[GetDOFIndex()] == GetValues()[0]
|
inline |
|
virtual |
Return the child link whose transformation is computed by this joint's values (either GetFirstAttached() or GetSecondAttached())
kinbodyjoint.cpp の 752 行で定義されています。
|
virtual |
Return the parent link which the joint measures its angle off from (either GetFirstAttached() or GetSecondAttached())
kinbodyjoint.cpp の 747 行で定義されています。
|
inline |
returns the JointInfo structure containing all information.
Some values in this structure like _vcurrentvalues need to be updated, so make sure to call UpdateInfo() right before this function is called.
|
virtual |
The axis of the joint in local coordinates.
kinbodyjoint.cpp の 757 行で定義されています。
|
virtual |
Left multiply transform given the base body.
kinbodyjoint.cpp の 762 行で定義されています。
|
virtual |
Right multiply transform given the base body.
kinbodyjoint.cpp の 768 行で定義されています。
|
inline |
|
inline |
Get the joint index into KinBody::GetJoints.
returns the lower and upper limit of one axis of the joint
kinbodyjoint.cpp の 786 行で定義されています。
|
virtual |
Get the limits of the joint.
[out] | vLowerLimit | the lower limits |
[out] | vUpperLimit | the upper limits |
[in] | bAppend | if true will append to the end of the vector instead of erasing it |
kinbodyjoint.cpp の 774 行で定義されています。
|
inline |
|
inline |
|
virtual |
kinbodyjoint.cpp の 1003 行で定義されています。
|
virtual |
Returns the set of DOF indices that the computation of a joint axis depends on. Order is arbitrary.
If the mimic joint uses the values of other mimic joints, then the dependent DOFs of that joint are also copied over. Therefore, the dof indices returned can be more than the actual variables used in the equation.
openrave_exception | Throws an exception if the axis is not mimic. |
kinbodyjoint.cpp の 1072 行で定義されています。
|
virtual |
If the joint is mimic, returns the equation to compute its value.
[in] | axis | the axis index |
[in] | type | 0 for position, 1 for velocity, 2 for acceleration. |
[in] | format | the format the equations are returned in. If empty or "fparser", equation in fparser format. Also supports: "mathml". |
MathML:
Set 'format' to "mathml". The joint variables are specified with <csymbol>. If a targetted joint has more than one degree of freedom, then axis is suffixed with _%d. If 'type' is 1 or 2, the partial derivatives are outputted as consecutive <math></math> tags in the same order as Mimic::_vdofformat
kinbodyjoint.cpp の 1023 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 993 行で定義されています。
|
inline |
|
inline |
|
virtual |
The discretization of the joint used when line-collision checking.
The resolutions are set as large as possible such that the joint will not go through obstacles of determined size.
kinbodyjoint.cpp の 931 行で定義されています。
|
virtual |
gets all resolutions for the joint axes
[in] | bAppend | if true will append to the end of the vector instead of erasing it |
kinbodyjoint.cpp の 921 行で定義されています。
|
virtual |
Returns the max torques of the joint.
[out] | the | max torque |
[in] | bAppend | if true will append to the end of the vector instead of erasing it |
kinbodyjoint.cpp の 873 行で定義されています。
|
inline |
|
virtual |
Return the value of the specified joint axis only.
kinbodyjoint.cpp の 292 行で定義されています。
|
virtual |
Return all the joint values with the correct offsets applied.
bAppend | if true will append to the end of the vector instead of erasing it |
kinbodyjoint.cpp の 194 行で定義されています。
|
virtual |
Gets the joint velocities.
bAppend | if true will append to the end of the vector instead of erasing it |
kinbodyjoint.cpp の 448 行で定義されています。
|
virtual |
Return the velocity of the specified joint axis only.
kinbodyjoint.cpp の 461 行で定義されています。
returns the lower and upper velocity limit of one axis of the joint
kinbodyjoint.cpp の 837 行で定義されています。
|
virtual |
Returns the max velocities of the joint.
[out] | the | max velocity |
[in] | bAppend | if true will append to the end of the vector instead of erasing it |
kinbodyjoint.cpp の 827 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 815 行で定義されています。
|
virtual |
The weight associated with a joint's axis for computing a distance in the robot configuration space.
kinbodyjoint.cpp の 952 行で定義されています。
|
virtual |
gets all weights for the joint axes
[in] | bAppend | if true will append to the end of the vector instead of erasing it |
kinbodyjoint.cpp の 942 行で定義されています。
|
inline |
Return internal offset parameter that determines the branch the angle centers on.
Wrap offsets are needed for rotation joints since the range is limited to 2*pi. This allows the wrap offset to be set so the joint can function in [-pi+offset,pi+offset]..
iaxis | the axis to get the offset from |
|
virtual |
Return true if joint axis has an identification at some of its lower and upper limits.
An identification of the lower and upper limits means that once the joint reaches its upper limits, it is also at its lower limit. The most common identification on revolute joints at -pi and pi. 'circularity' means the joint does not stop at limits. Although currently not developed, it could be possible to support identification for joints that are not revolute.
kinbodyjoint.cpp の 140 行で定義されています。
|
virtual |
Returns true if a particular axis of the joint is mimiced.
axis | the axis to query. When -1 returns true if any of the axes have mimic joints |
kinbodyjoint.cpp の 1010 行で定義されています。
|
virtual |
returns true if the axis describes a translation around an axis.
iaxis | the axis of the joint to return the results for |
kinbodyjoint.cpp の 153 行で定義されています。
|
virtual |
returns true if the axis describes a rotation around an axis.
iaxis | the axis of the joint to return the results for |
kinbodyjoint.cpp の 145 行で定義されています。
|
virtual |
Return true if joint can be treated as a static binding (ie all limits are 0)
kinbodyjoint.cpp の 161 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 1376 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 865 行で定義されています。
|
virtual |
set custom float parameters
parameters | if empty, then removes the parameter |
kinbodyjoint.cpp の 1348 行で定義されています。
|
virtual |
set custom int parameters
parameters | if empty, then removes the parameter |
kinbodyjoint.cpp の 1359 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 791 行で定義されています。
|
virtual |
Sets the mimic properties of the joint.
The equations can use the joint names directly in the equation, which represent the position of the joint. Any non-mimic joint part of KinBody::GetJoints() can be used in the computation of the values. If a joint has more than one degree of freedom, then suffix it '_' and the axis index. For example universaljoint_0 * 10 + sin(universaljoint_1).
See http://warp.povusers.org/FunctionParser/fparser.html for a full description of the equation formats.
The velocity and acceleration equations are specified in terms of partial derivatives, which means one expression needs to be specified per degree of freedom of used. In order to separate the expressions use "|name ...". The name should immediately follow '|'. For example:
|universaljoint_0 10 |universaljoint_1 10*cos(universaljoint_1)
If there is only one variable used in the position equation, then the equation can be specified directly without using "{}".
[in] | axis | the axis to set the properties for. |
[in] | poseq | Equation for joint's position. If it is empty, the mimic properties are turned off for this joint. |
[in] | veleq | First-order partial derivatives of poseq with respect to all used DOFs. Only the variables used in poseq are allowed to be used. If poseq is not empty, this is required. |
[in] | acceleq | Second-order partial derivatives of poseq with respect to all used DOFs. Only the variables used in poseq are allowed to be used. Optional. |
openrave_exception | Throws an exception if the mimic equation is invalid in any way. |
kinbodyjoint.cpp の 1084 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 936 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 883 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 842 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 957 行で定義されています。
|
virtual |
kinbodyjoint.cpp の 891 行で定義されています。
|
virtual |
Returns the configuration difference value1-value2 for axis i.
Takes into account joint limits and wrapping of circular joints.
kinbodyjoint.cpp の 978 行で定義されています。
|
virtual |
Computes the configuration difference values1-values2 and stores it in values1.
Takes into account joint limits and wrapping of circular joints.
kinbodyjoint.cpp の 966 行で定義されています。
|
inline |
Calls UpdateInfo and returns the joint structure.
|
virtual |
Updates several fields in _info depending on the current state of the joint.
kinbodyjoint.cpp の 1370 行で定義されています。
|
protected |
the branch that identified joints are on. +1 means one loop around the identification. For revolute joints, the actual joint value incremented by 2*pi*branch. Branches are important for maintaining joint ranges greater than 2*pi. For circular joints, the branches can be ignored or not.
|
protected |