URDF and Humanoid Modeling
Humanoid Robotics Fundamentals
Humanoid robotics focuses on the unique challenges of building and controlling bipedal, human-form robots capable of operating in human-centric environments.
Kinematics and Dynamics
These are the mathematical foundations for understanding how a robot moves and maintains stability.
- Forward Kinematics: Calculating the position and orientation of the end-effector (e.g., the hand) given the angles of all the joints.
- Inverse Kinematics (IK): Calculating the required joint angles to place the end-effector at a desired spatial location. Essential for arm control and grasping.
- Balance Control: The system that ensures the robot does not fall over while moving or performing tasks.
Bipedal Locomotion
Walking is one of the most challenging problems in robotics, requiring constant dynamic control.
- Gait Cycles: The repetitive sequence of leg and joint movements required for stable walking.
- CoM (Center of Mass) Control: The robot must continuously adjust the location of its Center of Mass to stay balanced.
- ZMP (Zero Moment Point): The point on the ground around which the robot can pivot without falling. Stable locomotion requires keeping the ZMP within the support polygon.
Manipulation
The ability to interact with the world through hands and arms.
- Arm Control: Executing the IK solution smoothly and under torque limits.
- Grasping: The strategy for firmly and safely picking up an object, dependent on object properties (size, weight, fragility).
- Hand Design: Understanding the trade-offs between simple grippers (robust) and multi-fingered hands (dexterous).
Human-Robot Interaction (HRI)
As robots enter human spaces, safety and clear communication become paramount.
- Safety: Implementing immediate stop mechanisms and compliant control to prevent injury during contact.
- Gestures: Using the robot's body language (head, arms) to signal intent or confirm understanding.
- Communication: Effective exchange of information, including responding to commands, confirming task completion, and reporting failures.
The URDF Specification
The Unified Robot Description Format (URDF) is an XML specification that defines a robot's physical structure: its links (rigid bodies), joints (connections between links), and their geometric and inertial properties.
<?xml version="1.0"?>
<robot name="simple_humanoid">
<link name="torso">
<visual>
<geometry>
<box size="0.3 0.2 0.5"/>
</geometry>
</visual>
<inertial>
<mass value="10.0"/>
<inertia ixx="0.1" iyy="0.1" izz="0.1"
ixy="0" ixz="0" iyz="0"/>
</inertial>
</link>
<link name="right_upper_arm">
<visual>
<geometry>
<cylinder radius="0.04" length="0.3"/>
</geometry>
</visual>
</link>
<joint name="right_shoulder" type="revolute">
<parent link="torso"/>
<child link="right_upper_arm"/>
<origin xyz="0.15 0 0.2" rpy="0 0 0"/>
<axis xyz="0 1 0"/>
<limit lower="-1.57" upper="1.57" effort="10" velocity="1.0"/>
</joint>
</robot>
Key elements:
- Links: rigid bodies with visual geometry, collision geometry, and inertial properties
- Joints: connections between links with type (revolute, prismatic, fixed), axis, and limits
- Origin: spatial relationship between parent and child links
Visualizing the Robot
# Install URDF visualization tools
sudo apt install ros-humble-urdf-tutorial
# Launch the robot state publisher and RViz
ros2 launch urdf_tutorial display.launch.py model:=simple_humanoid.urdf
RViz renders the URDF as an interactive 3D model. You can move joint sliders to see how the humanoid articulates.