world.h File Reference Detailed Description
Macro Definition Documentation
When generating 3d animations, delay before starting the animation (in seconds). Definition at line 39 of file world.h. Referenced by AnimateWorld().
When generating 3d animations, frames per second. Definition at line 45 of file world.h. Referenced by AnimateWorld().
When generating 3d animations, delay between the end of the animation and the exit of the animation browser (in seconds). Definition at line 53 of file world.h. Referenced by AnimateWorld().
The world is in the stage of adding new elements (links, joints, obstacles,...). Definition at line 61 of file world.h. Referenced by AddJoint2World(), AddLink2World(), AddObstacle2World(), CheckAllCollisions(), CheckLinkLinkCollision(), CheckLinkObstacleCollision(), CheckSelfCollisions(), GenerateWorldEquations(), InitWorld(), NoCheckAllCollisions(), NoCheckLinkLinkCollision(), NoCheckLinkObstacleCollision(), and NoCheckSelfCollisions().
The world is concluded and we can analyze it (define the equations, etc). Definition at line 67 of file world.h. Referenced by AnimateWorld(), DeleteWorld(), EvaluateWorldCost(), EvaluateWorldJacobian(), GenerateWorldEquations(), GenerateWorldSingularityEquations(), GetLinkTransformsFromSolutionPoint(), GetWorldInitialBox(), GetWorldJacobian(), GetWorldNumSystemVariables(), GetWorldNumVariables(), GetWorldSimpInitialBox(), GetWorldSimpJacobian(), GetWorldSimpTopology(), GetWorldSimpVariableMask(), GetWorldSystemVars(), GetWorldVarNames(), InitWorldCD(), IsWorldPolynomial(), MaxWorldReduction(), MoveWorld(), MoveWorldDOF(), NewtonInWorld(), PlotWorld(), PrintWorldAxes(), PrintWorldCS(), RegenerateWorldOriginalPoint(), RegenerateWorldSolutionPoint(), WorldDOF2Sol(), WorldErrorInEquations(), WorldErrorInSimpEquations(), WorldErrorInSimpInequalities(), WorldEvaluateEquations(), WorldEvaluateSimpEquations(), WorldEvaluateSubSetSimpEquations(), WorldGenerateSimplifiedPoint(), WorldInequalitiesHold(), WorldInitDOFInfo(), WorldSample2DOF(), and WorldSimpInequalitiesHold(). Function Documentation
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 1308 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().
Initializes an world from the information stored in a .world file. This is the intended way to initialize worlds. See the comments in InitWorld. We don't have documentation yet about how to define world files. Please, have a look to the examples directory.
Referenced by InitCSWDFromFile(), and main(). Adds a link to the mechanism in the world.
Definition at line 1333 of file world.c. References AddLink2Mechanism(), Tworld::checkCollisionsLL, Tworld::checkCollisionsLO, Tworld::endEffector, Error(), FALSE, LinkNBodies(), Tworld::m, MEM_EXPAND, Tworld::nb, NEW, Tworld::nl, Tworld::no, Tworld::np, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by InitWorldFromMolecule(), and main(). Adds a joint to the mechanism in the world.
Definition at line 1383 of file world.c. References AddJoint2Mechanism(), Error(), Tworld::m, Tworld::nj, Tworld::stage, and WORLD_IN_DEFINITION. Referenced by InitWorldFromMolecule(), and main().
Adds an obstacle to the environment in the world.
Definition at line 1393 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 1427 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 1432 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 1437 of file world.c. References GetLinkID(), and Tworld::m. Referenced by main().
Gets the identifier of an obstacle from its name (NO_UINT if there is no obstacle with the given name).
Definition at line 1442 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 1447 of file world.c. References GetMechanismLink(), and Tworld::m. Referenced by InitWorldFromMolecule(), and main(). 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 1452 of file world.c. References GetMechanismJoint(), and Tworld::m.
Gets the number of links in the mechanism included in the world.
Definition at line 1457 of file world.c. References Tworld::nl.
Gets the number of joints in the mechanism included in the world.
Definition at line 1462 of file world.c. References Tworld::nj. Referenced by 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 1467 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 1472 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 1477 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 1559 of file world.c. References Tworld::ndof. Referenced by main(). Returns the valid range for a given degree of freedom.
Definition at line 1564 of file world.c. References Tworld::dof2joint, Tworld::dof2range, Error(), GetJointRangeN(), GetMechanismJoint(), Tworld::m, Tworld::maxCoord, and Tworld::ndof. 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 1575 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 1585 of file world.c. References Tworld::dof2joint, Tworld::dof2range, Error(), GetJointDOF(), GetJointName(), GetMechanismJoint(), Tworld::m, and NEW. Checks if the system of equations derived from the world is polynomial.
Definition at line 1607 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 1615 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 1637 of file world.c. References Tworld::checkCollisionsLO, Error(), FALSE, Tworld::nl, Tworld::no, NoCheckSelfCollisions(), Tworld::stage, and WORLD_IN_DEFINITION. Referenced by main(). Determines if any collision is activated and must be avoided.
Definition at line 1721 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 1733 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().
Activates all the possible collision betwen links.
Definition at line 1656 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 1671 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 1685 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 1694 of file world.c. References Tworld::checkCollisionsLL, Error(), FALSE, Tworld::stage, and WORLD_IN_DEFINITION.
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 1703 of file world.c. References Tworld::checkCollisionsLO, Error(), IsGroundLink, Tworld::stage, TRUE, and WORLD_IN_DEFINITION.
Desactivates the possible collision between a particular link and an object in the environment.
Definition at line 1712 of file world.c. References Tworld::checkCollisionsLO, Error(), FALSE, Tworld::stage, and WORLD_IN_DEFINITION.
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 1013 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 1046 of file world.c. References Tworld::wcd.
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 1165 of file world.c. References CT_REPRESENTATION, Error(), GetCSNumVariables(), GetLinkTransformsFromDOF(), GetLinkTransformsFromSolution(), GetParameter(), Tworld::kinCS, Tworld::m, NEW, RegenerateMechanismSolution(), RegenerateOriginalPoint(), REP_JOINTS, Tworld::stage, Tworld::systemVars, 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 1215 of file world.c. References CT_REPRESENTATION, DeleteBox(), 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 1290 of file world.c. References HTransformDelete(), and Tworld::nl. Referenced by BioWordGetAtomPositionsFromConformation(), MoveAndCheckCD(), MoveWorld(), MoveWorldDOF(), WorldDOF2Sol(), WorldPrintAtoms(), WorldSample2DOF(), and WorldStoreRigidGroups(). 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 1051 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 1060 of file world.c. References CheckCollision(), FALSE, Tworld::nwcd, 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 1076 of file world.c. References C_FCL, DeleteLinkTransforms(), FALSE, GetCDEngine(), GetLinkTransformsFromSolution(), MoveAndCheckCDFromTransforms(), and Tworld::wcd. Referenced by main().
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 1762 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 1810 of file world.c. References Error(), GetCSSystemVars(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), and on_cuikmove_save().
Determines the topology of a given variable.
Definition at line 1818 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 1823 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 so that
Definition at line 1842 of file world.c. References Error(), GetCSVariableNames(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by main(), and on_cuikmove_save().
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 1850 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().
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 1929 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 1994 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 2027 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 2035 of file world.c. References Error(), GetSimpCSJacobian(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
Gets the topology of the variables in simplified kinematic equations.
Definition at line 2043 of file world.c. References Error(), GetSimpCSTopology(), 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 kinematic system times the number of variables of the simplified system.
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 2052 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 2057 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 2065 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 2073 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 2081 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 2089 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 2097 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 2105 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 2113 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 2121 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 2129 of file world.c. References DeleteBox(), 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 2142 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 2150 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 2158 of file world.c. References Error(), GetCSNumSystemVariables(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED. Referenced by BioWorldConformationSize(), and main().
Reconstruct a point in original kinematic system from a point in the simplified system.
Definition at line 2166 of file world.c. References CT_REPRESENTATION, Error(), GetCSNumVariables(), GetParameter(), Tworld::kinCS, Tworld::m, NEW, RegenerateMechanismSolution(), RegenerateOriginalPoint(), REP_JOINTS, Tworld::stage, and WORLD_DEFINED.
Reconstruct a point in the simplified kinematic system from a point in the original system.
Definition at line 2196 of file world.c. References Error(), GenerateSimplifiedPoint(), Tworld::kinCS, 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 2204 of file world.c. References Error(), GenerateInitialBox(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
The same GetWorldInitialBox
Definition at line 2212 of file world.c. References Error(), GenerateSimpInitialBox(), Tworld::kinCS, Tworld::stage, and WORLD_DEFINED.
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 2220 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 2260 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 2276 of file world.c. References Error(), GetCSNumVariables(), Tworld::kinCS, Tworld::m, NEW, RegenerateMechanismSolution(), Tworld::stage, Tworld::systemVars, and WORLD_DEFINED. Referenced by main().
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 2304 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 2318 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 2332 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 2387 of file world.c. References CT_REPRESENTATION, DeleteLinkTransforms(), Error(), GetBoxCenter(), GetBoxInterval(), GetBoxNIntervals(), GetCSNumSystemVariables(), GetCSNumVariables(), GetLinkTransformsFromSolution(), GetParameter(), IntervalCenter(), Tworld::kinCS, Tworld::m, MoveAndCheckCDFromTransforms(), MoveMechanismFromTransforms(), MoveWorldDOF(), NEW, RegenerateMechanismSolution(), REP_JOINTS, Tworld::stage, Tworld::systemVars, 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 2455 of file world.c. References CT_REPRESENTATION, Error(), EvaluateEqualityEquations(), FALSE, GetBoxInterval(), GetCSNumVariables(), GetMechanismJoint(), GetParameter(), IntervalCenter(), Tworld::kinCS, Tworld::m, NEW, Tworld::nj, Tworld::nl, PrintJointAxes(), Tworld::refEqs, RegenerateMechanismSolution(), REP_JOINTS, Tworld::stage, Tworld::systemVars, 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 2508 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 2514 of file world.c. References DeleteBox(), DeleteLinkTransforms(), Error(), GetLinkTransformsFromDOF(), Tworld::m, MoveAndCheckCDFromTransforms(), MoveMechanismFromTransforms(), PrintCollisionInfo(), Tworld::stage, TRUE, Tworld::wcd, 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 2543 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 2625 of file world.c. References CT_REPRESENTATION, DeleteLinkTransforms(), Error(), GetCSNumVariables(), GetLinkTransformsFromSolution(), GetMechanismDOFsFromTransforms(), GetParameter(), Tworld::kinCS, Tworld::m, Tworld::ndof, NEW, RegenerateMechanismSolution(), REP_JOINTS, Tworld::stage, Tworld::systemVars, 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 2677 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 2721 of file world.c. References CreateFileName(), CUIK_EXT, DeleteFileName(), Error(), GetFileFullName(), GetFileName(), GetFilePath(), 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 2742 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 2792 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!