Skip to content

Commit 7c6e8a5

Browse files
committed
Merge branch 'develop' into feature/LineSensorAI
2 parents fbccdc7 + ae17010 commit 7c6e8a5

60 files changed

Lines changed: 6153 additions & 340 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.cspell.json‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"version": "0.2",
3+
"words": [
4+
"Allman",
5+
"cppcheck",
6+
"doxyfile",
7+
"graphviz",
8+
"libmicroros",
9+
"mattnotmitt",
10+
"mrad",
11+
"multirobot",
12+
"pacman",
13+
"teleop",
14+
"Ulzer",
15+
"wbsim",
16+
"webots",
17+
"Webots",
18+
"XRCE",
19+
"zumo",
20+
"Zumo"
21+
]
22+
}

‎.github/workflows/main.yml‎

Lines changed: 61 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,79 @@
11
name: main
22

3-
# Controls when the action will run.
3+
concurrency:
4+
group: ci-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
# Controls when this workflow runs.
48
on:
59
push:
10+
# Runs on every push.
611
branches: [ '**' ]
12+
713
release:
8-
# A release, pre-release, or draft of a release is published.
14+
# Runs when a release, pre-release, or draft of a release is published.
915
types: [ published ]
10-
# Allows you to run this workflow manually from the Actions tab.
16+
17+
# Can be run manually from the Actions tab.
1118
workflow_dispatch:
1219

1320
# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
1421
jobs:
15-
# The introduction just shows some useful informations.
22+
# Show some useful information.
1623
intro:
17-
# The type of runner that the job will run on.
1824
runs-on: ubuntu-24.04
19-
# Steps represent a sequence of tasks that will be executed as part of the job.
25+
2026
steps:
2127
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
2228
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}."
2329

24-
- name: Checkout repository
25-
uses: actions/checkout@v4
26-
27-
- name: Set up Python
28-
uses: actions/setup-python@v5
29-
with:
30-
python-version: '3.12.3'
31-
cache: 'pip'
32-
cache-dependency-path: .github/workflows/requirements.txt
33-
34-
- name: Install dependencies
35-
run: |
36-
pip install -r .github/workflows/requirements.txt
37-
38-
# Build all targets
30+
# Build all targets and perform static checks on them.
3931
build:
40-
# The type of runner that the job will run on.
4132
runs-on: ubuntu-24.04
4233
needs: intro
4334
strategy:
4435
matrix:
45-
environment: ["ConvoyLeaderTarget",
36+
environment: ["CommissioningTarget",
37+
"ConvoyLeaderTarget",
4638
"ConvoyFollowerTarget",
4739
"LineFollowerTarget",
4840
"RemoteControlTarget",
4941
"SensorFusionTarget",
5042
"TurtleTarget"]
5143

52-
# Steps represent a sequence of tasks that will be executed as part of the job.
5344
steps:
5445
- name: Checkout repository
5546
uses: actions/checkout@v4
5647

5748
- name: Set up Python
58-
uses: actions/setup-python@v5
49+
uses: actions/setup-python@v6
5950
with:
6051
python-version: '3.12.3'
6152
cache: 'pip'
6253
cache-dependency-path: .github/workflows/requirements.txt
63-
54+
6455
- name: Install dependencies
6556
run: |
6657
pip install -r .github/workflows/requirements.txt
67-
68-
- name: Compile ${{ matrix.environment }} firmware
69-
run: platformio run --environment ${{ matrix.environment }}
7058
59+
- name: Cache PlatformIO
60+
uses: actions/cache@v4
61+
with:
62+
path: |
63+
~/.platformio/.cache
64+
~/.platformio/packages
65+
~/.platformio/platforms
66+
key: ${{ runner.os }}-pio-${{ hashFiles('platformio*.ini') }}
67+
68+
# Run cppcheck and clang-tidy.
7169
- name: Perform static checks on ${{ matrix.environment }}
72-
run: platformio check --environment ${{ matrix.environment }} --fail-on-defect=medium --fail-on-defect=high
70+
run: platformio check --environment ${{ matrix.environment }} # --fail-on-defect=medium --fail-on-defect=high
7371

74-
# Perform static checks and test
72+
- name: Compile ${{ matrix.environment }} firmware
73+
run: platformio run --environment ${{ matrix.environment }}
74+
75+
# Perform static checks on test.
7576
check:
76-
# The type of runner that the job will run on.
7777
runs-on: ubuntu-24.04
7878
needs: intro
7979
strategy:
@@ -85,22 +85,31 @@ jobs:
8585
uses: actions/checkout@v4
8686

8787
- name: Set up Python
88-
uses: actions/setup-python@v5
88+
uses: actions/setup-python@v6
8989
with:
9090
python-version: '3.12.3'
9191
cache: 'pip'
9292
cache-dependency-path: .github/workflows/requirements.txt
93-
93+
9494
- name: Install dependencies
9595
run: |
9696
pip install -r .github/workflows/requirements.txt
9797
98+
- name: Cache PlatformIO
99+
uses: actions/cache@v4
100+
with:
101+
path: |
102+
~/.platformio/.cache
103+
~/.platformio/packages
104+
~/.platformio/platforms
105+
key: ${{ runner.os }}-pio-${{ hashFiles('platformio*.ini') }}
106+
107+
# Run cppcheck and clang-tidy.
98108
- name: Perform static checks on ${{ matrix.environment }}
99-
run: platformio check --environment ${{ matrix.environment }} --fail-on-defect=medium --fail-on-defect=high
109+
run: platformio check --environment ${{ matrix.environment }} # --fail-on-defect=medium --fail-on-defect=high
100110

101-
# Perform tests
111+
# Perform tests.
102112
test:
103-
# The type of runner that the job will run on.
104113
runs-on: ubuntu-24.04
105114
needs: intro
106115

@@ -109,27 +118,36 @@ jobs:
109118
uses: actions/checkout@v4
110119

111120
- name: Set up Python
112-
uses: actions/setup-python@v5
121+
uses: actions/setup-python@v6
113122
with:
114123
python-version: '3.12.3'
115124
cache: 'pip'
116125
cache-dependency-path: .github/workflows/requirements.txt
117-
126+
118127
- name: Install dependencies
119128
run: |
120129
pip install -r .github/workflows/requirements.txt
121130
131+
- name: Cache PlatformIO
132+
uses: actions/cache@v4
133+
with:
134+
path: |
135+
~/.platformio/.cache
136+
~/.platformio/packages
137+
~/.platformio/platforms
138+
key: ${{ runner.os }}-pio-${{ hashFiles('platformio*.ini') }}
139+
122140
- name: Run tests on native environment
123141
run: platformio test --environment Test -vvv
124142

125-
# Build documentation
143+
# Build documentation.
126144
doc:
127-
# The type of runner that the job will run on.
128145
runs-on: ubuntu-24.04
129146
needs: intro
130147
strategy:
131148
matrix:
132-
environment: ["ConvoyLeaderTarget",
149+
environment: ["CommissioningTarget",
150+
"ConvoyLeaderTarget",
133151
"ConvoyFollowerTarget",
134152
"ConvoyLeaderSim",
135153
"ConvoyFollowerSim",
@@ -157,4 +175,4 @@ jobs:
157175

158176
- name: Print doxygen warnings
159177
if: ${{ failure() }}
160-
run: cat ./doc/doxygen/doxygen_warnings.txt
178+
run: cat ./doc/doxygen/doxygen_warnings.txt

‎DroidControlShip.code-workspace‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
}
66
],
77
"settings": {
8-
"editor.formatOnSave": true
8+
"editor.formatOnSave": true,
9+
"conventionalCommits.scopes": [
10+
"Logging"
11+
]
912
}
10-
}
13+
}

‎README.md‎

Lines changed: 55 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@ It provides different kind of exclusive applications, used for educational purpo
1414
- Remote Control - Receives commands and motor speeds from an external source through MQTT.
1515
- APPTurtle - A [ROS2](https://docs.ros.org/en/jazzy/index.html) Robot controller that uses Twist messages like the ROS2 TurtleSim demo.
1616
- Line follower - Follows a track by a black line until the start/end line is passed twice.
17+
- Commissioning - Exercises the board peripherals in an observable way for hardware bring-up and validation.
1718

1819
## Table of content <!-- omit in toc -->
1920

2021
- [The ZumoComSystem Shield](#the-zumocomsystem-shield)
2122
- [The simulation](#the-simulation)
22-
- [Installation for simulation](#installation-for-simulation)
23+
- [Installation for simulation](#installation-for-simulation)
2324
- [How to start?](#how-to-start)
25+
- [Run](#run)
26+
- [Run with Webots launcher (recommended)](#run-with-webots-launcher-recommended)
27+
- [Run without Webots launcher](#run-without-webots-launcher)
28+
- [Run via terminal](#run-via-terminal)
2429
- [The target](#the-target)
2530
- [Installation for target](#installation-for-target)
2631
- [Build and flash procedure](#build-and-flash-procedure)
@@ -48,7 +53,7 @@ The simulation is based on the open source robot simulator *Webots*. The applica
4853

4954
![simulation-deployment](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/DroidControlShip/main/doc/architecture/uml/PhysicalView/SimulationDeployment.plantuml)
5055

51-
## Installation for simulation
56+
### Installation for simulation
5257

5358
1. Install the native compiler toolchain:
5459
- Linux
@@ -64,7 +69,7 @@ The simulation is based on the open source robot simulator *Webots*. The applica
6469

6570
### How to start?
6671

67-
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.
72+
After you built the application, you will find it 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.
6873

6974
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).
7075

@@ -78,6 +83,42 @@ MQTT Broker --> Webots World --> RadonUlzer --> DroidControlShip
7883

7984
In order to simplify this process, the [Launcher](https://github.com/gabryelreyes/Launcher) project is under active development.
8085

86+
### Run
87+
88+
There are 3 ways how to run now the application. Choose according to your needs.
89+
90+
#### Run with Webots launcher (recommended)
91+
92+
The Webots launcher is recommended to connect to the simulation.
93+
94+
It is mandatory if the simulation contains more than one robot. The robot is identified by its name. Adapt the robot name in the [platformio_override.ini](./platformio_override.ini), see *webots_robot_name*.
95+
96+
The Webots documentation has more details about [Single Simulation and Multiple Local Extern Robot Controllers](https://cyberbotics.com/doc/guide/running-extern-robot-controllers?tab-os=windows#single-simulation-and-multiple-local-extern-robot-controllers).
97+
98+
It is mandatory too if the simulation does not run locally (e.g. Webots runs on windows host and RadonUlzer in WSL).
99+
Set the IP address and the port in [platformio_override.ini](./platformio_override.ini), see *webots_ip_address* and *webots_protocol*.
100+
101+
Use *ipc* as *webots_protocol* for local connections and *tcp* for remote connections.
102+
103+
| Key | Description |
104+
| ------------------- | ------------------------------------------------------------------------------------------------ |
105+
| webots\_ip\_address | The IP address of the Webots simulation, which is used for TCP communication. |
106+
| webots\_protocol | \[ipc\|tcp\] - ipc is faster but only works on the same machine, tcp works also over network. |
107+
| webots\_robot\_name | The robot name used to identify the robot in the Webots world. See Webots world robot prototype. |
108+
109+
PlatformIO project tasks --> &lt;APP-NAME&gt; --> Custom --> Launch
110+
111+
#### Run without Webots launcher
112+
113+
This can be chosen in case the simulation waits just for one robot.
114+
115+
PlatformIO project tasks --> &lt;APP-NAME&gt; --> General --> Upload
116+
117+
#### Run via terminal
118+
119+
1. Open a command line (shell) and change to the folder with the built executable in ```.pio/build/<APPLICATION-NAME>```. This folder contains all necessary shared libraries as well.
120+
2. Start the ```program[.exe]``` executable.
121+
81122
## The target
82123

83124
The main target of the firmware is the [ZumoComSystem](https://github.com/NewTec-GmbH/ZumoComSystem) from NewTec GmbH, which is a shield for the [Pololu 32U4 Zumo](https://www.pololu.com/product/2510) robot.
@@ -88,7 +129,7 @@ Together with [Radon Ulzer](https://github.com/BlueAndi/RadonUlzer) it can be ru
88129

89130
### Installation for target
90131

91-
1. Make sure that the hardware version of your [ZumoComSystem](https://github.com/NewTec-GmbH/ZumoComSystem) is supported. Currently, only v1.1 and v1.2 are supported.
132+
1. Make sure that the hardware version of your [ZumoComSystem](https://github.com/NewTec-GmbH/ZumoComSystem) is supported. Currently, v1 (v1.1 and v1.2), v2 and [v3](https://github.com/NewTec-GmbH/ZumoComSystemHW) are supported. Select the hardware version in the ```[target:esp32]``` section of ```platformio.ini```.
92133
2. Install the [drivers](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads) for the CP2102 USB-UART converter if required. The "CP210x Universal Windows Driver" is recommended, as it enables the automatic bootloader mode.
93134

94135
### Build and flash procedure
@@ -104,15 +145,16 @@ In a similar way, not providing a WiFi configuration will force the target into
104145

105146
## The Applications
106147

107-
| Application | Standalone | Zumo32U4 Robot Required | RadonUlzer Application | MQTT Broker Required |
108-
| - | - | - | - | - |
109-
| ConvoyLeader | No | Yes | ConvoyLeader | Yes |
110-
| ConvoyFollower | No | Yes | RemoteControl | Yes |
111-
| LineFollower | No | Yes | RemoteControl | No |
112-
| RemoteControl | No | Yes | RemoteControl | Yes |
113-
| SensorFusion | No | Yes | SensorFusion | Yes |
114-
| Test | Yes | No | N/A | No |
115-
| Turtle | No | Yes | RemoteControl | Yes (ROS2 + Micro-ROS Agent) |
148+
| Application | Standalone | Zumo32U4 Robot Required | RadonUlzer Application | MQTT Broker Required |
149+
| -------------- | ---------- | ----------------------- | ---------------------- | ---------------------------- |
150+
| Commissioning | Yes | No | N/A | No |
151+
| ConvoyLeader | No | Yes | ConvoyLeader | Yes |
152+
| ConvoyFollower | No | Yes | RemoteControl | Yes |
153+
| LineFollower | No | Yes | RemoteControl | No |
154+
| RemoteControl | No | Yes | RemoteControl | Yes |
155+
| SensorFusion | No | Yes | SensorFusion | Yes |
156+
| Test | Yes | No | N/A | No |
157+
| Turtle | No | Yes | RemoteControl | Yes (ROS2 + Micro-ROS Agent) |
116158

117159
## Documentation
118160

0 commit comments

Comments
 (0)