Robotics Tools

The software and math behind building robots: architecture, ROS 2, simulation, kinematics, odometry, control, perception, localization and navigation, and safe hardware, with worked examples.

A robot is hardware plus software that senses, decides and acts. Building one means choosing tools for each layer: low-level motor control on a microcontroller, a framework that connects the pieces, simulation to test safely, and libraries for perception, planning and control. This guide covers the open-source tools most used by researchers, hobbyists and companies (ROS 2, Gazebo, OpenCV, Nav2, MoveIt) and the core math every robot programmer meets: coordinate frames, kinematics, odometry, control loops, filtering and path planning. Every worked number is computed, and the examples are small enough to check by hand. For industrial arms from ABB, FANUC, KUKA and Yaskawa and their cells, see Industrial Robotics.

Start here: what do you need?

I need to…Go to
decide what runs where, or how to structure a robot programRobot Software Architecture
get nodes talking, record data or fix a ROS 2 connection problemROS 2 in Practice
test in simulation, build a URDF or choose a simulatorSimulation and Digital Twins
work out where a tool is, convert frames, or solve arm kinematicsFrames, Transforms and Arm Kinematics
drive a wheeled robot and keep track of where it isMobile Robot Kinematics and Odometry
tune a motor loop or plan a smooth moveMotor Control, PID and Trajectories
choose and use cameras, lidar or an IMUPerception: Cameras, Lidar and IMUs
localize, build a map or plan a pathLocalization, Mapping and Navigation
wire, power, protect, test and debug a real robotBuilding, Testing and Safety

A suggested order

If you are new to robotics, read Robot Software Architecture and ROS 2 in Practice first, then the page for your kind of robot: Mobile Robot Kinematics and Odometry for wheels, Frames, Transforms and Arm Kinematics for arms. Motor Control, PID and Trajectories and Building, Testing and Safety apply to every robot.

  1. Robot Software Architecture: The layers of robot software, sense-plan-act, what runs on a microcontroller and what on a computer, and how to budget compute and timing.
  2. ROS 2 in Practice: Nodes, topics, services and actions, quality of service, launch files, parameters, tf2 and bags, with data rates and latency worked out.
  3. Simulation and Digital Twins: Gazebo, Webots, CoppeliaSim, Isaac Sim and MuJoCo compared; URDF models, physics step size and stability, and closing the sim-to-real gap.
  4. Frames, Transforms and Arm Kinematics: Rotation matrices and homogeneous transforms, quaternions and Euler angles, forward and inverse kinematics of a two-link arm, Jacobians and singularities.
  5. Mobile Robot Kinematics and Odometry: Differential, Ackermann and mecanum drives, odometry from encoders, how it drifts, calibration and fusing a gyroscope.
  6. Motor Control, PID and Trajectories: Cascade loops, feedforward, PID tuning, trapezoidal and S-curve profiles, and the limits set by sampling, delay and saturation.
  7. Perception: Cameras, Lidar and IMUs: The pinhole camera model, stereo depth and its error, lidar, IMUs, calibration, fiducial markers and data volumes.
  8. Localization, Mapping and Navigation: Kalman and particle filters, SLAM, occupancy grids, A* planning and the Nav2 stack, with a filter and a planner worked through.
  9. Building, Testing and Safety: Power and wiring, motor drivers, emergency stops, safety standards, logging and replay, deployment and a troubleshooting table.

The robot loop

Quick reference: formulas

TopicFormulaPage
Differential drivev = (vr + vl) ÷ 2; ω = (vr − vl) ÷ L; R = v ÷ ωMobile Robot Kinematics and Odometry
Odometry updatex += Δs cos(θ + Δθ/2); y += Δs sin(θ + Δθ/2); θ += ΔθMobile Robot Kinematics and Odometry
2D rotationx′ = x cos θ − y sin θ; y′ = x sin θ + y cos θFrames, Transforms and Arm Kinematics
Two-link armcos θ2 = (x² + y² − L1² − L2²) ÷ (2 L1 L2)Frames, Transforms and Arm Kinematics
PIDu = Kp e + Ki ∫e dt + Kd de/dtMotor Control, PID and Trajectories
Trapezoid movetacc = v ÷ a; dacc = v² ÷ 2aMotor Control, PID and Trajectories
Pinhole camerah = f H ÷ Z; stereo Z = f B ÷ dPerception: Cameras, Lidar and IMUs
Kalman gainK = P ÷ (P + R); x += K (z − x)Localization, Mapping and Navigation

Related guides and tools

Safety

  • A robot can hurt people and itself. Test on blocks with the wheels off the ground, at low speed, with a person at the emergency stop.
  • A hard-wired emergency stop that cuts motor power without software is the only real safety function; a “stop” topic is not.
  • Batteries store a lot of energy: use protection boards, correct chargers and fuses close to the cell.
  • Industrial arms and collaborative robots are covered by ISO 10218 and ISO/TS 15066; a hobby stack is not a safety system (see Building, Testing and Safety).

FAQ

Do I need ROS to build a robot?

No. A small robot can run on one microcontroller. ROS 2 earns its place when you have several sensors, a computer, and want ready-made navigation, perception and tools. See Robot Software Architecture.

Which simulator should I use?

Gazebo for ROS-centered mobile robots and arms, Webots for an easy start, CoppeliaSim for arms and grippers, MuJoCo or Isaac Sim for learning-based control. See Simulation and Digital Twins.

Why does my robot drift off course?

Wheel diameters, track width and slip: a 0.5 % wheel error turns a straight 2 m run into a curve. See Mobile Robot Kinematics and Odometry.

Where did the old Robotics Tools sections go?

All of them are here with much more depth: ROS 2, simulation, differential-drive odometry, PID tuning, perception and hardware each have their own page.

References

  • Siciliano, B. and Khatib, O. (eds.), Springer Handbook of Robotics; Siegwart, R., Nourbakhsh, I. and Scaramuzza, D., Introduction to Autonomous Mobile Robots.
  • Craig, J. J., Introduction to Robotics: Mechanics and Control; Thrun, S., Burgard, W. and Fox, D., Probabilistic Robotics.
  • ROS 2 documentation (docs.ros.org), REP 103 and REP 105 (units and frames), Nav2 and MoveIt 2 documentation.

Last reviewed: October 2026. ROS 2 distributions and package names change each year: check the current documentation for your release.