上QQ阅读APP看书,第一时间看更新
ROS packages for robot modeling
ROS provides some good packages that can be used to build 3D robot models.
In this section, we will discuss some of the important ROS packages that are commonly used to build and model a robot:
- urdf: The most important ROS package to model the robot is the urdf package. This package contains a C++ parser for the Unified Robot Description Format (URDF), which is an XML file representing a robot model. Other different components make up urdf:
- urdf_parser_plugin: This package implements methods to fill URDF data structures
- urdfdom_headers: This component provides core data structure headers to use the urdf parser
- collada_parser: This package populates data structures by parsing a Collada file
- urdfdom: This component populates data structures by parsing URDF files
- collada-dom: This is a stand-alone component to convert Collada documents with 3D computer graphics software such as Maya, Blender, and Soft image
We can define a robot model, sensors, and a working environment using URDF, and we can parse it using URDF parsers. We can only describe a robot in URDF that has a tree-like structure in its links, that is, the robot will have rigid links and will be connected using joints. Flexible links can't be represented using URDF. The URDF is composed using special XML tags, and we can parse these XML tags using parser programs for further processing. We can work on URDF modeling in the upcoming sections:
- joint_state_publisher: This tool is very useful when designing robot models using URDF. This package contains a node called joint_state_publisher, which reads the robot model description, finds all joints, and publishes joint values to all nonfixed joints using GUI sliders. The user can interact with each robot joint using this tool and can visualize using RViz. While designing URDF, the user can verify the rotation and translation of each joint using this tool. We will talk more about the joint_state_publisher node and its usage in the upcoming section.
- kdl_parser: Kinematic and Dynamics Library (KDL) is an ROS package that contains parser tools to build a KDL tree from the URDF representation. The kinematic tree can be used to publish the joint states and also to forward and inverse the kinematics of the robot.
- robot_state_publisher: This package reads the current robot joint states and publishes the 3D poses of each robot link using the kinematics tree build from the URDF. The 3D pose of the robot is published as the tf (transform) ROS. The tf ROS publishes the relationship between the coordinates frames of a robot.
- xacro: Xacro stands for (XML Macros), and we can define how xacro is equal to URDF plus add-ons. It contains some add-ons to make URDF shorter and readable, and can be used for building complex robot descriptions. We can convert xacro to URDF at any time using ROS tools. We will learn more about xacro and its usage in the upcoming sections.