Skip to content

Commit

Permalink
Merge pull request #126 from BlueAndi/main
Browse files Browse the repository at this point in the history
Synchronize with main branch
  • Loading branch information
BlueAndi authored Jun 27, 2024
2 parents c3f6f3f + 9275c99 commit b5428f1
Show file tree
Hide file tree
Showing 68 changed files with 3,633 additions and 1,447 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
uses: ts-graphviz/setup-graphviz@v2

- name: Set up doxygen and generate documentation for ${{ matrix.environment }}
uses: mattnotmitt/[email protected].5
uses: mattnotmitt/[email protected].8
with:
working-directory: './doc/doxygen'
doxyfile-path: './${{ matrix.environment }}Doxyfile'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
.vscode/extensions.json
lib/Webots
*.wbproj
webots/worlds/*.jpg
doc/doxygen/*/*
__pycache__
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Example for the **LineFollowerTarget** application:
| ConvoyFollower | Convoy follower, providing information to the [DroidControlShip](https://github.com/BlueAndi/DroidControlShip) to drive to its target. | No | Yes | ./webots/worlds/zumo_with_com_system/PlatoonTrack.wbt |
| LineFollower | Just a line follower, using a PID controller. | Yes | No | ./webots/worlds/ETrack.wbt ./webots/worlds/LargeTrack.wbt ./webots/worlds/LineFollowerTrack.wbt |
| RemoteControl | The robot is remote controlled by e.g. the [DroidControlShip](https://github.com/BlueAndi/DroidControlShip) in a convoy follower role. | No | Yes | ./webots/world/zumo_with_com_system/* |
| SensorFusion | The robot provides odometry and inertial data to the [DroidControlShip](https://github.com/BlueAndi/DroidControlShip), which calculates the sensor fusion based location information. | No | Yes | ./webots/worlds/zumo_with_com_system/SensorFusionTrack.wbt |
| SensorFusion | The robot provides odometry and inertial data to the [DroidControlShip](https://github.com/BlueAndi/DroidControlShip), which calculates the sensor fusion based location information. | No | Yes | ./webots/worlds/zumo_with_com_system/LineFollowerTrack.wbt |
| Test | Only for testing purposes on native environment. | Yes | No | N/A |

# Documentation
Expand Down
31 changes: 5 additions & 26 deletions doc/architecture/SENSORFUSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
* [General](#general)
* [SerialMuxProt Channels](#serialmuxprot-channels)
* [Tx channel "SENSOR\_DATA"](#tx-channel-sensor_data)
* [Tx channel "END\_LINE"](#tx-channel-end_line)
* [SW Architecture](#sw-architecture)
* [Logical View](#logical-view)
* [Application](#application)
* [HAL](#hal)
* [Process View](#process-view)
* [Abbreviations](#abbreviations)
* [Issues, Ideas And Bugs](#issues-ideas-and-bugs)
Expand All @@ -30,40 +27,22 @@ This channel is used to send raw sensor data used for Sensor Fusion on the ZumoC

* The datatypes can be found in SerialMuxChannel.h.
* Order:
* Acceleration in X (raw sensor value in digits)
* Acceleration in Y (raw sensor value in digits)
* Turnrate around Z (raw sensor value in digits)
* Magnetometer value in X (raw sensor value in digits)
* Magnetometer value in Y (raw sensor value in digits)
* Angle calculated by Odometry (in mrad)
* Position in X calculated by Odometry (in mm)
* Position in Y calculated by Odometry (in mm)
* Orientation calculated by Odometry (in mrad)
* Acceleration in X (raw sensor value in digits)
* Turnrate around Z (raw sensor value in digits)
* Time passed since the last sensor value (in ms)
* Endianess: Big endian

### Tx channel "END_LINE"
This channel is used to send a flag to signal that a new End Line has been detected. This is used for testing purposes.
The only content that is sent is a boolean variable with the value true.

# SW Architecture
The following part contains the specific details of the SensorFusion application.

## Logical View

### Application
The application uses the same [States](https://github.com/BlueAndi/RadonUlzer/blob/main/doc/architecture/LINEFOLLOWER.md) as the Line Follower Application.

### HAL
Some changes have been made to the HAL compared to the HAL of the other Applications.
ButtonB, ButtonC, LedYellow, LedRed, the Display and the ProximitySensors have been removed in the App specific HAL.
The Buzzer Component can not be removed since it is used inside the Service Layer. Instead, the Buzzer is replaced with a Dummy Buzzer without any Functionality.
![HALSensorFusion](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/RadonUlzer/main/doc/architecture/uml/LogicalView/SensorFusion/HAL_SensorFusion.puml)

An IMU has been added:
![HALIMU](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/RadonUlzer/main/doc/architecture/uml/LogicalView/SensorFusion/HAL_IMU.puml)
The States are similar to the [Linefollower Application](https://github.com/BlueAndi/RadonUlzer/blob/main/doc/architecture/LINEFOLLOWER.md)

## Process View
Compared to the System States of the [Linefollower Application](https://github.com/BlueAndi/RadonUlzer/blob/main/doc/architecture/LINEFOLLOWER.md), the only change that has been made is that the detection of an end line does not trigger a change of state from DrivingState to ReadyState. This is done for testing purposes.
![processView](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/RadonUlzer/main/doc/architecture/uml/ProcessView/SensorFusion/SystemStates.puml)

# Abbreviations
Expand All @@ -82,4 +61,4 @@ 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.
additional terms or conditions.
30 changes: 12 additions & 18 deletions doc/architecture/uml/ProcessView/SensorFusion/SystemStates.puml
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
@startuml
@startuml SensorFusionSystemStates

title System States

state StartupState: /entry Initialize HAL.
state StartupState: /entry Show operator info on LCD.
state StartupState: /do Wait for pushbutton A is triggered.
state StartupState: /entry Try to load Max. Motor Speed from Settings.

state MotorSpeedCalibrationState: /entry Show operator info on LCD.
state MotorSpeedCalibrationState: /do Perform calibration.

state LineSensorsCalibrationState: /entry Show operator info on LCD.
state LineSensorsCalibrationState: /do Perform calibration.

state ErrorState: /entry Show error info on LCD.
state ErrorState: /do Wait for pushbutton A is triggered.
state ErrorState: /do Wait for pushbutton A to be triggered.

state ReadyState: /entry Show operator info on LCD.
state ReadyState: /do Wait for pushbutton A is triggered.
state ReadyState: /do Wait for pushbutton A to be triggered.

state ReleaseTrackState: /entry Choose parameter set 1
state ReleaseTrackState: /entry Show parameter set on LCD.
state ReleaseTrackState: /entry Choose parameter set 0
state ReleaseTrackState: /entry Start release timer.
state ReleaseTrackState: /do If pushbutton A is triggered, choose next parameter set and update LCD.
state ReleaseTrackState: /do If pushbutton A is triggered, restart release timer.
state ReleaseTrackState: /do If pushbutton A to be triggered, choose next parameter set.
state ReleaseTrackState: /do If pushbutton A to be triggered, restart release timer.
state ReleaseTrackState: /exit Stop release timer.

state DrivingState: /entry Start observation timer.
state DrivingState: /do Perform driving.
state DrivingState: /do Read out Odometry unit and IMU.
state DrivingState: /do Send Odometry values and IMU values via SerialMuxProt.
state DrivingState: /exit Stop observation timer.

[*] --> StartupState: Power up
StartupState --> MotorSpeedCalibrationState: [Pushbutton A triggered]
MotorSpeedCalibrationState --> LineSensorsCalibrationState: [Calibration finished]
StartupState --> LineSensorsCalibrationState: [Max. Motor Speed is defined]
StartupState --> ErrorState: [Max. Motor Speed is not defined]
LineSensorsCalibrationState --> ReadyState: [Calibration finished]
LineSensorsCalibrationState --> ErrorState: [Calibration failed]
ReadyState --> ReleaseTrackState: [Pushbutton A triggered]
ReleaseTrackState --> DrivingState: [Release timer timeout]
ReleaseTrackState --> ReleaseTrackState: [Pushbutton A triggered]
DrivingState --> ReadyState: [Track lost] or\n[Observation timer timeout]
ErrorState --> MotorSpeedCalibrationState: [Pushbutton A triggered]
ErrorState --> StartupState: [Pushbutton A triggered]

@enduml
Loading

0 comments on commit b5428f1

Please sign in to comment.