Software Development

This set of tutorials will delve deeper into software architecture on Leo Rover, explain how different elements work together and how can they be developed further.

Software structure

The base Leo Rover software can be divided into 3 main elements:

  • The firmware This is the program that runs directly on the processor of CORE2 board. It provides different functionalities to the Raspberry Pi through serial bus. The main features of the default leo_firmware are:

    • Differential drive controller (cmd_vel interface)

    • wheel states monitoring (joint_states interface)

    • servo control

    • battery voltage monitoring

    • wheel odometry calculation

    • IMU, GPS support

  • ROS nodes When the Raspberry Pi boots, a set of ROS nodes is started. These nodes allow different features to be accessed via ROS topics and services. They are defined in leo_bringup package and mainly consist of:

    • rosserial node - communicates with the firmware via serial interface and makes its features available via ROS topics and services

    • Rosbridge server - creates WebSocket that provides a JSON API to ROS functionality for non-ROS programs.

    • Raspicam node - publishes images from Raspberry Pi camera module to ROS image transport topic

    • Web video server - provides a video stream of a ROS image transport topic that can be accessed via HTTP

    • Leo system node - provides system shutdown and reboot via ROS topics.

  • Web User Interface This is the user interface that can be accessed via a web browser. It communicates with Rosbridge server using roslibjs to access functionalities that are available in ROS topics. The default leo_ui brings features such as:

    • control of the Rover via a keyboard or a virtual joystick

    • control of servo positions

    • display of a camera stream from Web video server

    • output of current battery voltage measurement

    • reboot and shutdown buttons