Simple Arm - 4-DOF serial manipulator

simple_arm RViz animation simple_arm kinematic tree in terminal

Kinematic chain

base_link (box)
  └─ base_shoulder_joint  [revolute Z]
       shoulder_link (cylinder)
         └─ shoulder_upper_arm_joint  [revolute Y]
              upper_arm_link (cylinder)
                └─ upper_arm_forearm_joint  [revolute Y]
                     forearm_link (cylinder)
                       └─ forearm_ee_joint  [fixed]
                            end_effector_link (sphere)

What this example demonstrates

  • Origin.above(geometry) - lifts each link so its bottom face sits at z = 0, avoiding manual offset arithmetic

  • Inertial.from_geometry() - auto-dispatches to the correct inertia formula (box, cylinder, or sphere) from the geometry object alone

  • JointLimit and JointDynamics on every revolute joint

  • robot.save() writing both .urdf and .xacro by inferring the format from the file extension

Running the example

python3 examples/simple_arm.py

Output files are written to examples/simple_arm/:

File

Description

simple_arm.urdf

URDF robot description

simple_arm.xacro

Xacro equivalent

simple_arm_tree.txt

Plain-text kinematic tree

Quick visualisation: copy simple_arm.urdf into the online URDF viewer for instant validation and 3D preview without any local ROS install.

Source

examples/simple_arm.py