Skip to content

Welcome to DiffBot Documentation

This project guides you on how to build an autonomous two wheel differential drive robot. image The robot is equipped with a Raspberry Pi 4 B running ROS Noetic middleware on Ubuntu Mate 20.04. With a motor driver and two actuators it can drive autonomously to a desired location while sensing its environment using sensors, such as a camera and an ultrasonic ranger to avoid obstacles. Speed sensors combined with an inertial measurement unit (IMU) are used for localization. The project is split into multiple parts, to adress the following main aspects of the robot.

  • Part list and the theory behind the parts.
  • Assembly of the robot platform and the components.
  • Raspberry Pi 4 B setup using ROS Noetic, which will be the brain of the robot.
  • Modeling the Robot in Blender and URDF to simulate it in Gazebo.
  • ROS packages and nodes:
  • Hardware drivers to interact with the hardware components
  • High level nodes for perception, navigation, localization and control.

Use the menu on the left to learn more about the ROS packages and other components of the robot.


Using a Jetson Nano instead of a Raspberry Pi is also possible.

Source Code

The source code for this project can be found in this GitHub repository.

Best Practices and REP

The project tries to follow the ROS best practices as good as possible. This includes examples and patterns on producing and contributing high quality code, as well as on testing, and other quality oriented practices, like continuous integration. You can read more about it on the ROS Quality wiki. This includes also following the advices given in the ROS Enhancement Proposals (REPs). Throughout the documentation links to corresponding REPs are given.

The wiki section ROS developer's guide is a good starting point for getting used to the common practices for developing components to be shared with the community. It includes links to naming conventions (e.g. for packages) and ROS C++ and Python style guides.

Other good resources to learn more about ROS best practices is the Autonomous Systems Lab of ETH Zurich.


Your contributions to the code or documentation are most welcome but please try to follow the mentioned best pratices where possible.

Testing, Debugging and CI

For a ROS catkin workspace explaining gTest and rostest see Ros-Test-Example and its documentation. To run tests with catkin-tools, see Building and running tests.

To get a workspace that allows a debugger to stop at breakpoints, it is required to build the catkin workspace with Debug Symbols. For this the command catkin build --save-config --cmake-args -DCMAKE_BUILD_TYPE=Debug is used, mentioned in the catkin-tools cheat sheet.

This repository makes use of automated builds when new code is pushed or a pull reuqest is made to this repository. For this the Travis and GitHub actions configurations (yml files) from ROS Industrial CI are used.


The documentation is using material design theme, which is based on MkDocs. Future code documentation will make use of doxygen and rosdoc_lite.


Helpful resources to bring your own robots into ROS are: