joint.h File Reference Introduction
Macro Definition Documentation◆ NO_JOINT
◆ FREE_JOINT
◆ FIX_JOINT
◆ REV_JOINT
◆ UNV_JOINT
◆ SPH_JOINT
◆ SPH_SPH_LOW_JOINT
◆ SPH_SPH_UP_JOINT
◆ REV_LOW_JOINT
◆ REV_UP_JOINT
◆ PRS_JOINT
◆ IN_PATCH_JOINT
Defines a generalized plannar joint where a point in the first link is constrainted to be inside a patch in the second link and the normal of the first link at the given point is aligned with the normal of the patch. The patch is defined as a order-one Bezier patch that is given by 4 points. If those for points are co-planar this joint is a plannar joint with a plane limited by the 4 given points.
Function Documentation◆ NewFreeJoint()
Defines a free joint between links. A free joint is a dummy joint imposing no constraint between the relative movements of the links. It is used to see a different free flying mechanisms as a single mechanism. This basically simplify the structures we use (we don't have to implement a multi-mechanism stucture, for instance) and the generation of equations from the mechanism definition can be easily implemented with a single ground link. Up to now we hardly used/tested this type of joints.
Definition at line 127 of file joint.c. References FREE_JOINT, INF, InitJoint(), and Tjoint::maxCoord. Referenced by GenerateKinTree(), and main(). ◆ NewFixJoint()
Defines a fix joint between links. A fix joint fixes the relative translation and orientation between two links. Fix joints are typically used when placing the end effector of a robot to compute its inverse kinematics.
Definition at line 137 of file joint.c. References FIX_JOINT, HTransformCopy(), HTransformGetElement(), INF, InitJoint(), Tjoint::maxCoord, Norm(), Tjoint::points, and Tjoint::preT. Referenced by main(). ◆ NewRevoluteJoint()
Defines a new revolute joint between two links. Note that we assume centered rotations, that is, if there is any limit in the rotation it is always in the for of a symmetric interval [-range,range]. This is completely general (by defining appropriate reference vectors the rotation range can be made symmetric around 0 and it helps when defining constraints.
Definition at line 159 of file joint.c. References ADJUST_REAL, Tjoint::avoidLimits, Tjoint::avoidLimitsWeight, CopyInterval(), Tjoint::coupled, CrossProduct(), DefineNormalVector(), Error(), FALSE, Tjoint::hasLimits, Tjoint::hasReference, HTransformApply(), HTransformDelete(), HTransformFromVectors(), HTransformInverse(), HTransformProduct(), HTransformRx(), HTransformX2Vect(), InitJoint(), IntervalCenter(), IntervalOffset(), IntervalSize(), Tjoint::maxCoord, Norm(), Tjoint::normals, Tjoint::offset, Tjoint::points, Tjoint::postT, Tjoint::preT, Tjoint::range, REP_JOINTS, REV_JOINT, Tjoint::t, Tjoint::vrange, and ZERO. Referenced by InitWorldFromMolecule(), main(), NewRevLowJoint(), and NewRevUpJoint(). ◆ NewUniversalJoint()
Defines a new universal joint between two links.
Definition at line 319 of file joint.c. References ADJUST_REAL, Tjoint::avoidLimits, Tjoint::avoidLimitsWeight, CopyInterval(), CrossProduct(), DefineNormalVector(), Error(), FALSE, Tjoint::hasLimits, Tjoint::hasReference, HTransformApply(), HTransformDelete(), HTransformFromVectors(), HTransformInverse(), HTransformProduct(), HTransformRx(), HTransformX2Vect(), InitJoint(), IntervalCenter(), IntervalOffset(), IntervalSize(), Tjoint::maxCoord, Norm(), Tjoint::normals, Tjoint::offset, Tjoint::offset2, Tjoint::points, Tjoint::postT, Tjoint::preT, Tjoint::range, Tjoint::range2, REP_JOINTS, UNV_JOINT, Tjoint::vrange, and ZERO. ◆ NewSphericalJoint()
Defines a new spherical joint between two links. The limits for a spherical joint are defined symmetrically around an axis rigidly linked to the first link.
Definition at line 489 of file joint.c. References ADJUST_REAL, Tjoint::avoidLimits, Tjoint::avoidLimitsWeight, Error(), FALSE, Tjoint::hasLimits, HTransformInverse(), HTransformProduct(), HTransformTxyz(), HTransformX2Vect(), InitJoint(), IntervalSize(), Tjoint::maxCoord, NewInterval(), Norm(), Tjoint::offset, Tjoint::points, Tjoint::postT, Tjoint::preT, Tjoint::range, SPH_JOINT, Tjoint::vrange, and ZERO. Referenced by NewSphSphLowJoint(), and NewSphSphUpJoint(). ◆ NewPrismaticJoint()
Defines a new prismatic joint between two links. Note that prismatic joints are always limited. IMPORTANT: We assume that reference frames for the two links connected by a prismatic joint are aligned (the XYZ axis are parallel and just displaced).
Definition at line 579 of file joint.c. References ADJUST_REAL, Tjoint::avoidLimits, Tjoint::avoidLimitsWeight, CopyInterval(), Error(), Tjoint::hasLimits, HTransformInverse(), HTransformTxyz(), InitJoint(), IntervalSize(), Tjoint::maxCoord, Norm(), Tjoint::normals, Tjoint::points, Tjoint::postT, Tjoint::preT, PRS_JOINT, Tjoint::range, TRUE, and ZERO. Referenced by main(). ◆ NewSphSphLowJoint()
Defines the lower part of a spherical-spherical composite joint between two links. NOTE: sph_sph_low joints are used to connect legs. The rotation about the leg axis is not relevant and thus, these joints can be seen as providing only two dof. However, when using a joint-based representation the third dof can not be ignored. This is so because when using a link-based formulation the rotation is fixed (arbitrarily but fixed) and the third dof is necessary to perfectly match the trnsformation when translating from joints to links and the reverse.
Definition at line 648 of file joint.c. References FALSE, INF, NewSphericalJoint(), SPH_SPH_LOW_JOINT, and Tjoint::t. Referenced by AddLeg2World(). ◆ NewSphSphUpJoint()
Defines the upper part of a spherical-spherical composite joint between two links.
Definition at line 660 of file joint.c. References FALSE, HTransformIdentity(), INF, IsVariableLengthLink(), NewSphericalJoint(), Tjoint::preT, SPH_SPH_UP_JOINT, and Tjoint::t. Referenced by AddLeg2World(). ◆ NewRevLowJoint()
Defines the lower part of a spherical-spherical planar composite joint between two links. The rotation is defined in the Z axis (the mechanism is limited to the XY plane). The planar version of NewSphSphLowJoint.
Definition at line 676 of file joint.c. References Error(), FALSE, HTransformTxyz(), NEW, NewRevoluteJoint(), Tjoint::postT, Tjoint::preT, REP_JOINTS, REV_LOW_JOINT, Tjoint::t, and ZERO. Referenced by AddLeg2World(). ◆ NewRevUpJoint()
Defines the upper part of a spherical-spherical planar composite joint between two links. The rotation is defined in the Z axis (the mechanism is limited to the XY plane). The planar version of NewSphSphUpJoint
Definition at line 719 of file joint.c. References Error(), FALSE, HTransformIdentity(), HTransformTxyz(), IsVariableLengthLink(), NEW, NewRevoluteJoint(), Tjoint::postT, Tjoint::preT, REP_JOINTS, REV_UP_JOINT, Tjoint::t, and ZERO. Referenced by AddLeg2World(). ◆ NewSphPrsSphLowJoint()
Defines the lower part of a spherical-prismatic-spherical composite joint between two links. NOTE: sph_prs_sph_low joints are used to connect legs. The rotation about the leg axis is not relevant and thus, these joints can be seen as providing only two dof. However, when using a joint-based representation the third dof can not be ignored. This is so because when using a link-based formulation the rotation is fixed (arbitrarily but fixed) and the third dof is necessary to perfectly match the trnsformation when translating from joints to links and the reverse.
◆ NewSphPrsSphUpJoint()
Defines the upper part of a spherical-spherical composite joint between two links.
◆ NewInPatchJoint()
Defines a new in-patch joint between two links. An in-patch joint is a generalization of a planar joint where the plane is replaced by a order one Bezier patch. This patch is defined by 4 points. When the four points are coplanar this joint is a planar joint. This type of joints are basically used to define contact between links.
Definition at line 768 of file joint.c. References ADJUST_REAL, Tjoint::avoidLimits, Tjoint::avoidLimitsWeight, CrossProduct(), DotProduct(), Error(), Tjoint::hasLimits, HTransformIdentity(), HTransformX2Vect(), IN_PATCH_JOINT, InitJoint(), IntervalAdd(), IntervalScale(), IntervalSqrt(), Tjoint::maxCoord, NewInterval(), Norm(), Tjoint::normals, Tjoint::normRange, Tjoint::points, Tjoint::postT, Tjoint::preT, Tjoint::range, Tjoint::range2, TRUE, and ZERO. ◆ CopyJoint()Defines a joint structure copying data from anther joint.
Definition at line 933 of file joint.c. References Tjoint::acceleration, Tjoint::avoidLimits, Tjoint::avoidLimitsWeight, CopyInterval(), Tjoint::cost, Tjoint::coupled, Tjoint::damping, Tjoint::effort, Tjoint::friction, Tjoint::hasLimits, Tjoint::hasReference, HTransformCopy(), Tjoint::id, Tjoint::link, Tjoint::linkID, Tjoint::maxCoord, Tjoint::normals, Tjoint::normRange, Tjoint::offset, Tjoint::offset2, Tjoint::points, Tjoint::postT, Tjoint::preT, Tjoint::range, Tjoint::range2, Tjoint::t, Tjoint::velocity, and Tjoint::vrange. Referenced by AddJoint2Mechanism(). ◆ GetJointType()
Gets the joint type.
Definition at line 993 of file joint.c. References Tjoint::t. Referenced by AddJoint2Mechanism(), AllRevolute(), InitHandC(), IsRevoluteBinaryLink(), main(), and PrintMechanism(). ◆ GetJointMaxCoordinate()
Gets the maximum coordinate used in the joint definition (eigher in X, Y or Z).
Definition at line 998 of file joint.c. References Tjoint::maxCoord. Referenced by AddJoint2Mechanism(). ◆ GetJointID()
Gets the joint identifier (given to the joint when created).
Definition at line 1003 of file joint.c. References Tjoint::id. Referenced by GetTransformFromBranch(). ◆ JointFromID()
Gets the identifier of the first link involved in the joint.
Definition at line 1008 of file joint.c. References Tjoint::linkID. Referenced by Branches2Links(), GenerateKinTree(), GetBranchDestination(), GetBranchOrigin(), GetLinkTransformsFromDOF(), GetMechanismDOFsFromTransforms(), InitHandC(), IsRevoluteBinaryLink(), main(), NoCheckConnectedCollisions(), and WorldDOF2Sol(). ◆ JointFrom()Gets a pointer to the first link involved in the joint.
Definition at line 1013 of file joint.c. References Tjoint::link. Referenced by GenerateMEquationFromBranch(), GetLinkTransformsFromDOF(), GetMechanismDOFsFromTransforms(), main(), and PrintMechanism(). ◆ JointToID()
Gets the identifier of the second link involved in the joint.
Definition at line 1018 of file joint.c. References Tjoint::linkID. Referenced by Branches2Links(), ComputeHandC_FJH(), GenerateKinTree(), GetBranchDestination(), GetBranchOrigin(), GetLinkTransformsFromDOF(), GetMechanismDOFsFromTransforms(), InitHandC(), IsRevoluteBinaryLink(), main(), NoCheckConnectedCollisions(), and WorldDOF2Sol(). ◆ JointTo()Gets a pointer to the second link involved in the joint.
Definition at line 1023 of file joint.c. References Tjoint::link. Referenced by main(), and PrintMechanism(). ◆ GetJointName()
Returns a string identifying the type of joint and the connected links. This is basically used for interface.
Definition at line 1028 of file joint.c. References Error(), FIX_JOINT, FREE_JOINT, GetLinkName(), IN_PATCH_JOINT, Tjoint::link, NEW, PRS_JOINT, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, Tjoint::t, and UNV_JOINT. Referenced by GetWorldDOFLabel(), and GetWorldJointLabel(). ◆ GetJointDOFName()
Returns a label that uniquely identify a given dof in a joint. If the joint only has a single dof, the label is NULL (i.e. the name of the joint is enough to identify the dof). This is used to create interfaces.
Definition at line 1068 of file joint.c. References Error(), FIX_JOINT, FREE_JOINT, IN_PATCH_JOINT, NEW, PRS_JOINT, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, Tjoint::t, and UNV_JOINT. Referenced by GetWorldDOFLabel(). ◆ GetJointPoint()
Gets one of the points defining the rotation/sliding axis for the joint.
Definition at line 1180 of file joint.c. References Tjoint::points. Referenced by IsRevoluteBinaryLink(), main(), and PrintMechanism(). ◆ LimitedJoint()Checks if a joint has limits.
Definition at line 1190 of file joint.c. References Tjoint::hasLimits. Referenced by main(). ◆ GetJointRange()Checks the limits of a joint.
Definition at line 1195 of file joint.c. References Tjoint::range. Referenced by main(). ◆ GetJointSecondRange()Checks the second limit of a universal joint. Only universal joints have a second range.
Definition at line 1200 of file joint.c. References Tjoint::range2. Referenced by main(). ◆ GetJointRangeN()Returns the ranges for one of the degrees of freedom of the joint.
Definition at line 1205 of file joint.c. References CopyInterval(), Error(), FIX_JOINT, FREE_JOINT, Tjoint::hasLimits, IN_PATCH_JOINT, IntervalOffset(), M_PI, NewInterval(), Tjoint::offset, Tjoint::offset2, PRS_JOINT, Tjoint::range, Tjoint::range2, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, Tjoint::t, and UNV_JOINT. Referenced by GenerateJointEquations(), and GetWorldRangeDOF(). ◆ GetJointRangeTopology()
Returns the topology of one of the degrees of freedom of the joint.
Definition at line 1297 of file joint.c. References Error(), FIX_JOINT, FREE_JOINT, Tjoint::hasLimits, IN_PATCH_JOINT, PRS_JOINT, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, Tjoint::t, TOPOLOGY_R, TOPOLOGY_S, and UNV_JOINT. Referenced by GenerateJointEquations(), WorldDOF2Sol(), and WorldDOFTopology(). ◆ CoupledWith()
Returns the identifier of the joint coupled with the query joint. Note that up to now we have a very limited implementation of the coupling between joints: Only revolute joints (with limits) can be coupled and always with a 1 to 1 relation. If we have a pair of joints coupled (j1,j2) with j1 having a lower identifier than j2 (i.e., appearing before in the mechanism definition), this function only returns something different from NO_UINT for j2. In other words, the function only identifies the coupled but not the original joint.
Definition at line 1373 of file joint.c. References Tjoint::coupled, and NO_UINT. Referenced by WorldInitDOFInfo(). ◆ GetJointDOF()
Computes the degrees of freedom allowed by a given joint. The degrees of freedom constrained by the joint are 6-the allowed ones (i.e., the returned by this function.
Definition at line 1381 of file joint.c. References Tjoint::coupled, Error(), FIX_JOINT, FREE_JOINT, IN_PATCH_JOINT, PRS_JOINT, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, Tjoint::t, and UNV_JOINT. Referenced by AddJoint2World(), GenerateJointEquations(), GetJointBasicTransform(), GetMechanismDOFsFromTransforms(), GetMechanismMobility(), GetWorldDOFLabel(), InitDynamicSpace(), InitHandC(), and WorldInitDOFInfo(). ◆ GetJointVelocity()
Returns the maximum velocity of the joint.
Definition at line 1421 of file joint.c. References Tjoint::velocity. Referenced by GenerateWorldEquations(), and main(). ◆ GetJointAcceleration()
Returns the maximum acceleration of the joint.
Definition at line 1426 of file joint.c. References Tjoint::acceleration. ◆ GetJointEffort()
Returns the maximum effort of the joint.
Definition at line 1431 of file joint.c. References Tjoint::effort. Referenced by InitDynamicSpace(), and main(). ◆ GetJointCost()
Returns (LQR) cost of the joint.
Definition at line 1436 of file joint.c. References Tjoint::cost. Referenced by InitDynamicSpace(). ◆ ActuatedJoint()Identifies acctuated joints. Right now the actuated joints are those with a limited joint effort.
Definition at line 1441 of file joint.c. References Tjoint::effort, and INF. Referenced by AddJoint2World(), and InitDynamicSpace(). ◆ GetJointFriction()
Returns the friction of the joint.
Definition at line 1446 of file joint.c. References Tjoint::friction. Referenced by ComputeC(), InitHandC(), and main(). ◆ GetJointDamping()
Returns the damping of the joint.
Definition at line 1451 of file joint.c. References Tjoint::damping. Referenced by ComputeC(), InitHandC(), and main(). ◆ GetJointFrame()
Returns a transfrom from the reference frame of the parent link to a reference frame on the joint.
Definition at line 1456 of file joint.c. References Tjoint::preT. Referenced by main(). ◆ GetJointPreT()
Returns a transfrom from the reference frame of the parent link to a reference frame on the joint. This is just the same as GetJointFrame
Definition at line 1461 of file joint.c. References HTransformCopy(), HTransformInverse(), Tjoint::postT, and Tjoint::preT. Referenced by InitHandC(). ◆ GetJointPostT()
Returns a transfrom from the joint frame to the reference frame of the child link.
Definition at line 1469 of file joint.c. References HTransformCopy(), HTransformInverse(), Tjoint::postT, and Tjoint::preT. Referenced by InitHandC(). ◆ GenerateJointRangeSingularityEquations()
Workspace boundaries are detected as singularities. Here we introduce some changes in the range variables so that we force a singularity in the extremes of the ranges for the joints.
Definition at line 1477 of file joint.c. References AddCt2Monomial(), AddEquation2CS(), AddMonomial(), AddVariable2CS(), AddVariable2Monomial(), COS_VAR, COS_VAR_SING, COS_VAR_UNI, COS_VAR_UNI_SING, CT_REPRESENTATION, DeleteEquation(), DeleteMonomial(), DeleteVariable(), EQU, Error(), GetCSVariableID(), GetLinkName(), GetParameter(), Tjoint::hasLimits, Tjoint::id, IN_PATCH_JOINT, IN_PATCH_JOINT_CTRL_VAR, IN_PATCH_JOINT_CTRL_VAR_SING_COS, IN_PATCH_JOINT_CTRL_VAR_SING_SIN, InitEquation(), InitMonomial(), Tjoint::link, LowerLimit(), NEW, NewInterval(), NewVariable(), NFUN, NO_UINT, PRS_JOINT, PRS_JOINT_VAR, PRS_JOINT_VAR_SING_COS, PRS_JOINT_VAR_SING_SIN, Tjoint::range, Tjoint::range2, REP_JOINTS, ResetEquation(), ResetMonomial(), REV_JOINT, SetEquationCmp(), SetEquationType(), SetEquationValue(), SetVariableInterval(), SPH_JOINT, SYSTEM_EQ, SYSTEM_VAR, Tjoint::t, UNV_JOINT, and UpperLimit(). Referenced by GenerateWorldSingularityEquations(). ◆ GenerateJointRangeEquations()
Adds to the given cuiksystem the variables and equations necessary to deal with the joint ranges. For prismatic joints this is one variable and its associated range. For revolute joints, we have to define two vectors one associted with link1 and the other link2 and define the scalar and vector products (this produces a third vector aligned with the rotation axis) to get the cosinus/sinus of the rotated angle that are then bounded given the range for the allowed rotation between the two links.
Definition at line 1665 of file joint.c. References AddCt2Monomial(), AddEquation2CS(), AddMonomial(), AddTerm2SearchCriterion(), AddVariable2CS(), AddVariable2Monomial(), ApplyLinkRot(), Tjoint::avoidLimits, Tjoint::avoidLimitsWeight, COS_VAR, COS_VAR_UNI, Tjoint::coupled, CT_REPRESENTATION, DeleteEquation(), DeleteInterval(), DeleteMonomial(), DeleteVariable(), EQU, Error(), FIX_JOINT, FREE_JOINT, GenerateDotProductEquation(), GetCSVariableID(), GetLinkName(), GetParameter(), Tjoint::hasReference, Tjoint::id, IN_PATCH_JOINT, IN_PATCH_JOINT_CTRL_VAR, INF, InitEquation(), InitMonomial(), IntervalCenter(), IntervalCosine(), IntervalSize(), IsGroundLink, Tjoint::link, Tjoint::linkID, NEW, NewInterval(), NewVariable(), NFUN, NO_UINT, PRS_JOINT, PRS_JOINT_VAR, Tjoint::range, Tjoint::range2, REP_JOINTS, ResetMonomial(), REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, ROT_JOINT_VAR_REF, SECONDARY_VAR, SetEquationCmp(), SetEquationType(), SetEquationValue(), SetVariableInterval(), SPH_JOINT, SPH_JOINT_VAR_REF, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, SYSTEM_EQ, SYSTEM_VAR, Tjoint::t, UNV_JOINT, UNV_JOINT_VAR, UNV_JOINT_VAR_REF, and Tjoint::vrange. Referenced by InitWorldKinCS(). ◆ GenerateJointEquationsInBranch()
Adds to the given equations the constraints of a joint Before using this method, the variables and equations for individual joints have to be generated (using GenerateJointEquations). When considered in a sequence, joints define a sum of vectors taking from the origin of the frame of reference of one link to the origin of the frame of reference for the next link. When these sums are taken on a closed branch, we get the loop equations. Since links and joints are defined in 3D, summing vectors defined on links and joints define 3 equations, one for X, one for Y, and another for Z.
Definition at line 1956 of file joint.c. References AddCt2Monomial(), AddMonomial(), AddVariable2Monomial(), ApplyLinkRot(), CT_REPRESENTATION, DeleteMonomial(), Error(), FIX_JOINT, FREE_JOINT, FREE_JOINT_VAR, GetCSVariableID(), GetLinkName(), GetParameter(), Tjoint::id, IN_PATCH_JOINT, IN_PATCH_JOINT_CTRL_VAR, InitMonomial(), IsGroundLink, Tjoint::link, Tjoint::linkID, NEW, NFUN, NO_UINT, Tjoint::normals, Tjoint::points, PRS_JOINT, PRS_JOINT_VAR, REP_JOINTS, ResetMonomial(), REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, Tjoint::t, and UNV_JOINT. Referenced by GenerateTransEquationsFromBranch(). ◆ JointForceEquation()
In tensegrity systems the forces exerced by the joints coincident in a given link should be balanced. Only STRUT, BAR, and CABLE joints can be used in tenegrities. STRUTS and BARS are compressed and CABLEs are in tension. The sum of compressions and tensions should vanish at each link (i.e. node).
Definition at line 2069 of file joint.c. References ApplyLinkRotNoDeform(), FALSE, GetCSVariableID(), GetLinkForceModel(), GetLinkName(), Tjoint::link, LINK_MAX_FORCE, Tjoint::linkID, NEW, and NO_FORCE. Referenced by GenerateForceEquilibriumEquations(). ◆ GenerateJointEquations()
Adds to the given cuiksystem the variables and equations necessary to deal with the joint. Intutively, we have to add equations so that the revolute/sliding axis is the same as view from link1 and from link2.
Definition at line 2111 of file joint.c. References AddCt2Monomial(), AddEquation2CS(), AddMonomial(), AddVariable2CS(), AddVariable2Monomial(), ApplyLinkRot(), CT_REPRESENTATION, DeleteEquation(), DeleteInterval(), DeleteMonomial(), DeleteVariable(), DOF_VAR, DotProduct(), DUMMY_VAR, EQU, Error(), FIX_JOINT, FREE_JOINT, FREE_JOINT_VAR, GenerateDotProductEquation(), GenerateSaddleEquation(), GetJointDOF(), GetJointRangeN(), GetJointRangeTopology(), GetLinkName(), GetParameter(), HTransformGetElement(), Tjoint::id, IN_PATCH_JOINT, IN_PATCH_JOINT_CTRL_VAR, IN_PATCH_JOINT_SCALE_VAR, InitEquation(), InitMonomial(), IsGroundLink, Tjoint::link, Tjoint::linkID, NEW, NewInterval(), NewVariable(), NFUN, NO_UINT, Tjoint::normals, Tjoint::normRange, Tjoint::points, Tjoint::preT, PRS_JOINT, REP_JOINTS, ResetMonomial(), REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SECONDARY_VAR, SetEquationCmp(), SetEquationType(), SetEquationValue(), SetVariableInterval(), SetVariableTopology(), SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, SYSTEM_EQ, SYSTEM_VAR, Tjoint::t, TOPOLOGY_S, UNV_JOINT, and UNV_JOINT_VAR. Referenced by InitWorldKinCS(). ◆ RegenerateJointSolution()
Solution points only include values for the system variables (and secondary). However, in some formulations, the frame joint equations use not only system/secondary variables, but, for instance, dummy variable too. This function computes the values for the joint-related non-basis variables form the basic ones for a given joint. Currently only the IN_PATCH_JOINT uses dummy variables but this can change in the future.
Definition at line 2435 of file joint.c. References CT_REPRESENTATION, GetCSVariableID(), GetLinkName(), GetParameter(), Tjoint::id, IN_PATCH_JOINT, IN_PATCH_JOINT_CTRL_VAR, Tjoint::link, NEW, REP_JOINTS, and Tjoint::t. Referenced by RegenerateMechanismSolution(). ◆ RegenerateJointBox()
This is the same as RegenerateJointSolution but working on solution boxes instead of on solution points (i.e. it is interval-based instead of floating point based)
Definition at line 2471 of file joint.c. References CT_REPRESENTATION, GetBoxInterval(), GetCSVariableID(), GetLinkName(), GetParameter(), Tjoint::id, IN_PATCH_JOINT, IN_PATCH_JOINT_CTRL_VAR, IntervalProduct(), Tjoint::link, NEW, REP_JOINTS, SetBoxInterval(), and Tjoint::t. Referenced by RegenerateMechanismBox(). ◆ GenerateJointSolution()
Generates the joint related variables in a solution from the homogeneous transforms of the two links involved in the joint and the values of the degrees of freedom for this joint. This is part of the mechanism to transform from dof information to a solution point in the cuik form (so that in can be plotted, etc). This is transforms2samples, but using the dofs to facilitate the computations. Actually the dofs could be computed from the transforms using GetJointTransform but having them facilitates the computation (see GetLinkTransformsFromSolution for the inverse operation, i.e samples2transforms). Since the dofs are finally (marginally) used, this can also be seen as dof2samples (see GetJointDOFValues for the inverse). The rest of the dof2samples is implemented in GenerateLinkSolution.
Definition at line 2509 of file joint.c. References COS_VAR, COS_VAR_UNI, CT_REPRESENTATION, DotProduct(), Error(), FIX_JOINT, FREE_JOINT, FREE_JOINT_VAR, GetCSVariableID(), GetLinkName(), GetParameter(), Tjoint::hasLimits, HTransformApplyRot(), Tjoint::id, IN_PATCH_JOINT, IN_PATCH_JOINT_CTRL_VAR, IN_PATCH_JOINT_SCALE_VAR, Tjoint::link, Tjoint::linkID, NEW, NO_UINT, Tjoint::normals, PRS_JOINT, PRS_JOINT_VAR, REP_JOINTS, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, ROT_JOINT_VAR_REF, SPH_JOINT, SPH_JOINT_VAR_REF, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, Tjoint::t, UNV_JOINT, UNV_JOINT_VAR, UNV_JOINT_VAR_REF, and Tjoint::vrange. Referenced by WorldDOF2Sol(). ◆ GetJointBasicTransform()
Computes the homogeneous trasform at a joint, without the prev/post transforms, i.e., the transform of the degrees of freedom at the joint. Note that the s and vj for IN_PATCH joints are not correctly computed. If used with this kind of joints, and error is generated.
Definition at line 2681 of file joint.c. References CrossProduct(), Error(), FIX_JOINT, FREE_JOINT, GetJointDOF(), HTransformAcumRot(), HTransformDelete(), HTransformFromVectors(), HTransformIdentity(), HTransformInverse(), HTransformProduct(), HTransformRx(), HTransformRx2(), HTransformRy2(), HTransformRz2(), HTransformTxyz(), IN_PATCH_JOINT, MatrixVectorProduct(), Normalize(), Tjoint::normals, Tjoint::points, PRS_JOINT, RC2INDEX, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, RX, RY, RZ, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, SumVectorScale(), Tjoint::t, and UNV_JOINT. Referenced by HandC(), and MechEnergy(). ◆ GetJointTransform()
Computes the homogeneous trasform taking from the first link involved in the joint to the second link, considering a given value for the degrees of freedom of the joint. This is the dof2transforms (see GetJointDOFValues for the inverse).
Definition at line 2983 of file joint.c. References CrossProduct(), Error(), FIX_JOINT, FREE_JOINT, HTransformAcumRot(), HTransformCopy(), HTransformDelete(), HTransformFromVectors(), HTransformInverse(), HTransformProduct(), HTransformRx(), HTransformRy(), HTransformRz(), HTransformTxyz(), IN_PATCH_JOINT, M_PI, Normalize(), Tjoint::normals, Tjoint::points, Tjoint::postT, Tjoint::preT, PRS_JOINT, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, RX, RY, RZ, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, SumVectorScale(), Tjoint::t, and UNV_JOINT. Referenced by GetLinkTransformsFromDOF(). ◆ GetJointDOFValues()
Recovers the joint DOFs given the poses of the two links connected by the joint. This function recovers the joint parameters such that t2=t1*T where T is the transform sequence resulting from GetJointTransSeq. This is the transforms2dof (the inverse of GetJointTransform) Since the transforms are computed from samples, this is also samples2dof, i.e., the inverse of GenerateJointSolution + GenerateLinkSolution. Note that dofs are only associated with joints and, thus there is no need for a GetLinkDOFValues to complete the inverse.
Definition at line 3091 of file joint.c. References AXIS_H, AXIS_X, AXIS_Y, AXIS_Z, Tjoint::coupled, CrossProduct(), Det2x2(), Det3x3(), DifferenceVector(), DotProduct(), Error(), FIX_JOINT, FREE_JOINT, GetYawPitchRoll(), HTransformCopy(), HTransformDelete(), HTransformFromVectors(), HTransformGetElement(), HTransformInverse(), HTransformProduct(), HTransformSetElement(), IN_PATCH_JOINT, Norm(), Normalize(), Tjoint::normals, Tjoint::points, Tjoint::postT, Tjoint::preT, PRS_JOINT, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, SumVectorScale(), Tjoint::t, UNV_JOINT, and ZERO. Referenced by GetMechanismDOFsFromTransforms(). ◆ GetJointTransSeq()
Build the sequence of transforms taking from one link to the next via the joint.
Definition at line 3286 of file joint.c. References AddCtTrans2TransSeq(), AddDispTrans2TransSeq(), AddPatchTrans2TransSeq(), AddVarTrans2TransSeq(), Tjoint::coupled, CT_REPRESENTATION, DOF_VAR, Error(), FIX_JOINT, FREE_JOINT, GetCSVariableID(), GetLinkName(), GetParameter(), HTransformRx2(), HTransformRz2(), Tjoint::id, IN_PATCH_JOINT, InitTransSeq(), Tjoint::link, NEW, NO_UINT, Tjoint::normals, PA, Tjoint::points, Tjoint::postT, Tjoint::preT, PRS_JOINT, REP_JOINTS, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, RX, RY, RZ, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, SumVector(), Tjoint::t, and UNV_JOINT. Referenced by GenerateMEquationFromBranch(). ◆ PrintJointAxes()
Print a point and a vector for the joint axis. This is latter used to generate the Jacobian of the mechanism at a given point.
Definition at line 3485 of file joint.c. References Error(), FREE_JOINT, GetTransform2Link(), HTransformApply(), HTransformApplyRot(), IsGroundLink, Tjoint::link, Tjoint::linkID, Tjoint::normals, Tjoint::points, PRS_JOINT, REV_JOINT, Tjoint::t, and UNV_JOINT. Referenced by PrintWorldAxes(). ◆ PrintJoint()
Stores the joint information into a file in the format valid to be read by InitWorldFromFile.
Definition at line 3525 of file joint.c. References Tjoint::acceleration, Tjoint::avoidLimits, Tjoint::damping, Tjoint::effort, Error(), FIX_JOINT, FREE_JOINT, Tjoint::friction, GetLinkName(), Tjoint::hasLimits, Tjoint::hasReference, HTransformPrettyPrint(), IN_PATCH_JOINT, INF, Tjoint::link, Tjoint::points, Tjoint::preT, PrintInterval(), PRS_JOINT, Tjoint::range, Tjoint::range2, REV_JOINT, REV_LOW_JOINT, REV_UP_JOINT, SPH_JOINT, SPH_SPH_LOW_JOINT, SPH_SPH_UP_JOINT, SumVector(), Tjoint::t, UNV_JOINT, Tjoint::velocity, and Tjoint::vrange. Referenced by PrintMechanism(). ◆ DeleteJoint()
Deletes the information stored in a joint and frees the allocated memory.
Definition at line 3707 of file joint.c. References DeleteInterval(), HTransformDelete(), Tjoint::postT, Tjoint::preT, Tjoint::range, and Tjoint::range2. Referenced by AddLeg2World(), DeleteMechanism(), GenerateKinTree(), InitWorldFromMolecule(), and main(). |
Follow us!