cuikurdf2world.cpp File Reference Detailed Description![]() Main body of the cuikurdf2world application. This application reads URDFs (universal robot description files) and generates a world file from them. In this way we can take advantage of all the URDF defined by the ROS community. Note that to keed the number of dependencies low, we do not use the ROS utilities to parse the URDF files but we directly pase them using a XML parsing tool (the tinyxml2 library). This means that future modifications/extensions on the URDF format might not be captured by this tool (altough it can be easily adapted). Only the links and joints in the URDFs are considered (no dynamical parameters, etc). This is coded in cpp to use the tinyxml library.
Definition in file cuikurdf2world.cpp.
Function Documentation
Angles in the URDF are typically given with low precision. This function tries to correct these angles (basically set the angle to PI when the given angle is very close to PI and similar corrections).
Definition at line 77 of file cuikurdf2world.cpp. References M_PI, M_PI_2, and PI2PI. Referenced by main().
Finds the first element with a particular label in the list of child nodes. We loop over the children of the node searching for an element with the given label.
Definition at line 131 of file cuikurdf2world.cpp. Referenced by main().
Continues the search started with FindFirstElement or with a previous call to FindNextElement.
Definition at line 150 of file cuikurdf2world.cpp. Referenced by main().
Main body of the cuikurdf2world application. Use:
where
The .urdf extension is optional.
Definition at line 190 of file cuikurdf2world.cpp. References AddBody2Link(), AddJoint2World(), AddLink2World(), correctAngle(), CreateFileName(), DECOR_SHAPE, DefineNormalVector(), DeleteFileName(), DeleteInterval(), DeleteJoint(), DeleteLink(), DeletePolyhedron(), DeleteWorld(), Error(), FALSE, FindFirstElement(), FindNextElement(), GetFileFullName(), GetWorldLink(), GetWorldLinkID(), GetWorldNJoints(), HIDDEN_SHAPE, HTransformApply(), HTransformIdentity(), HTransformProduct(), HTransformSetElement(), HTransformTxyz(), HTransformYawPitchRoll(), INF, InitLink(), InitPolyhedronFromFile(), InitWorld(), NEW, NewBox(), NewColor(), NewCylinder(), NewFixJoint(), NewFreeJoint(), NewInterval(), NewPrismaticJoint(), NewRevoluteJoint(), NewSphere(), NO_UINT, NoCheckAllCollisions(), PrintWorld(), REP_JOINTS, TransformPolyhedron(), TRUE, and URDF_EXT. |
Follow us!