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 program | Robot Software Architecture |
| get nodes talking, record data or fix a ROS 2 connection problem | ROS 2 in Practice |
| test in simulation, build a URDF or choose a simulator | Simulation and Digital Twins |
| work out where a tool is, convert frames, or solve arm kinematics | Frames, Transforms and Arm Kinematics |
| drive a wheeled robot and keep track of where it is | Mobile Robot Kinematics and Odometry |
| tune a motor loop or plan a smooth move | Motor Control, PID and Trajectories |
| choose and use cameras, lidar or an IMU | Perception: Cameras, Lidar and IMUs |
| localize, build a map or plan a path | Localization, Mapping and Navigation |
| wire, power, protect, test and debug a real robot | Building, 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.
- 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.
- 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.
- 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.
- 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.
- Mobile Robot Kinematics and Odometry: Differential, Ackermann and mecanum drives, odometry from encoders, how it drifts, calibration and fusing a gyroscope.
- Motor Control, PID and Trajectories: Cascade loops, feedforward, PID tuning, trapezoidal and S-curve profiles, and the limits set by sampling, delay and saturation.
- Perception: Cameras, Lidar and IMUs: The pinhole camera model, stereo depth and its error, lidar, IMUs, calibration, fiducial markers and data volumes.
- 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.
- Building, Testing and Safety: Power and wiring, motor drivers, emergency stops, safety standards, logging and replay, deployment and a troubleshooting table.
The robot loop
- Sense: encoders, an IMU, cameras and lidar turn the world into numbers (Perception: Cameras, Lidar and IMUs).
- Estimate: filters combine noisy sensors into a position and a map (Localization, Mapping and Navigation, Mobile Robot Kinematics and Odometry).
- Decide: a planner finds a path or a motion, a behavior tree chooses what to do (Localization, Mapping and Navigation).
- Act: controllers turn the plan into motor commands (Motor Control, PID and Trajectories, Frames, Transforms and Arm Kinematics).
- Stay safe: limits, watchdogs and a hard-wired stop sit under everything (Building, Testing and Safety).
Quick reference: formulas
| Topic | Formula | Page |
|---|---|---|
| Differential drive | v = (vr + vl) ÷ 2; ω = (vr − vl) ÷ L; R = v ÷ ω | Mobile Robot Kinematics and Odometry |
| Odometry update | x += Δs cos(θ + Δθ/2); y += Δs sin(θ + Δθ/2); θ += Δθ | Mobile Robot Kinematics and Odometry |
| 2D rotation | x′ = x cos θ − y sin θ; y′ = x sin θ + y cos θ | Frames, Transforms and Arm Kinematics |
| Two-link arm | cos θ2 = (x² + y² − L1² − L2²) ÷ (2 L1 L2) | Frames, Transforms and Arm Kinematics |
| PID | u = Kp e + Ki ∫e dt + Kd de/dt | Motor Control, PID and Trajectories |
| Trapezoid move | tacc = v ÷ a; dacc = v² ÷ 2a | Motor Control, PID and Trajectories |
| Pinhole camera | h = f H ÷ Z; stereo Z = f B ÷ d | Perception: Cameras, Lidar and IMUs |
| Kalman gain | K = P ÷ (P + R); x += K (z − x) | Localization, Mapping and Navigation |
Related guides and tools
- Industrial Robotics: arms, cells, tooling and safety in factories.
- Motion Control and Actuators: motors, drives, encoders and servo tuning.
- Sensors and Field Devices: encoders, proximity and force sensors.
- Embedded Systems: the microcontroller firmware under a robot.
- Programming Languages: Python, C++, numerical methods, filters and PID code.
- Machine Learning: learned perception and control.
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.
