Skip to content

Latest commit

 

History

History
136 lines (93 loc) · 9.25 KB

README.md

File metadata and controls

136 lines (93 loc) · 9.25 KB

Droid Control Ship - Firmware for ZumoComSystem

License Repo Status Release Build Status

The Droid Control Ship is the firmware running on the ZumoComSystem hardware, which is a shield for the Pololu 32U4 Zumo robot.

It provides different kind of exclusive applications, used for educational purposes:

  • Convoy Leader Robot - Based on odometry information, it leads the followers to follow like a lemming trail.
  • Convoy Follower Robot - It follows the leader by mainly reacting on the received information.
  • Remote Control - Receives commands and motor speeds from an external source through MQTT.

Table of content

The ZumoComSystem Shield

RobotWithZumoComSystem

It supports running in the Webots simulation too.

The Droid Control Ship communicates with the Radon Ulzer, which is the firmware running on the Pololu Zumo32U4 robot.

The simulation

The simulation is based on the open source robot simulator Webots. The application and the services are equal to the target firmware. Only the HAL is different in the simulation.

simulation-deployment

Installation

  1. Install the native compiler toolchain:
    • Linux
      • Install the gcc toolchain, depended on your distribution.
    • Windows
      • Install the MSYS2 toolchain.
      • Open MSYS2 shell.
        • Update package database: pacman -Sy pacman
        • Install GCC: pacman -Sy mingw-w64-ucrt-x86_64-gcc
        • Install Mosquitto: pacman -Sy mingw-w64-ucrt-x86_64-mosquitto
        • Install OpenSSL: pacman -S mingw-w64-ucrt-x86_64-openssl

How to start?

After you built the application, you will find in in .pio/build/<APPLICATION-NAME>/program.exe. It provides several command line arguments to configure certain features. Use -h or --help to get a short user friendly overview about them.

The applications are using a configuration file in JSON format to retrieve certain settings. In the very first run, such a configuration file will be automatically be created. If there exists already one, it will be loaded without modifications (regardless of any other program arguments).

The DroidControlShip will always try to connect to the RadonUlzer, therefore its important to have the RadonUlzer executable started first! And because the RadonUlzer executable will always connect to the Webots simulation, it shall run as well having a corresponding world loaded.

Some applications require to have an MQTT server running, but it may depend on the kind of application you choose.

A complete deployment, including MQTT server, would be started in the following way:

MQTT Broker --> Webots World --> RadonUlzer --> DroidControlShip

In order to simplify this process, the Launcher project is under active development.

The target

The main target of the firmware is the ZumoComSystem from NewTec GmbH, which is a shield for the Pololu 32U4 Zumo robot.

Together with Radon Ulzer it can be run in the Webots simulation too.

target-deployment

Installation

  1. Make sure that the hardware version of your ZumoComSystem is supported. Currently, only v1.1 and v1.2 are supported.
  2. Install the drivers for the CP2102 USB-UART converter if required. The "CP210x Universal Windows Driver" is recommended, as it enables the automatic bootloader mode.

Build and flash procedure

  1. Build the firmware using the Build task in the "PlatformIO Project Tasks"
    • For the target use only the applications with "Target" as postfix, e.g. LineFollowerTarget.
  2. Upload the firmware to the ZumoComSystem using the Upload task in the "PlatformIO Project Tasks" tab, or the arrow on the bottom task bar.
  3. After succesfully uploading the firmware, the configuration has to be uploaded to the filesystem. Make sure that the information in data/config/config.json matches your setup. Upload the configuration using the Upload Filesystem Image task in the "PlatformIO Project Tasks" tab.

Note that the robotName can be left empty in case you want the MAC address of the hardware to be used as the name. In case you prefer to give the robot a more descriptive name, can set the name. Beware, if you use multiple robots, you will have to give each a different name manually.

In a similar way, not providing a WiFi configuration will force the target into going into Access Point Mode. In a future update it will be possible to update the WiFi credentials using this mode and an on-board web server.

The Applications

Application Standalone Zumo32U4 Robot Required RadonUlzer Application MQTT Broker Required
ConvoyLeader No Yes ConvoyLeader Yes
ConvoyFollower No Yes RemoteControl Yes
RemoteControl No Yes RemoteControl Yes
SensorFusion No Yes SensorFusion Yes
Test Yes No N/A No

Documentation

Used Libraries

Library Description License
Arduino ESP32 Arduino framework Apache-2.0
Arduino client for MQTT This library provides a client for doing simple publish/subscribe messaging with a server that supports MQTT. MIT
ArduinoJson JSON handling MIT
SerialMuxProt Multiplexing Communication Protocol MIT
USB_Host_Shield_2.0 Maxim USB-Host IC driver. Using fork of the original library that solves issue with endpoints. GPLv2

Issues, Ideas And Bugs

If you have further ideas or you found some bugs, great! Create a issue or if you are able and willing to fix it by yourself, clone the repository and create a pull request.

License

The whole source code is published under the MIT license. Consider the different licenses of the used third party libraries too!

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.