Tworld Struct Reference

Detailed Description

All the necessary information to generate equations for mechanisms and the equations themselves.

It also includes the information about the obstacles around the mechanisms and, thus, provide methods to detect collisions.

Finally, the functions associated to this structure allow to animate solution paths (i.e. to move the mechanisms along a set of configurations).

Definition at line 236 of file world.h.

Data Fields

unsigned int stage
 
Tenvironment e
 
Tmechanism m
 
unsigned int nl
 
unsigned int ncl
 
unsigned int nb
 
unsigned int nj
 
unsigned int no
 
unsigned int np
 
unsigned int endEffector
 
double maxCoord
 
boolean ** checkCollisionsLL
 
boolean ** checkCollisionsLO
 
TCuikSystem kinCS
 
unsigned int nvars
 
unsigned int nsvars
 
booleansystemVars
 
unsigned int * sortedLinks
 
unsigned int * predLink
 
unsigned int * jointTo
 
signed int * jointS
 
Tbranchbranch2Link
 
Tequations refEqs
 
TJacobian refEqsJ
 
booleanopenLink
 
unsigned int nLoops
 
booleanclosingJoint
 
unsigned int * sortedClosures
 
unsigned int nwcd
 
TworldCDwcd
 
unsigned int ndof
 
unsigned int da
 
unsigned int * link2dof
 
unsigned int * dof2link
 
unsigned int * dof2param
 
unsigned int * joint2dof
 
unsigned int * dof2joint
 
unsigned int * dof2range
 

Field Documentation

◆ stage

unsigned int Tworld::stage

Stage of the world structure: EMPTY_WORLD, WORLD_WITH_GEOMETRY, WORLD_WITH_COLLISIONS, WORLD_WITH_EQUATIONS. Latter stages imply the previous ones.

Definition at line 237 of file world.h.

Referenced by AddJoint2World(), AddLink2World(), AddObstacle2World(), AnimateWorld(), CheckAllCollisions(), CheckLinkLinkCollision(), CheckLinkObstacleCollision(), CheckSelfCollisions(), DeleteWorld(), EvaluateWorldJacobian(), FixLinks(), FixZToZero(), GenerateForceEquilibriumEquations(), GenerateWorldEquations(), GenerateWorldSingularityEquations(), GetLinkTransformsFromSolutionPoint(), GetWorldClosureN(), GetWorldInitialBox(), GetWorldJacobian(), GetWorldJointTo(), GetWorldLinkN(), GetWorldNumSystemVariables(), GetWorldNumVariables(), GetWorldPositionEqs(), GetWorldPositionVars(), GetWorldPositionVelocityEqs(), GetWorldPositionVelocityVars(), GetWorldPredLink(), GetWorldSimpInitialBox(), GetWorldSimpJacobian(), GetWorldSimpNHessian(), GetWorldSimpNJacobian(), GetWorldSimpTopology(), GetWorldSimpVariableMask(), GetWorldSystemVarName(), GetWorldSystemVars(), GetWorldTopology(), GetWorldVarNames(), InitWorld(), InitWorldCD(), IsClosingJoint(), IsWorldPolynomial(), MaxWorldReduction(), MoveWorld(), MoveWorldDOF(), NewtonInWorld(), NoCheckAllCollisions(), NoCheckLinkLinkCollision(), NoCheckLinkObstacleCollision(), NoCheckSelfCollisions(), NumLoops(), PlotWorld(), PrintWorldAxes(), PrintWorldCS(), RegenerateWorldOriginalPoint(), RegenerateWorldSolutionPoint(), WorldCoupleTensegrityVariable(), WorldDOF2Sol(), WorldErrorInEquations(), WorldErrorInSimpEquations(), WorldErrorInSimpInequalities(), WorldEvaluateEquations(), WorldEvaluateSimpEquations(), WorldEvaluateSubSetSimpEquations(), WorldForceField(), WorldForceVars(), WorldGenerateSimplifiedPoint(), WorldGenerateSimplifiedPointFromSystem(), WorldInequalitiesHold(), WorldInitDOFInfo(), WorldManifoldDimension(), WorldPotentialEnergy(), WorldSample2DOF(), WorldSimpInequalitiesHold(), and WorldSimpKinematicVars().

◆ e

◆ m

◆ nl

◆ ncl

unsigned int Tworld::ncl

Number of connection links in the mechanism.

Definition at line 246 of file world.h.

Referenced by AddLink2World(), GenerateKinTree(), and InitWorld().

◆ nb

unsigned int Tworld::nb

Number of convex bodies forming the links.

Definition at line 247 of file world.h.

Referenced by AddLink2World(), GetWorldNConvexBodiesInLinks(), and InitWorld().

◆ nj

◆ no

unsigned int Tworld::no

◆ np

unsigned int Tworld::np

Number of convex bodies in the links and in the environment (nb+no).

Definition at line 250 of file world.h.

Referenced by AddLink2World(), AddObstacle2World(), GetWorldNConvexBodies(), and InitWorld().

◆ endEffector

unsigned int Tworld::endEffector

Identifier of the link that has to be considered as the manipulated object (or end effector).

Definition at line 253 of file world.h.

Referenced by AddLink2World(), InitWorld(), and PrintWorldCollisionInfo().

◆ maxCoord

double Tworld::maxCoord

Sum of the maximum coordinate values for all objects in the mechanism.

Definition at line 255 of file world.h.

Referenced by GenerateEquationsFromBranch(), GenerateWorldEquations(), GenerateWorldSingularityEquations(), GetWorldRangeDOF(), and InitWorldKinCS().

◆ checkCollisionsLL

boolean** Tworld::checkCollisionsLL

TRUE if we have to chek the collision between the corresponding pair of links. Note that in the wold definition file we can not activate/desactive the collision checking for sub-parts of a link. To get this effect you can use assign the DECOR type to the link sub-parts not to be considered in the collision detection.

Definition at line 258 of file world.h.

Referenced by AddLink2World(), AnyCollision(), CheckLinkLinkCollision(), CheckSelfCollisions(), DeleteWorldCollisionInfo(), InitWorld(), InitWorldCD(), NoCheckLinkLinkCollision(), NoCheckSelfCollisions(), and PrintCollisions().

◆ checkCollisionsLO

boolean** Tworld::checkCollisionsLO

TRUE if we have to chek the collision between the corresponding link and object in the environment. Note that in the wold definition file we can not activate/desactive the collision checking for sub-parts of a link. To get this effect you can use assign the DECOR type to the link sub-parts not to be considered in the collision detection.

Definition at line 267 of file world.h.

Referenced by AddLink2World(), AddObstacle2World(), AnyCollision(), CheckAllCollisions(), CheckLinkObstacleCollision(), DeleteWorldCollisionInfo(), InitWorld(), InitWorldCD(), NoCheckAllCollisions(), NoCheckLinkObstacleCollision(), and PrintCollisions().

◆ kinCS

TCuikSystem Tworld::kinCS

The cuiksystem derived form the mechanism.

Definition at line 278 of file world.h.

Referenced by AnimateWorld(), DeleteWorldCS(), EvaluateWorldJacobian(), FixLinks(), FixZToZero(), GenerateForceEquilibriumEquations(), GenerateMEquationFromBranch(), GenerateTransEquationsFromBranch(), GenerateWorldEquations(), GenerateWorldSingularityEquations(), GetLinkTransformsFromSolution(), GetLinkTransformsFromSolutionPoint(), GetSolutionPointFromLinkTransforms(), GetWorldInitialBox(), GetWorldJacobian(), GetWorldNumSystemVariables(), GetWorldNumVariables(), GetWorldPositionEqs(), GetWorldPositionVars(), GetWorldPositionVelocityEqs(), GetWorldPositionVelocityVars(), GetWorldSimpInitialBox(), GetWorldSimpJacobian(), GetWorldSimpNHessian(), GetWorldSimpNJacobian(), GetWorldSimpTopology(), GetWorldSimpVariableMask(), GetWorldSystemVarName(), GetWorldSystemVars(), GetWorldTopology(), GetWorldVarNames(), GetWorldVarTopology(), InitWorldCS(), InitWorldKinCS(), IsWorldPolynomial(), MaxWorldReduction(), MoveWorld(), NewtonInWorld(), PrintWorldAxes(), PrintWorldCS(), RegenerateWorldOriginalPoint(), RegenerateWorldOriginalSystemPoint(), RegenerateWorldSolutionPoint(), WorldCoupleTensegrityVariable(), WorldDOF2Sol(), WorldErrorInEquations(), WorldErrorInSimpEquations(), WorldErrorInSimpInequalities(), WorldEvaluateEquations(), WorldEvaluateSimpEquations(), WorldEvaluateSubSetSimpEquations(), WorldFixTensegrityAddon(), WorldForceField(), WorldForceVars(), WorldGenerateSimplifiedPoint(), WorldGenerateSimplifiedPointFromSystem(), WorldHasVelocity(), WorldInequalitiesHold(), WorldManifoldDimension(), WorldPotentialEnergy(), WorldSimpCuikNewton(), WorldSimpInequalitiesHold(), and WorldSimpKinematicVars().

◆ nvars

unsigned int Tworld::nvars

Number of variables in the kinCS

Definition at line 280 of file world.h.

Referenced by GenerateWorldEquations(), InitWorld(), WorldForceField(), WorldForceVars(), and WorldSimpKinematicVars().

◆ nsvars

unsigned int Tworld::nsvars

Number of system variables in the kinCS

Definition at line 281 of file world.h.

Referenced by GenerateWorldEquations(), and InitWorld().

◆ systemVars

boolean* Tworld::systemVars

Array of booleans with as many elements as variables has the cuiksystem and where each entry is TRUE if the corresponding variable is a system variable.

Definition at line 282 of file world.h.

Referenced by DeleteWorldCS(), GenerateWorldEquations(), GetSolutionPointFromLinkTransforms(), InitWorld(), MaxWorldReduction(), RegenerateWorldOriginalSystemPoint(), RegenerateWorldSolutionPoint(), and WorldForceVars().

◆ sortedLinks

unsigned int* Tworld::sortedLinks

Links as they are encountered when expanding graph implicitly defined by links and joints.

Definition at line 287 of file world.h.

Referenced by DeleteWorldCS(), GenerateKinTree(), GetLinkTransformsFromDOF(), and GetWorldLinkN().

◆ predLink

unsigned int* Tworld::predLink

Predecesor link (in the tree of links spanning the kinematic graph).

Definition at line 289 of file world.h.

Referenced by DeleteWorldCS(), GenerateKinTree(), and GetWorldPredLink().

◆ jointTo

unsigned int* Tworld::jointTo

Joint taking to a given link when expanding graph implicitly defined by links and joints.

Definition at line 291 of file world.h.

Referenced by DeleteWorldCS(), GenerateKinTree(), GetLinkTransformsFromDOF(), and GetWorldJointTo().

◆ jointS

signed int* Tworld::jointS

Orientation of jointTo.

Definition at line 293 of file world.h.

Referenced by DeleteWorldCS(), GenerateKinTree(), and GetWorldJointTo().

◆ branch2Link

Tbranch* Tworld::branch2Link

Sequence of joints taking from the ground link to each of the other links. This is used to compute the refEqs (see below) and to transfrom from dof to matrices. This informatin is redundant with the one encoded in 'sortedLinks' and 'joinsTo' but we keep it for convenience.

Definition at line 294 of file world.h.

Referenced by DeleteWorldCS(), FixLinks(), GenerateKinTree(), GenerateWorldEquations(), GetLinkTransformsFromDOF(), InitWorld(), and WorldFixTensegrityAddon().

◆ refEqs

Tequations Tworld::refEqs

Equations giving (part of) the forward kinemtics for all links. In matrix-like representations this includes three equations for each link giving the position of the frame of reference of each link in the global frame of reference. They define the translations using rotation variables and fixed vectors. When using a REP_DOF this includes matrix equations giving the homogeneous matrix for each link.

Definition at line 302 of file world.h.

Referenced by DeleteWorldCS(), GenerateWorldEquations(), GenerateWorldSingularityEquations(), GetLinkTransformsFromSolution(), and PrintWorldAxes().

◆ refEqsJ

TJacobian Tworld::refEqsJ

Jacobian of the equations in refEqs. This is computed in all the cases, but only actually used if the representation is DOF-based in the WorldAtomJacobian function. Note that the refEqs are given in the original variables (i.e., without any simplification) and so it is the Jacobian.

Definition at line 312 of file world.h.

Referenced by DeleteWorldCS(), GenerateWorldEquations(), and WorldAtomJacobian().

◆ openLink

boolean* Tworld::openLink

TRUE if the link is at the end of an open branch. In this case the kinematic system includes variables with the position of this link and we have to take this into account when generating configurations from degrees of freedom (see WorldDOF2Sol)

Definition at line 320 of file world.h.

Referenced by DeleteWorldCS(), GenerateKinTree(), and WorldDOF2Sol().

◆ nLoops

unsigned int Tworld::nLoops

Number of loops in the mechanisms.

Definition at line 327 of file world.h.

Referenced by GenerateKinTree(), GetWorldClosureN(), and NumLoops().

◆ closingJoint

boolean* Tworld::closingJoint

TRUE for joints closing loop.

Definition at line 328 of file world.h.

Referenced by DeleteWorldCS(), GenerateKinTree(), and IsClosingJoint().

◆ sortedClosures

unsigned int* Tworld::sortedClosures

Loop closures in order of appearance.

Definition at line 329 of file world.h.

Referenced by DeleteWorldCS(), GenerateKinTree(), and GetWorldClosureN().

◆ nwcd

unsigned int Tworld::nwcd

Number of wcd structures being initialized. When using OpenMP we initiliaze as many wcd structures as threads so that we can check for collision detection in parallel.

Definition at line 331 of file world.h.

Referenced by DeleteWorldCD(), InitWorldCD(), and MoveAndCheckCDFromTransforms().

◆ wcd

TworldCD* Tworld::wcd

The collision detection information, if any.

Definition at line 335 of file world.h.

Referenced by DeleteWorldCD(), InitWorld(), InitWorldCD(), MoveAndCheckCD(), MoveAndCheckCDFromTransforms(), PlotWorld(), PrintWorldCollisionInfo(), WorldCanCollide(), and WorldContinuousCD().

◆ ndof

unsigned int Tworld::ndof

◆ da

unsigned int Tworld::da

Dimension of the action space.

Definition at line 338 of file world.h.

Referenced by AddJoint2World(), GetWorldActionDimension(), and InitWorld().

◆ link2dof

unsigned int* Tworld::link2dof

Mapping from links to degrees of freedom.

Definition at line 340 of file world.h.

Referenced by GetLinkTransformsFromDOF(), WorldDeleteDOFInfo(), and WorldInitDOFInfo().

◆ dof2link

unsigned int* Tworld::dof2link

Mapping from degrees of freedom to link.

Definition at line 341 of file world.h.

Referenced by GetWorldDOFLabel(), GetWorldRangeDOF(), WorldDeleteDOFInfo(), and WorldInitDOFInfo().

◆ dof2param

unsigned int* Tworld::dof2param

Mapping from degrees of freedom to specific configuration of each link.

Definition at line 342 of file world.h.

Referenced by GetWorldDOFLabel(), GetWorldRangeDOF(), WorldDeleteDOFInfo(), and WorldInitDOFInfo().

◆ joint2dof

unsigned int* Tworld::joint2dof

Mapping from joints to degrees of freedom.

Definition at line 345 of file world.h.

Referenced by GetLinkTransformsFromDOF(), GetWorldJoint2Dof(), WorldDeleteDOFInfo(), WorldDOF2Sol(), and WorldInitDOFInfo().

◆ dof2joint

unsigned int* Tworld::dof2joint

Mapping from degrees of freedom to joints.

Definition at line 346 of file world.h.

Referenced by GenerateWorldEquations(), GetWorldDOFLabel(), GetWorldJointLabel(), GetWorldRangeDOF(), WorldDeleteDOFInfo(), WorldDOF2Sol(), WorldDOFTopology(), and WorldInitDOFInfo().

◆ dof2range

unsigned int* Tworld::dof2range

Mapping from degrees of freedom to specific range of each joint.

Definition at line 347 of file world.h.

Referenced by GetWorldDOFLabel(), GetWorldJointLabel(), GetWorldRangeDOF(), WorldDeleteDOFInfo(), WorldDOF2Sol(), WorldDOFTopology(), and WorldInitDOFInfo().