The Radon Ulzer repository contains several applications. Each application is described according to the 4+1 architectural view.
Abbreviation | Description |
---|---|
HAL | Hardware Abstraction Layer |
The physical view shows the deployment which is equal to all applications. But not every application may use all of the provided sensors and actors.
The following applications are supported:
- ConvoyLeader application
- LineFollower application
- RemoteControl application
- SensorFusion application
Robot angular speed vs wheel linear speed
-
$v$ : The linear speed of one wheel relative to the other$[\frac{mm}{s}]$ . -
$w_r$ : The robot's angular speed$[\frac{rad}{s}]$ . -
$W$ : The robot's wheel base$[mm]$ . -
$v_L = -v_R$ by rotation about midpoint of the wheel axis.
Linear speed left
Linear speed right
Consider encoder steps per m
-
$v$ : The linear speed of one wheel relative to the other$[\frac{steps}{s}]$ . -
$w_r$ : The robot's angular speed$[\frac{rad}{s}]$ . -
$W$ : The robot's wheel base$[mm]$ . -
$ENC$ : The number of encoder steps per m$[\frac{steps}{m}]$ .
Linear speed left
Linear speed right
Consider robot linear speed center
Linear speed left
Linear speed right
Consider angular speed in mrad per s
Linear speed left
Linear speed right
Base equations:
$distanceLeft [mm] = \frac{encoderStepsLeft [steps]}{encoderStepsPerMM [\frac{steps}{mm}]}$ $distanceRight [mm] = \frac{encoderStepsRight [steps]}{encoderStepsPerMM [\frac{steps}{mm}]}$ $stepsCenter [steps] = \frac{encoderStepsLeft - encoderStepsRight}{2}$ $distanceCenter [mm] = \frac{stepsCenter [steps]}{encoderStepsPerMM [\frac{steps}{mm}]}$
Orientation:
$alpha [rad] = \frac{distanceRight [mm] - distanceLeft [mm]}{wheelBase [mm]}$ $orientation' [rad] = orientation [rad] + alpha [rad]$ $orientation' [rad] = orientation [rad]~%~2\pi$ $-2\pi < Orientation < 2\pi$ - After wrapping on the positive limit
$2\pi$ , the orientation remains positive and starts from 0 again. - After wrapping on the negative limit
$2\pi$ , the orientation remains negative and starts from 0 again.
Position:
-
$dX [mm] = -distanceCenter [mm] \cdot sin(orientation' [rad])$ <- Approximation for performance reason -
$dY [mm] = distanceCenter [mm] \cdot cos(orientation' [rad])$ <- Approximation for performance reason $x' [mm] = x [mm] + dX [mm]$ $y' [mm] = y [mm] + dY [mm]$
Improvement for better accuracy:
$alpha [mrad] = \frac{1000 \cdot (encoderStepsRight [steps] - encoderStepsLeft [steps])}{encoderStepsPerMM [\frac{steps}{mm}] \cdot wheelBase [mm]}$ $orientation' [mrad] = orientation [mrad] + alpha [mrad]$ $dX [mm] = -distanceCenter [mm] \cdot sin(\frac{orientation' [mrad]}{1000})$ $dY [mm] = distanceCenter [mm] \cdot cos(\frac{orientation' [mrad]}{1000})$
The hardware abstraction layer (HAL) depends on the target.
- ATmega32u4 on the Zumo32u4: ZumoHALATmega32u4
- Zumo in Webots: ZumoHALWebots
- Zumo Test: HALTest
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.
The whole source code is published under the MIT license. Consider the different licenses of the used third party libraries too!
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.