world.c File Reference Detailed Description
Function Documentation
Defines an empty kinematic chain.
Definition at line 148 of file world.c. References CopyVoidPtr(), DeleteVoidPtr(), INIT_NUM_JOINTS, InitVector(), and Tbranch::steps. Referenced by Branches2Links(), CopyBranch(), and MergeBranches(). Defines a kinematic chain from another chain.
Definition at line 153 of file world.c. References AddStepToBranch(), CreateBranch(), GetBranchStep(), and nStepsBranch(). Referenced by Branches2Links(), and GenerateKinTree(). Adds a step to a kinematic chain.
Definition at line 168 of file world.c. References TBranchStep::joint, NEW, NewVectorElement(), TBranchStep::sign, and Tbranch::steps. Referenced by Branches2Links(), CopyBranch(), GenerateKinTree(), and MergeBranches().
Gets the number of steps in a kinematic chain.
Definition at line 180 of file world.c. References Tbranch::steps, and VectorSize(). Referenced by CopyBranch(), DeleteBranch(), GenerateEquationsFromBranch(), GenerateKinTree(), GenerateMEquationFromBranch(), GenerateTransEquationsFromBranch(), GetBranchDestination(), GetTransformFromBranch(), and MergeBranches(). Retrives a particular step form a kinematic chain. If there is no step with the given number in the kinematic chain, this funtion triggers an error.
Definition at line 185 of file world.c. References Error(), GetVectorElement(), and Tbranch::steps. Referenced by CopyBranch(), GenerateMEquationFromBranch(), GenerateTransEquationsFromBranch(), GetBranchDestination(), GetBranchOrigin(), and MergeBranches().
Returns the identifier of the link where the kinematic chain starts.
Definition at line 199 of file world.c. References GetBranchStep(), JointFromID(), and JointToID(). Referenced by GenerateEquationsFromBranch().
Returns the identifier of the link where the kinematic chain ends.
Definition at line 214 of file world.c. References GetBranchStep(), JointFromID(), JointToID(), and nStepsBranch(). Referenced by GenerateEquationsFromBranch(). We get two branches, b1,b2, representing two paths from, typically, the groundLink to the same link. The output, b, will be the closed branch resulting from eliminating from b1 and b2 the initial common path from the groudnLink to the point where the paths diverge.
Definition at line 229 of file world.c. References AddStepToBranch(), CreateBranch(), FALSE, GetBranchStep(), and nStepsBranch(). Referenced by GenerateKinTree().
Defines te transfrom taking from the origin to the destination of the branch by accumulating the transforms for the joints involved in the branch.
Definition at line 272 of file world.c. References GetJointID(), GetVectorElement(), HTransformIdentity(), HTransformInverse(), HTransformProduct(), TBranchStep::joint, nStepsBranch(), TBranchStep::sign, and Tbranch::steps. Referenced by GetLinkTransformsFromDOF().
Deletes the information stored in a kinematic branch and frees the allocated memory.
Definition at line 293 of file world.c. References DeleteVector(), GetVectorElement(), nStepsBranch(), and Tbranch::steps. Referenced by DeleteWorldCS(), GenerateKinTree(), and InitWorldKinCS().
Considering the mechanisms as a graph where the vertices are the links and the edges are defined by the joints, this function determines the shortest from link f to all the other links, if possible (some links might be disconnected form link f).
Definition at line 560 of file world.c. References AddStepToBranch(), CopyBranch(), CreateBranch(), FALSE, GetMechanismJoint(), JointFromID(), JointToID(), Tworld::m, NEW, Tworld::nl, NO_UINT, and TRUE. Referenced by GenerateKinTree(). Builds a kinematic tree departing from the ground link. From the kinematic tree we extract two types of branches
A mechanism can have the two types of branches. Before building the kinematic tree, we ensure the mechanism to be fully connected: Parts of the mechanism disconnected from the ground link are connected to it using free-joints.
Definition at line 632 of file world.c. References AddJoint2Mechanism(), AddStepToBranch(), Tworld::branch2Link, Branches2Links(), CopyBranch(), CopyVoidPtr(), DeleteBranch(), DeleteJoint(), DeleteVoidPtr(), FALSE, GetMechanismJoint(), GetMechanismLink(), InitVector(), JointFromID(), Tworld::jointTo, JointToID(), Tworld::m, MergeBranches(), NEW, NewFreeJoint(), NewVectorElement(), Tworld::nj, Tworld::nl, nStepsBranch(), Tworld::openLink, Tworld::sortedLinks, and TRUE. Referenced by InitWorldKinCS().
Generates a matrix equatoin from a branch by accumulating the (symbolic) transforms for the joints in the branch.
Definition at line 725 of file world.c. References AddTransSeq2MEquation(), DeleteTransSeq(), GetBranchStep(), GetJointTransSeq(), GetLinkTransSeq(), InitMEquation(), JointFrom(), Tworld::kinCS, nStepsBranch(), and SimplifyMEquation(). Referenced by GenerateEquationsFromBranch(), and GenerateWorldEquations().
Generate equations from a branch considering the branch merely as a sum of vectors. The difference with GenerateEquationsFromBranch is that for open branches we do not add to the resulting equations the variables representing the position of the link reached by this open branch. Thus, the output equations here only involve system equations. Moreove, the resulting equations are not added to a cuiksystem but returned to the caller.
Definition at line 756 of file world.c. References CT_REPRESENTATION, EQU, Error(), GenerateJointEquationsInBranch(), GetBranchStep(), GetParameter(), InitEquation(), Tworld::kinCS, nStepsBranch(), REP_JOINTS, SetEquationCmp(), and SetEquationType(). Referenced by FixLinks(), GenerateEquationsFromBranch(), GenerateWorldEquations(), and WorldFixTensegrityAddon().
Generate equations from a branch. If the branch is closed, we generate 3 loop equations (X, Y and Z) that are added to the given cuiksystem. If the branch is open we generate equations that give the 3D position in the global frame of reference of the origin of the frame of reference of the last link in the branch. This function uses GenerateTransEquationsFromBranch and then completes equations for open branches and add the results to the given cuiksystem.
Definition at line 794 of file world.c. References AddCt2Monomial(), AddEquation2CS(), AddMatrixEquation2CS(), AddMonomial(), AddVariable2CS(), AddVariable2Monomial(), CT_REPRESENTATION, DeleteEquation(), DeleteInterval(), DeleteMEquation(), DeleteMonomial(), DeleteVariable(), FALSE, GenerateMEquationFromBranch(), GenerateTransEquationsFromBranch(), GetBranchDestination(), GetBranchOrigin(), GetLinkName(), GetMechanismLink(), GetParameter(), InitMonomial(), LINK_TRANS, Tworld::m, Tworld::maxCoord, NEW, NewInterval(), NewVariable(), NFUN, nStepsBranch(), REP_JOINTS, ResetMonomial(), SetEquationType(), SetVariableInterval(), SYSTEM_EQ, and SYSTEM_VAR. Referenced by InitWorldKinCS().
Removes the collision information stored in a Tworld: the Tworld::checkCollisionsLL and Tworld::checkCollisionsLO arrays.
Definition at line 1877 of file world.c. References Tworld::checkCollisionsLL, Tworld::checkCollisionsLO, and Tworld::nl. Referenced by DeleteWorld().
Collects information about the DOF of the mechanism from the joints.
Definition at line 1896 of file world.c. References CoupledWith(), Tworld::dof2joint, Tworld::dof2link, Tworld::dof2param, Tworld::dof2range, Error(), GetJointDOF(), GetMechanismJoint(), GetMechanismLink(), Tworld::joint2dof, Tworld::link2dof, Tworld::m, Tworld::ndof, NEW, Tworld::nj, Tworld::nl, NO_UINT, NumLinkDOF(), Tworld::stage, and WORLD_DEFINED. Referenced by GenerateWorldEquations().
Deletes the information collected at WorldInitDOFInfo.
Definition at line 1986 of file world.c. References Tworld::dof2joint, Tworld::dof2link, Tworld::dof2param, Tworld::dof2range, Tworld::joint2dof, and Tworld::link2dof. Referenced by DeleteWorldCS().
Computes a transform giving the pose for each link from values for the different degrees of freedom of the mechanisms.
Definition at line 1145 of file world.c. References Tworld::branch2Link, GetJointTransform(), GetLinkConfFromDOF(), GetLinkTransform(), GetMechanismJoint(), GetMechanismLink(), GetTransformFromBranch(), HTransformDelete(), HTransformIdentity(), HTransformInverse(), HTransformProduct(), IsVariableLengthLink(), Tworld::joint2dof, JointFrom(), JointFromID(), Tworld::jointTo, JointToID(), Tworld::link2dof, Tworld::m, NEW, Tworld::nj, Tworld::nl, and Tworld::sortedLinks. Referenced by GetLinkTransformsFromSolution(), GetLinkTransformsFromSolutionPoint(), MoveWorldDOF(), and WorldDOF2Sol().
Computes a transform giving the pose for each link from values for a solution point. Note that if solutions are given as degrees of freedom this is equivalent to GetLinkTransformsFromDOF. The difference with respect to GetLinkTransformsFromSolutionPoint is that here the point includes values for all variables and in GetLinkTransformsFromSolutionPoint only the system variables are given.
Definition at line 1305 of file world.c. References CT_REPRESENTATION, EvaluateEqualityEquations(), FALSE, GetLinkTransformsFromDOF(), GetMechanismLink(), GetParameter(), GetTransform2Link(), IsGroundLink, Tworld::kinCS, Tworld::m, NEW, Tworld::nl, Tworld::refEqs, and REP_JOINTS. Referenced by GetLinkTransformsFromSolutionPoint(), MoveAndCheckCD(), MoveWorld(), and WorldSample2DOF(). Identifies links articulated with only two co-punctual revolute joints. For those links it is possible to re-define the reference frame so that simpler equations will be obtained.
Definition at line 879 of file world.c. References GetJointPoint(), GetJointType(), GetMechanismJoint(), JointFromID(), JointToID(), Tworld::m, and REV_JOINT. Referenced by InitWorldKinCS().
Initializes the kinematic sub-problem of a Tworld structure.
Definition at line 916 of file world.c. References AllRevolute(), ChangeLinkReferenceFrame(), CT_REPRESENTATION, DeleteBranch(), DeleteVector(), Error(), GenerateEquationsFromBranch(), GenerateJointEquations(), GenerateJointRangeEquations(), GenerateKinTree(), GenerateLinkRot(), GetMechanismJoint(), GetMechanismLink(), GetParameter(), GetVectorElement(), IsRevoluteBinaryLink(), Tworld::kinCS, Tworld::m, Tworld::maxCoord, NEW, Tworld::nj, Tworld::nl, REP_JOINTS, SYSTEM_EQ, and VectorSize(). Referenced by GenerateWorldEquations().
Initializes the cuiksystems in a Tworld structure. The Tworld::kinCS is initialized as an empty cuiksystem. Equations are added to this system using InitWorldKinCS.
Definition at line 998 of file world.c. References InitCuikSystem(), and Tworld::kinCS. Referenced by GenerateWorldEquations().
Deletes the equations stored in the world.
Definition at line 1003 of file world.c. References Tworld::branch2Link, DeleteBranch(), DeleteCuikSystem(), DeleteEquations(), DeleteJacobian(), Tworld::jointTo, Tworld::kinCS, Tworld::nl, Tworld::openLink, Tworld::refEqs, Tworld::refEqsJ, Tworld::sortedLinks, Tworld::systemVars, and WorldDeleteDOFInfo(). Referenced by DeleteWorld().
Deletes the collision information stored in the world, if any.
Definition at line 1127 of file world.c. References DeleteCD(), Tworld::nwcd, and Tworld::wcd. Referenced by DeleteWorld().
Initializes the collision detector. This is decoupled from the world initialization so that we can init it only when required. In some cases (for instance when parallelizing the atlas construction using OpenMP) we need to perform collision detection in parallel for different threads. To avoid problems, in this case we initialize separate collision detection structures.
Definition at line 1030 of file world.c. References AnyCollision(), Tworld::checkCollisionsLL, Tworld::checkCollisionsLO, CT_CD_ENGINE, DeleteCD(), Tworld::e, Error(), GetParameter(), InitCD(), Tworld::m, NEW, Tworld::nwcd, Tworld::stage, Tworld::wcd, and WORLD_DEFINED. Referenced by main(), and PlotWorld(). Determides if, after initializing the world collision info, any collision is possible. This function can only be used after calling InitWorldCD.
TRUE if any collision is possible. Definition at line 1063 of file world.c. References Tworld::wcd. Determines if the collision detection engine is discrete or continuous. Note that the return is only valid if the collision detection system has been previously initialized.
Definition at line 1068 of file world.c. References C_FCL, FALSE, GetCDEngine(), and Tworld::wcd.
Moves the links to the position given by the corresponding transforms and determines if there is any collision. No check is done on whether the given point is actually a solution or not.
Definition at line 1077 of file world.c. References CheckCollision(), Tworld::e, FALSE, Tworld::m, Tworld::nwcd, PrintCollisionInfo(), and Tworld::wcd. Referenced by MoveAndCheckCD(), MoveWorld(), and MoveWorldDOF().
Computes the link transforms from the solution point and calls MoveAndCheckCDFromTransforms. The solution point is assumed to have values for all variables (including the dummy ones). Recall that a solution point with values only for the system variables can be compleated using RegenerateWorldSolutionPoint and that a solution point in the simplified system can be converted to a solution point in the full original system using RegenerateWorldOriginalPoint.
Definition at line 1102 of file world.c. References C_FCL, DeleteLinkTransforms(), FALSE, GetCDEngine(), GetLinkTransformsFromSolution(), MoveAndCheckCDFromTransforms(), and Tworld::wcd. Referenced by main().
Computes a transform giving the pose for each link from values for a solution point. The difference with respect to GetLinkTransformsFromSolution is that here only the system variables are given.
Definition at line 1215 of file world.c. References CT_REPRESENTATION, Error(), GetLinkTransformsFromDOF(), GetLinkTransformsFromSolution(), GetParameter(), Tworld::kinCS, Tworld::m, RegenerateMechanismSolution(), RegenerateOriginalPoint(), RegenerateWorldSolutionPoint(), REP_JOINTS, Tworld::stage, and WORLD_DEFINED. Referenced by BioWordGetAtomPositionsFromConformation(), WorldPrintAtoms(), and WorldStoreRigidGroups().
Determines the mechanisms configuration from the transforms giving the global position of all links. This is basically the inverse function of GetLinkTransformsFromSolutionPoint.
Definition at line 1261 of file world.c. References CT_REPRESENTATION, GetCSNumSystemVariables(), GetMechanismDOFsFromTransforms(), GetParameter(), Tworld::kinCS, Tworld::m, Tworld::ndof, NEW, REP_JOINTS, Tworld::systemVars, and WorldDOF2Sol(). Referenced by BioWordConformationFromAtomPositions(), and InitWorldFromMolecule().
Deletes the transforms computed by GetLinkTransformsFromDOF or by GetLinkTransformsFromSolution.
Definition at line 1336 of file world.c. References DeleteLinkConf(), HTransformDelete(), and Tworld::nl. Referenced by BioWordGetAtomPositionsFromConformation(), MoveAndCheckCD(), MoveWorld(), MoveWorldDOF(), WorldDOF2Sol(), WorldPrintAtoms(), WorldSample2DOF(), and WorldStoreRigidGroups().
Initializes an empty world. The expected way to initialize worlds is using the InitWorldFromFile function. If you decide to do it yourself (i.e., using InitWorld and then adding links, joints, obstacles, etc) the function GenerateWorldEquations when all the information is already added to the world. Once this function is called no more information (links, joints, etc) can be possibly added to the world.
Definition at line 1358 of file world.c. References Tworld::branch2Link, Tworld::checkCollisionsLL, Tworld::checkCollisionsLO, Tworld::e, Tworld::endEffector, InitEnvironment(), InitMechanism(), Tworld::m, Tworld::nb, Tworld::nj, Tworld::nl, Tworld::no, NO_UINT, Tworld::np, Tworld::nsvars, Tworld::nvars, Tworld::stage, Tworld::systemVars, Tworld::wcd, and WORLD_IN_DEFINITION. Referenced by InitWorldFromMolecule(), and main(). Adds a link to the mechanism in the world.
Definition at line 1383 of file world.c. References AddLink2Mechanism(), Tworld::checkCollisionsLL, Tworld::checkCollisionsLO, Tworld::endEffector, Error(), FALSE, GetLinkName(), GetWorldLinkID(), LinkNBodies(), Tworld::m, MEM_EXPAND, Tworld::nb, NEW, Tworld::nl, Tworld::no, NO_UINT, Tworld::np, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by AddLeg2World(), InitWorldFromMolecule(), and main(). Adds a joint to the mechanism in the world.
Definition at line 1436 of file world.c. References AddJoint2Mechanism(), Error(), Tworld::m, Tworld::nj, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by AddLeg2World(), InitWorldFromMolecule(), and main().
Adds the links and joints defining a composite spherical-sphercial joint to the world. Such joint is composed by two spherical joints connected by a cylindrical strut. This rotation of the cylinder about its axis is not relevant. Thus, this composite joint is useful to avoid representing irrelevant degrees of freedom (i.e., to obtain simpler equation systems).
Definition at line 1446 of file world.c. References Add2Color(), AddBody2Link(), AddJoint2World(), AddLink2World(), BAR, CABLE, CopyColor(), DECOR_SHAPE, DeleteColor(), DeleteJoint(), DeleteLink(), DeletePolyhedron(), Error(), FALSE, GetWorldLink(), GetWorldNJoints(), HIDDEN_SHAPE, INF, InitAxisXLink(), InitDeformXLink(), InitPrismaticXLink(), Intersection(), IntervalCenter(), IntervalSize(), LEG, LINEAR_FORCE, LowerLimit(), NEW, NewCylinder(), NewInterval(), NewRevLowJoint(), NewRevUpJoint(), NewSphere(), NewSphSphLowJoint(), NewSphSphUpJoint(), NewSpring(), NO_FORCE, PRISMATIC_BAR, PRISMATIC_LEG, SPRING, STRUT, UpperLimit(), VAR_FORCE, ZERO, and ZeroInterval().
Adds an obstacle to the environment in the world.
Definition at line 1788 of file world.c. References AddShape2Environment(), Tworld::checkCollisionsLO, Tworld::e, Error(), FALSE, MEM_EXPAND, NEW, Tworld::nl, Tworld::no, Tworld::np, Tworld::stage, and WORLD_IN_DEFINITION.
Returns the number of degrees of freedom of the mechanism in the world. This consideres the presenceo of loops constraining the mobility.
Definition at line 1822 of file world.c. References GetMechanismMobility(), and Tworld::m. Returns TRUE if the mechanisms in the world is composed by spheres only.
Definition at line 1827 of file world.c. References IsMechanismAllSpheres(), and Tworld::m. Referenced by main().
Gets the identifier of a link from its name (NO_UINT if there is no link with the given name).
Definition at line 1832 of file world.c. References GetLinkID(), and Tworld::m. Referenced by AddLink2World(), and main().
Gets the identifier of an obstacle from its name (NO_UINT if there is no obstacle with the given name).
Definition at line 1837 of file world.c. References Tworld::e, and GetObstacleID(). Gets a pointer to a link in the mechanism included in the world from its identifier (NULL if there is no link with the given identifier).
Definition at line 1842 of file world.c. References GetMechanismLink(), and Tworld::m. Referenced by AddLeg2World(), InitWorldFromMolecule(), main(), and WorldCoupleTensegrityVariable(). Gets a pointer to a joint in the mechanism included in the world from its identifier (NULL if there is no joint with the given identifier).
Definition at line 1847 of file world.c. References GetMechanismJoint(), and Tworld::m.
Gets the number of links in the mechanism included in the world.
Definition at line 1852 of file world.c. References Tworld::nl.
Gets the number of joints in the mechanism included in the world.
Definition at line 1857 of file world.c. References Tworld::nj. Referenced by AddLeg2World(), and main().
Gets the number of obstacles in the environment included in the world. Note that each obstacle is a convex polyhedron (see Tpolyhedron).
Definition at line 1862 of file world.c. References Tworld::no.
Each link can include more than one convex polyhedron. This function returns the sum of the number of convex polyhedrons defined over all links
Definition at line 1867 of file world.c. References Tworld::nb.
Each link can include more than one convex polyhedron. Moreover, the environment is also defined as a set of convex polyhedrons. This function returns the sum of the number of convex polyhedrons defined over all links and the environment.
Definition at line 1872 of file world.c. References Tworld::np.
Gets the number of degrees of freedom in the world. Each joint introduces one or more degrees of freedom. Note that this is different from GetWorldMobility. Here we return the sum of degrees of freedom of the joints.
Definition at line 1997 of file world.c. References Tworld::ndof. Referenced by main(). Returns the valid range for a given degree of freedom.
Definition at line 2002 of file world.c. References CopyInterval(), Tworld::dof2joint, Tworld::dof2link, Tworld::dof2param, Tworld::dof2range, Error(), GetJointRangeN(), GetLinkDOFRange(), GetMechanismJoint(), GetMechanismLink(), Tworld::m, Tworld::maxCoord, Tworld::ndof, and NO_UINT. Referenced by main().
Returns a label identifying eachjoint. This is used to generate interfaces. Right now we only return a valid label for the first degree of freedom of each joint and the label identifies the joint and not the particular degree of freedom. In all other cases the output is NULL. Note that, if different from NULL, the string is initialized inside this call but must be deallocated by the caller.
Definition at line 2024 of file world.c. References Tworld::dof2joint, Tworld::dof2range, Error(), GetJointName(), GetMechanismJoint(), and Tworld::m.
Returns a label identifying each degree of freedom. This is used to generate interfaces. This is a variant of GetWorldJointLabel but where all dof get an identifier. Note that, if different from NULL, the string is initialized inside this call but must be deallocated by the caller.
Definition at line 2036 of file world.c. References Tworld::dof2joint, Tworld::dof2link, Tworld::dof2param, Tworld::dof2range, Error(), GetJointDOF(), GetJointDOFName(), GetJointName(), GetLinkDOFLabel(), GetLinkName(), GetMechanismJoint(), GetMechanismLink(), Tworld::m, NEW, and NO_UINT. Checks if the system of equations derived from the world is polynomial.
Definition at line 2089 of file world.c. References Error(), IsCSPolynomial(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Activates all the possible collision betwen links and links and obstacles.
Definition at line 2097 of file world.c. References Tworld::checkCollisionsLO, CheckSelfCollisions(), DECOR_SHAPE, Tworld::e, Error(), GetObstacleShapeStatus(), IsGroundLink, Tworld::nl, Tworld::no, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by InitWorldFromMolecule().
Desactivates all the possible collision betwen links and links and obstacles.
Definition at line 2119 of file world.c. References Tworld::checkCollisionsLO, Error(), FALSE, Tworld::nl, Tworld::no, NoCheckSelfCollisions(), Tworld::stage, and WORLD_IN_DEFINITION. Referenced by main().
Activates all the possible collision betwen links.
Definition at line 2138 of file world.c. References Tworld::checkCollisionsLL, Error(), Tworld::nl, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by CheckAllCollisions().
Desactivates all the possible collision betwen links.
Definition at line 2153 of file world.c. References Tworld::checkCollisionsLL, Error(), FALSE, Tworld::nl, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by NoCheckAllCollisions().
Activates all the possible collision betwen a particular pair of links. Note that we don't have an interface to activate/desactivate the collision checking between links sub-parts. To this end you have to use the DECOR keyword in the sub-part definition (DECOR sub-parts are not used in collision checking).
Definition at line 2167 of file world.c. References Tworld::checkCollisionsLL, Error(), Tworld::stage, TRUE, and WORLD_IN_DEFINITION.
Desactivates all the possible collision betwen a particular pair of links.
Definition at line 2179 of file world.c. References Tworld::checkCollisionsLL, Error(), FALSE, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by NoCheckConnectedCollisions().
Activates the possible collision between a particular link and an object in the environment. Note that we don't have an interface to activate/desactivate the collision checking for a given link sub-part. To this end you have to use the DECOR keyword in the sub-part definition (DECOR sub-parts are not used in collision checking).
Definition at line 2191 of file world.c. References Tworld::checkCollisionsLO, Error(), IsGroundLink, Tworld::stage, TRUE, and WORLD_IN_DEFINITION. Referenced by CheckObstacleCollision().
Desactivates the possible collision between a particular link and an object in the environment.
Definition at line 2200 of file world.c. References Tworld::checkCollisionsLO, Error(), FALSE, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by NoCheckObstacleCollision().
Activates the possible collision with a given object.
Definition at line 2209 of file world.c. References CheckLinkObstacleCollision(), and Tworld::nl.
Deactivates the possible collision with a given object.
Definition at line 2217 of file world.c. References Tworld::nl, and NoCheckLinkObstacleCollision().
Desactivates the collision between links connected by a joint. Additionally, for NoRot links, deactivates the collision between links connected to the NoRot links.
Definition at line 2225 of file world.c. References GetLinkType(), GetMechanismJoint(), GetMechanismLink(), JointFromID(), JointToID(), LINK_NoRot, Tworld::m, Tworld::nj, Tworld::nl, and NoCheckLinkLinkCollision(). Determines if any collision is activated and must be avoided.
Definition at line 2294 of file world.c. References Tworld::checkCollisionsLL, Tworld::checkCollisionsLO, FALSE, LinkCanCollide(), Tworld::nl, and Tworld::no. Referenced by InitWorldCD(), on_cuikmove_save(), and PrintCollisions().
Stores the collision information into a file in the format valid to be read by InitWorldFromFile.
Definition at line 2306 of file world.c. References AnyCollision(), Tworld::checkCollisionsLL, Tworld::checkCollisionsLO, Tworld::e, GetLinkName(), GetMechanismLink(), GetObstacleName(), Tworld::m, Tworld::nl, and Tworld::no. Referenced by PrintWorld().
Generates a sample from a the kinematic cuiksystem in the world using the Newton algorithm. However,
Note that samples include values ONLY for the system variables (the kinematic subsystem has the same system variables than the global system). Thus, the boxe returned in the b_sol (and in the vector v) only include ranges (or values) for the system variables.
Definition at line 2335 of file world.c. References CuikNewton(), DeleteBox(), Error(), GetBoxInterval(), GetCSSystemVars(), InitBox(), Tworld::kinCS, NEW, PrintBox(), SetBoxInterval(), Tworld::stage, and WORLD_DEFINED. Gets the system vars of the cuiksystem in the form of an array of booleans, one for each variable where only entries corresponding to system variables are set to TRUE.
Definition at line 2383 of file world.c. References Error(), GetCSSystemVars(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), on_cuikmove_save(), and PlotForceField().
Determines the topology of a given variable.
Definition at line 2391 of file world.c. References GetCSVarTopology(), and Tworld::kinCS.
Identifies pose related variable that survied in the simplified system. Pose related variables are those giving the pose of a link (typically the system variables). Here we are interested in identifying those variables that survive in the simplified system. This is a hack to be able to generate eigengrasp. Note that since is eigengrasp oriented, we do not consider the last link in the system (i.e., the manipulated object) but only the hand links.
Definition at line 2396 of file world.c. References Error(), FALSE, GetCSNumVariables(), GetLinkPoseSimpVars(), GetMechanismLink(), Tworld::kinCS, Tworld::m, NEW, Tworld::nl, Tworld::stage, and WORLD_DEFINED. Referenced by main().
Returns an array with pointers to the variables names for the kinematic cuik system. This is used to print the variable names in the solution boxes.
Definition at line 2415 of file world.c. References Error(), GetCSVariableNames(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), and on_cuikmove_save().
Returns the name of a given system variable in the kinematic cuiksystem.
Definition at line 2423 of file world.c. References Error(), GetCSSystemVariableName(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main().
From the information stored in a .world file, we generate the environment and mechanisms structures. From this information we have to generate systems of equations necessary to solve the problem. This is the purpose of this function. Therefore, this function should be used after reading the .world file and before start to solve the problem.
Definition at line 2431 of file world.c. References AddEquationNoSimp(), AddMatrixEquation(), Tworld::branch2Link, COORD_EQ, CT_REPRESENTATION, DeleteEquation(), DeleteMEquation(), DeleteVariables(), Tworld::e, Error(), GenerateMEquationFromBranch(), GenerateTransEquationsFromBranch(), GetCSSystemVars(), GetCSVariables(), GetEnvironmentMaxCoordinate(), GetMechanismMaxCoordinate(), GetParameter(), InitEquations(), InitJacobian(), InitWorldCS(), InitWorldKinCS(), Tworld::kinCS, Tworld::m, Tworld::maxCoord, Tworld::nl, Tworld::nsvars, Tworld::nvars, Tworld::refEqs, Tworld::refEqsJ, REP_JOINTS, Tworld::stage, Tworld::systemVars, WORLD_DEFINED, WORLD_IN_DEFINITION, and WorldInitDOFInfo(). Referenced by GenerateWorldSingularityEquations(), and InitWorldFromMolecule().
Adds the force equilibirum equations to the system generated by GenerateWorldEquations. This only makes sense in tensegrity structures.
Definition at line 2510 of file world.c. References AddEquation2CS(), AddMonomial(), AddVariable2Monomial(), CT_PRETENSION, CT_REPRESENTATION, DeleteEquation(), DeleteMonomial(), EQU, Error(), GetForceOnLink(), GetLinkForceModel(), GetLinkForceVars(), GetMechanismJoint(), GetMechanismLink(), GetParameter(), InitEquation(), InitMonomial(), IsForceEquilibriumLink(), JointForceEquation(), Tworld::kinCS, Tworld::m, NFUN, Tworld::nj, Tworld::nl, NO_FORCE, REP_JOINTS, ResetMonomial(), SetEquationCmp(), SetEquationType(), SetEquationValue(), Tworld::stage, SYSTEM_EQ, WORLD_DEFINED, and ZERO.
Creates an array to identify the force variables in the problem. Only force variables, not all force related variables (i.e., rest length) are set.
Definition at line 2585 of file world.c. References CT_REPRESENTATION, Error(), FALSE, GetMechanismLink(), GetParameter(), Tworld::kinCS, Tworld::m, NEW, Tworld::nl, Tworld::nvars, SetForceVars(), Tworld::stage, Tworld::systemVars, and WORLD_DEFINED. Referenced by WorldForceVarsIndices().
Creates an array to identify kinematic variables (i.e., no force variables) in the simplified cuiksystem. This is useful, for instance, to compute path lenghts in the kinematic sub-space. If all variables are kinematic, the output array (kv) will be NULL.
Definition at line 2616 of file world.c. References CT_REPRESENTATION, Error(), FALSE, GetMechanismLink(), GetParameter(), Tworld::kinCS, Tworld::m, NEW, Tworld::nl, Tworld::nvars, SetForceRelatedVars(), SimplifyBooleanArray(), Tworld::stage, and WORLD_DEFINED. Referenced by main(), PathEffort(), and SmoothSamples().
Creates an array with the indices of the force variables. This can be seen as a variant of WorldForceVars where the output is in the form of a array of indices rather than of as an array of booleans.
Definition at line 2649 of file world.c. References Error(), GetWorldNumSystemVariables(), NEW, and WorldForceVars(). Referenced by main().
Computes the potential energy of a configuration. It only returns different from 0 for tensegrities. The potential energy is computed modeling the links as springs.
Definition at line 2680 of file world.c. References CT_REPRESENTATION, Error(), GetMechanismLink(), GetParameter(), Tworld::kinCS, LinkPotentialEnergy(), Tworld::m, Tworld::nl, RegenerateMechanismSolution(), RegenerateOriginalPoint(), RegenerateWorldSolutionPoint(), REP_JOINTS, Tworld::stage, and WORLD_DEFINED. Referenced by main().
Computes the gradient of the potential energy of a configuration. It only returns different from a null vector for tensegrities (it can also be null for some tensegrities, though). The potential energy is computed modeling the links as springs.
Definition at line 2722 of file world.c. References CT_REPRESENTATION, Error(), GenerateSimplifiedPoint(), GetMechanismLink(), GetParameter(), Tworld::kinCS, LinkForceField(), Tworld::m, NEWZ, Tworld::nl, Tworld::nvars, RegenerateMechanismSolution(), RegenerateOriginalPoint(), RegenerateWorldSolutionPoint(), REP_JOINTS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), PlotForceField(), StepEffort(), StepEffortGradient(), and WorldForceFieldProjectedGradient().
Computes the a projection of the gradient of the force field. Actually we copute
with H the Hessian matrix of the potential energy. This seems a rather particular function but we implement it since this is the only way in which we use the Hessian. Moreover, this form, we avoid forming the Hessian matrix (a large matrix). Each of the columns of the Hessian is the derivative of the force field w.r.t. one of the variables of the problem. It can be easily check that these derivatives are:
(This applies for all the l/r in the problem). When computing proj^T * H we obtain:
Which is exactly what is obtained from WorldForceField using proj as a parameter. This greatly simplifies the implementation of this projected gradient function.
Definition at line 2776 of file world.c. References WorldForceField(). Referenced by StepEffortGradient().
Generate equations to fix (some dimensions) of the translation of a some links. This is only used in tensegrity structures (in particular to avoid the tensegrity to be free-flying).
Definition at line 2783 of file world.c. References AddEquation2CS(), Tworld::branch2Link, CopyEquation(), CT_REPRESENTATION, DeleteEquation(), Error(), GenerateTransEquationsFromBranch(), GetEquationValue(), GetLinkTrans(), GetMechanismLink(), GetParameter(), INF, Tworld::kinCS, Tworld::m, Tworld::nl, REP_JOINTS, SetEquationValue(), Tworld::stage, SYSTEM_EQ, and WORLD_DEFINED.
Tensegrity addons are geometric objects that are attached to tensgrity nodes. This is a form of adding rich geometry to tensegrities, which otherwise are only composed by struts, cables, and springs. Each addons has to be fixed to three tensegrity nodes to fully determine its pose. In this way the 9 dof of the addon (3 translations and 3 rotations) are cancelled and the addon is effectively fixed to the tensegrity structure. Note that by attaching an addon to a tensegrity, the relative distances between the three points used to fix the addon are fixed
Definition at line 2819 of file world.c. References AddCt2Monomial(), AddEquation2CS(), AddMonomial(), AddVariable2Monomial(), ApplyLinkRot(), Tworld::branch2Link, DeleteEquation(), DeleteMonomial(), Error(), FALSE, GenerateTransEquationsFromBranch(), GetCSVariableID(), GetLinkName(), GetMechanismLink(), InitMonomial(), Tworld::kinCS, LINK_TRANS, Tworld::m, NEW, NFUN, NO_UINT, ResetMonomial(), and SYSTEM_EQ.
Generate equations to define a planar tensegrity, fixing the Z component of the director vectors of the links. This is only used in tensegrity structures.
Definition at line 2867 of file world.c. References CT_REPRESENTATION, Error(), FixLinkZToZero(), GetMechanismLink(), GetParameter(), Tworld::kinCS, Tworld::m, Tworld::nl, REP_JOINTS, Tworld::stage, and WORLD_DEFINED.
In tensegrities many times elements share a variable: they have the same length, stiffness, rest length, force or even orientation. This function fixes the variables and must be used AFTER defining such variables, i.e., after using GenerateWorldEquations.
Definition at line 2889 of file world.c. References AddCt2Monomial(), AddEquation2CS(), AddMonomial(), AddVariable2Monomial(), COUPLE_FORCE, COUPLE_LENGTH, COUPLE_ORIENTATION, COUPLE_REST, CT_REPRESENTATION, DeleteEquation(), DeleteMonomial(), EQU, Error(), GetLinkForceModel(), GetLinkForceVars(), GetParameter(), GetWorldLink(), HTransformGetElement(), InitEquation(), InitMonomial(), IsVariableLengthLink(), Tworld::kinCS, LINEAR_FORCE, NFUN, NO_FORCE, REP_JOINTS, ResetMonomial(), SetEquationCmp(), SetEquationType(), SetEquationValue(), Tworld::stage, SYSTEM_EQ, and WORLD_DEFINED.
Extends the kinematic subsystem with variables/equations to deal with singularities. We re-defined the variables giving bounds for the joints so that introducing a singularity in the extreme of its range. Moreover, if requiered, we add equations giving the position of a link in the global frame. Note that this only part of the process to generate a system of equations to detect singularities. The equations to detect the loss of rank of the Jacobian are to be added later. They are not added here to allow the user to select the variables for which the singularities are to be detected. This is to be done with a separate utility.
Definition at line 3039 of file world.c. References AddCt2Monomial(), AddEquation2CS(), AddMonomial(), AddVariable2CS(), AddVariable2Monomial(), CARTESIAN_VAR, COORD_EQ, CopyCuikSystem(), CopyEquation(), CT_REPRESENTATION, DeleteEquation(), DeleteMonomial(), DeleteVariable(), Error(), GenerateJointRangeSingularityEquations(), GenerateWorldEquations(), GetEquation(), GetLinkName(), GetMechanismJoint(), GetMechanismLink(), GetMechanismLinkID(), GetParameter(), InitMonomial(), Tworld::kinCS, LINK_TRANS, Tworld::m, Tworld::maxCoord, NEW, NewInterval(), NewVariable(), NFUN, Tworld::nj, NO_UINT, Tworld::refEqs, REP_JOINTS, ResetMonomial(), SetEquationType(), SetVariableInterval(), Tworld::stage, and WORLD_DEFINED. Referenced by GenerateWorldTWSEquations(), and main().
Extends the kinematic subsystem with variables/equations to detect translational workspace boundaries. This is a composition of GenerateWorldSingularityEquations and AddJacobianEquations to detect a particular set of singularities.
Definition at line 3104 of file world.c. References AddSimplifiedJacobianEquations(), Error(), FALSE, GenerateWorldSingularityEquations(), GetCSNumVariables(), GetCSVariableID(), LINK_TRANS, NEW, NO_UINT, and TRUE. Referenced by main(). Returns the symbolic Jacobian for the kinematic equations on a given point The size of the Jacobian matrix is the number of equations of the kinematic system times the number of variables.
Definition at line 3137 of file world.c. References Error(), GetCSJacobian(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Returns the symbolic Jacobian for the simplified kinematic equations on a given point The size of the Jacobian matrix is the number of equations of the simplified kinematic system times the number of variables.
Definition at line 3145 of file world.c. References Error(), GetSimpCSJacobian(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), and PathEffort().
Gets the topology of the variables in simplified kinematic equations.
Definition at line 3153 of file world.c. References Error(), GetSimpCSTopology(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), and PathEffort().
Gets the topology of the variables in kinematic equations.
Definition at line 3162 of file world.c. References Error(), GetCSTopology(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Gets the topology of the degrees of freedom of the mechanism.
Definition at line 3171 of file world.c. References Tworld::dof2joint, Tworld::dof2range, GetJointRangeTopology(), GetMechanismJoint(), Tworld::m, Tworld::ndof, NEW, NO_UINT, and TOPOLOGY_R.
Tries to reach the kinematic manifold from a given point. This point in given in the simplified space (without un-used variables nor dummies).
Definition at line 3193 of file world.c. References CuikNewtonSimp(), and Tworld::kinCS.
Returns the matrix resulting from evaluating the Jacobian for the kinematic equations on a given point The size of the Jacobian matrix is the number of equations of the kinematic system times the number of variables.
Definition at line 3198 of file world.c. References Error(), EvaluateCSJacobian(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Evaluates the set of kinematic equations on a given point.
Definition at line 3206 of file world.c. References Error(), EvaluateCSEquations(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Checks if all the intequalities in the system hold for a given point.
Definition at line 3214 of file world.c. References Error(), InequalitiesHoldOnPoint(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Checks if all the intequalities in the system hold for a given point for the simplified system.
Definition at line 3222 of file world.c. References Error(), Tworld::kinCS, SimpInequalitiesHoldOnPoint(), Tworld::stage, and WORLD_DEFINED.
Determines the maximum error in the inequalites for the simplified system.
Definition at line 3230 of file world.c. References Error(), ErrorInSimpInequalitiesOnPoint(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Evaluates the simplified kinematic equations on a given point.
Definition at line 3238 of file world.c. References Error(), EvaluateSimpCSEquations(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Evaluates a subset of the simplified kinematic equations on a given point.
Definition at line 3246 of file world.c. References Error(), EvaluateSubSetSimpCSEquations(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Evaluates the kinematic equations on a point and returns the norm of the error.
Definition at line 3254 of file world.c. References Error(), ErrorInCSEquations(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by MoveWorld(), MoveWorldDOF(), and WorldErrorFromDOFs().
The same as WorldErrorInEquations but working on the simplified set of kinematic equations.
Definition at line 3262 of file world.c. References Error(), ErrorInSimpCSEquations(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Error in equation from the configuration given as degrees of freedom. If the internal representation is not DOF, the configuration is converted before computing the error.
Definition at line 3270 of file world.c. References WorldDOF2Sol(), and WorldErrorInEquations(). Referenced by on_cuikmove_save().
Evaluates the functions cost defined in a world in a given point. This is basically used by T-RRT (see also EvaluateCSCost).
Definition at line 3281 of file world.c. References Error(), EvaluateCSCost(), and WORLD_DEFINED.
Return the number of variables in the kinematic subsystem (as defined and without any simplification).
Definition at line 3289 of file world.c. References Error(), GetCSNumVariables(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Return the number of system variables in the kinematic subsystem (as defined and without any simplification).
Definition at line 3297 of file world.c. References Error(), GetCSNumSystemVariables(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by BioWorldConformationSize(), main(), and WorldForceVarsIndices().
Reconstruct a point in original kinematic system from a point in the simplified system.
Definition at line 3305 of file world.c. References CT_REPRESENTATION, Error(), GetParameter(), Tworld::kinCS, Tworld::m, RegenerateMechanismSolution(), RegenerateOriginalPoint(), REP_JOINTS, Tworld::stage, and WORLD_DEFINED. Referenced by RegenerateWorldOriginalSystemPoint().
Reconstruct a point in original kinematic system from a point in the simplified system. The difference with RegenerateWorldOriginalPoint is that here the output pointo only includes the system variables.
Definition at line 3334 of file world.c. References GetCSNumSystemVariables(), Tworld::kinCS, NEW, RegenerateWorldOriginalPoint(), and Tworld::systemVars. Referenced by main().
Reconstruct a point in the simplified kinematic system from a point in the original system.
Definition at line 3362 of file world.c. References Error(), GenerateSimplifiedPoint(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), and PathEffort().
Reconstruct a point in the simplified kinematic system from a point in the original system. The difference with respec to WorldGenerateSimplifiedPoint is that here 'o' only includes the system variables.
Definition at line 3370 of file world.c. References Error(), GenerateSimplifiedPoint(), Tworld::kinCS, RegenerateWorldSolutionPoint(), Tworld::stage, and WORLD_DEFINED. Gets the kinematic search space for a given problem. The search space is deduced from the ranges of the kinematic variables involved in the problem. This can be seen as a box from world constructor.
Definition at line 3388 of file world.c. References Error(), GenerateInitialBox(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
The same GetWorldInitialBox
Definition at line 3396 of file world.c. References Error(), GenerateSimpInitialBox(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), and PathEffort().
Computes the dimensionality of the solution manifold assuming that the given point is regular.
Definition at line 3404 of file world.c. References Error(), Tworld::kinCS, ManifoldDimension(), Tworld::stage, and WORLD_DEFINED. Referenced by main(), and PathEffort().
Reduces the system variables as much as possible taking into account only the system equations (i.e., using only the Tworld::kinCS).
Definition at line 3412 of file world.c. References EMPTY_BOX, Error(), GetBoxLevel(), GetBoxSize(), Tworld::kinCS, MaxReduction(), Tworld::stage, SYSTEM_VAR, Tworld::systemVars, and WORLD_DEFINED.
Adds a world (environment plus mechanism) in a 3D scene. Note that the the mechanism is not set in any valid configuration but all links are plotted with its local frame overlapped with the global one. To actually display the mechanism in a correct configuration you should use MoveWorld.
Definition at line 3452 of file world.c. References Close3dBlock(), Tworld::e, Error(), InitWorldCD(), Tworld::m, PlotEnvironment(), PlotMechanism(), Tworld::stage, Start3dBlock(), Tworld::wcd, and WORLD_DEFINED. Referenced by AnimateWorld(), and main().
Computes the non-system variable in a kinematic solution.
Definition at line 3468 of file world.c. References Error(), GetCSNumVariables(), Tworld::kinCS, Tworld::m, NEW, RegenerateMechanismSolution(), Tworld::stage, Tworld::systemVars, and WORLD_DEFINED. Referenced by GetLinkTransformsFromSolutionPoint(), main(), MoveWorld(), PathEffort(), PlotForceField(), PrintWorldAxes(), WorldForceField(), WorldGenerateSimplifiedPointFromSystem(), WorldPotentialEnergy(), and WorldSample2DOF().
Generates a file with the atom centers in global coordiantes. The global coordinates are those given by a solution point (parameter pt). This is used only when the world represents a molecule and we want to store the atom (i.e., the sphere) positions into a file. (world where the mechanisms is formed by spheres only are considered molecules). The atoms centers are latter used by cuikpdb2world that coordinates biological inforamation (pdb file) and a world. It is very important that the atoms in the world are given exactly in the same order as those in the pdb. This function assumes that the enviroment is empty (i.e., the world is fully defined by the links). NOTE: the file with the atom positions generated by this functions is only used to generate world from pdb files. This is somehow weird since to generate the atom files we already need a world file. We proceed in way since the generated world is "sync" with the pdb and then, the results fo cuikatlas, cuikatlascenters, ... can be incorporated to the pdb (to generate new pdb's that can be analyzed with any standard molecular analysis software).
Definition at line 3496 of file world.c. References DeleteLinkTransforms(), Tworld::e, FALSE, GetEnvironmentNObstacles(), GetLinkTransformsFromSolutionPoint(), Tworld::m, MechanismPrintAtoms(), and Warning(). Referenced by main().
Generates files where the atoms (centers and radius) are stored grouped in rigid clusters. These files are not used within the CuikSuite, but only when testing the RigidCLL. We basically use the CuikSuite machinery to easily generate testing files for the RigidCLL package. This function assumes that the enviroment is empty (i.e., the world is fully defined by the links). Moreover, for proper operation, all links must be composed by spheres (atoms).
Definition at line 3511 of file world.c. References DeleteLinkTransforms(), Tworld::e, FALSE, GetEnvironmentNObstacles(), GetLinkTransformsFromSolutionPoint(), Tworld::m, MechanismStoreRigidAtoms(), and Warning(). Referenced by main().
Jacobian of the atom position w.r.t. the variables. In this context we assume that all balls in the mechanism represent an atom. This is mainly used when manipulating worlds derived form biological information. This Jacobian is used to transform the gradient of the energy in atom coordinates to a gradient in internal coordinates. If the world is not only formed by spheres an error is triggered.
Definition at line 3526 of file world.c. References CT_REPRESENTATION, Error(), EvaluateJacobianXVectors(), GetLinkBody(), GetMechanismLink(), GetParameter(), GetPolyhedronCenter(), GetPolyhedronType(), IsMechanismAllSpheres(), LinkNBodies(), Tworld::m, NEW, Tworld::nl, Tworld::refEqsJ, REP_JOINTS, and SPHERE.
Moves the mechanisms defined in a world information to a given configuration. Note that the box should only include ranges for the system variables. Therefore, the box given as a parameter is a sub-box of the box associated with Tworld::kinCS.
Definition at line 3581 of file world.c. References CT_REPRESENTATION, DeleteLinkTransforms(), Error(), GetBoxCenter(), GetBoxNIntervals(), GetCSNumSystemVariables(), GetCSNumVariables(), GetLinkTransformsFromSolution(), GetParameter(), Tworld::kinCS, Tworld::m, MoveAndCheckCDFromTransforms(), MoveMechanismFromTransforms(), MoveWorldDOF(), NEW, RegenerateWorldSolutionPoint(), REP_JOINTS, Tworld::stage, TRUE, Warning(), WORLD_DEFINED, and WorldErrorInEquations(). Referenced by AnimateWorld(), and main().
Prints a point and the axis for each of the different joints in the mechanisms. This is latter used to generate the mechanism Jacobian. The values are all in global coordinates.
Definition at line 3637 of file world.c. References CT_REPRESENTATION, Error(), EvaluateEqualityEquations(), FALSE, GetBoxCenter(), GetBoxNIntervals(), GetMechanismJoint(), GetParameter(), Tworld::kinCS, Tworld::m, NEW, Tworld::nj, Tworld::nl, PrintJointAxes(), Tworld::refEqs, RegenerateWorldSolutionPoint(), REP_JOINTS, Tworld::stage, and WORLD_DEFINED. Referenced by main().
Prints information collected durint last collision check. See StoreCollisionInfo for more details. This function implicitly assumes that the last link is an abject being manipulated by the rest of links.
Definition at line 3674 of file world.c. References Tworld::endEffector, Tworld::m, StoreCollisionInfo(), and Tworld::wcd. Referenced by on_cuikmove_save().
Moves a mechanisms to a configuration given by values for the different degrees of freedom of the joints forming the mechanisms. This might be a configuration not fulfilling the whole set of equations (loop closures might be violated). This basically generates a configuration in our formulation from the degrees of freedom values and calls MoveWorld.
Definition at line 3680 of file world.c. References DeleteLinkTransforms(), Error(), GetLinkTransformsFromDOF(), Tworld::m, MoveAndCheckCDFromTransforms(), MoveMechanismFromTransforms(), Tworld::stage, TRUE, WORLD_DEFINED, WorldDOF2Sol(), and WorldErrorInEquations(). Referenced by main(), and MoveWorld().
Defines a configuration in cuik variables from a configuration given by degrees of freedom. There is no guarantee that the ouput box fulfill all equations (it is generated from a dof probably adjusted in open loop).
Definition at line 3708 of file world.c. References AXIS_H, CT_REPRESENTATION, DeleteLinkTransforms(), Tworld::dof2joint, Tworld::dof2range, Error(), GenerateJointSolution(), GenerateLinkSolution(), GetCSNumVariables(), GetCSVariableID(), GetJointRangeTopology(), GetLinkName(), GetLinkTransformsFromDOF(), GetMechanismJoint(), GetMechanismLink(), GetParameter(), HTransformGetElement(), INF, InitBoxFromPoint(), IsGroundLink, Tworld::joint2dof, JointFromID(), JointToID(), Tworld::kinCS, LINK_TRANS, Tworld::m, Tworld::ndof, NEW, Tworld::nj, Tworld::nl, NO_UINT, Tworld::openLink, PI2PI, REP_JOINTS, Tworld::stage, TOPOLOGY_S, and WORLD_DEFINED. Referenced by GetSolutionPointFromLinkTransforms(), main(), MoveWorldDOF(), on_cuikmove_save(), and WorldErrorFromDOFs().
Transform a configuration given in cuik variables to configuratoin given in degrees of freedom. In some sense this is the inverse of WorldDOF2Sol. Note the difference in what here the sample must include only system variables.
Definition at line 3800 of file world.c. References CT_REPRESENTATION, DeleteLinkTransforms(), Error(), GetLinkTransformsFromSolution(), GetMechanismDOFsFromTransforms(), GetParameter(), Tworld::m, Tworld::ndof, RegenerateWorldSolutionPoint(), REP_JOINTS, Tworld::stage, and WORLD_DEFINED. Referenced by main().
Produces an animation along a path. An animation is a 3d geometry that can be browsed with geomview. Note that the boxes in the list should only include ranges for the system variables. Therefore, the box given as a parameter is a sub-box of the box associated with Tworld::kinCS.
Definition at line 3837 of file world.c. References Advance(), Close3dBlock(), ClosePlot3d(), Delay3dObject(), EndOfList(), Error(), FALSE, FINAL_FRAME_DELAY, First(), FRAME_RATE, GetBoxNIntervals(), GetCSNumNonDummyVariables(), GetCurrent(), INITIAL_FRAME_DELAY, InitIterator(), InitPlot3d(), Tworld::kinCS, MoveWorld(), PlotWorld(), Tworld::stage, Start3dBlock(), TRUE, and WORLD_DEFINED. Referenced by main().
Generate a file with the cuiksystem generated from the world information.
Definition at line 3881 of file world.c. References CreateFileName(), CUIK_EXT, DeleteFileName(), Error(), GetFileFullName(), Tworld::kinCS, PrintCuikSystem(), Tworld::stage, and WORLD_DEFINED. Referenced by main().
Prints the world in a form that can be read by InitWorldFromFile. Parameters artc and arg can be used to add information in the world about how it was generated. Use 0 and NULL to add no information.
Definition at line 3902 of file world.c. References CreateFileName(), DeleteFileName(), Tworld::e, Error(), GetFileExtension(), GetFileFullName(), GetFileName(), GetFilePath(), Tworld::m, PrintCollisions(), PrintEnvironment(), PrintMechanism(), and WORLD_EXT. Referenced by main(), and PrintBioWorld().
Deletes the information stored in a world and frees the allocated memory.
Definition at line 3952 of file world.c. References DeleteEnvironment(), DeleteMechanism(), DeleteWorldCD(), DeleteWorldCollisionInfo(), DeleteWorldCS(), Tworld::e, Tworld::m, Tworld::stage, and WORLD_DEFINED. Referenced by DeleteBioWorld(), and main(). |
Follow us!