\uD83E\uDD14 Problem Statement
...
The art of code testing.
code analysis → unit testing → simulator in a loop(test high level manager behavior) → Hardware in a loop(HIL)
The HIL allows mocking of sensors, peripherals, and “environment” while verifying that outputs from ZP are as expected.
will this ever interface with the simulator?
possible but as an extention of current system.
🎯 Scope
Current Must Haves: | PPM Output to emulate controller signal Hardware ARM/Disarm signal → ZP (button emulation) Send/Receive Telemetry Data Passthrough Telemetry to Ground Station Interfaces over USB Analog ↔︎ Digital conversion up to 6s VBatt. Mock IMU, GPS Remote access incl. remote flashing. Test suites (small regressions for now). Ability to reset ZP (toggle reset line on ZP) (or remote flashing).
|
---|
Future Expansion: | Add-on with analog components for user-input to HIL Mock more sensors (Airspeed, Barometer, OFS, etc). Future expansion for more complete test suites. Actuator output checking? (in a safe way) hardware monitoring (temperature / current / power / etc)
|
Not in scope: |
✈️ Implementation Details
ZP input outputs
1 RFD900x
1 Mateksys 3901 L0x Optical Flow sensor
1 VN-300 Inertial Sensor
1 Neo M.8 GPS Sensor
1 BMX160 Inertial Measurement Unit
1 digital airspeed sensor
4 lift motors + ESC’s + Props
1 push motor + ESC’s
7-8 Servos
Jetson TX2
PX5
Central controller raspberry pi. Attach nucleos to this which run proper firmware.
...
tasks break down:
To-do:
PPM data: (emulating controller signal)
Hardware ARM/ Disarm signal:(emulate a safe to start signal):
Output verifying? Hooking up scope/DDM ← safe thing to do?
solution proposing: reduce the voltage to 5v analog and send the actuator signal back to the stm board to verify the input and anticipated output.
under research:
Send/ Receive telemetry data: (mocking UART data stream)
Interfaces over usb: (emulate Serial communication)
Analog ↔︎ digital conversion: (adc singal?)
Mocking IMU, FPS/ other peripherials: (Mainly i2c and spi)
future to-do list:
Remote access and remote flashing: hardware power-cycle
testing suites: (regression testing)
Having a custom HIL system and custom hardware
Hardware monitoring.
\uD83D\uDDD3 Timeline
The current short term goal to the mid-march will be to create the designed signal and to finish coding and unit testing the code. After all testing is carefully done try to run it on zp carefully and see correct output are generated. Think about how to check the signal output and verify the signal.(safe and automated)
Roadmap Planner |
---|
maplinks | |
---|
timeline | true |
---|
source | %7B%22title%22%3A%22Roadmap%20Planner%22%2C%22timeline%22%3A%7B%22startDate%22%3A%222022%7B%22title%22%3A%22Roadmap%20Planner%22%2C%22timeline%22%3A%7B%22startDate%22%3A%222023-1101-10%2000%3A00%3A00%22%2C%22endDate%22%3A%22202223%2000%3A00%3A00%22%2C%22endDate%22%3A%222023-1203-20%2000%3A00%3A00%22%2C%22displayOption%22%3A%22WEEK%22%7D%2C%22lanes%22%3A%5B%7B%22title%22%3A%22Software%22%2C%22color%22%3A%7B%22lane%22%3A%22%23d04437%22%2C%22bar%22%3A%22%23dc7369%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22title%22%3A%22Feature%201%22%2C%22description%22%3A%22This%20is%20the%20first%20bar.%22%2C%22startDate%22%3A%22202123%2000%3A00%3A00%22%2C%22displayOption%22%3A%22WEEK%22%7D%2C%22lanes%22%3A%5B%7B%22title%22%3A%22architecture%20planning%22%2C%22color%22%3A%7B%22lane%22%3A%22%238eb021%22%2C%22bar%22%3A%22%23aac459%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22rowIndex%22%3A0%2C%22startDate%22%3A%222023-1001-23%2017%3A06%3A32%22%2C%22duration%22%3A8.714285714285714%2C%22rowIndex%22%3A1%2C%22id%22%3A%229988019523%2001%3A01%3A25%22%2C%22id%22%3A%225252a106-7faf3a12-4b2f43af-ac44b663-a38516c4cad5%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22title%22%3A%22Feature%202%22%2C%22description%22%3A%22This%20is%20the%20second%20bar829cb5f0485b%22%2C%22title%22%3A%22understand%20ppm%20frame%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.%22%2C%22startDate%22%3A%2220224653465346534653%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A1%2C%22startDate%22%3A%222023-01-01%2014%3A43%3A57%22%2C%22duration%22%3A6.162659221230158%2C%22rowIndex%22%3A2%2C%22id%22%3A%22604cae1323%2001%3A01%3A25%22%2C%22id%22%3A%2256f370d3-314a2910-48484729-b142-95d3570aa3db%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A0%2C%22startDate%22%3A%222022-03-08%2001%3A25%3A32%22%2C%22id%22%3A%22739eee1a-3ad0-4154-a8a7-d630942c1b71%22%2C%22title%22%3A%22Feature%203%22%2C%22description%22%3A%22%22%2C%22duration%22%3A6.269035868055555%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A3%2C%22startDate%22%3A%222022-04-30%2002%3A36%3A49%22%2C%22id%22%3A%22d2721513-87bf-4ea5-9981-d3971248c8f5%22%2C%22title%22%3A%22Feature%204%22%2C%22description%22%3A%22%22%2C%22duration%22%3A7.271570013227513%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A1%2C%22startDate%22%3A%222022-11-11%2007%3A07%3A43%22%2C%22id%22%3A%225f2d7dc2-df8f-4788-ac1b-dc02736b00ec%22%2C%22title%22%3A%22New%20Bar%22%2C%22description%22%3A%22Software%20Written%22%2C%22duration%22%3A2.386138613861386%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22Hardware%20%22%2C%22color%22%3A%7B%22lane%22%3A%22%233b7fc4%22%2C%22bar%22%3A%22%236c9fd3%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22title%22%3A%22iOS%20app%22%2C%22description%22%3A%22This%20is%20the%20third%20bar.%22%2C%22startDate%22%3A%222021-10-13%2021%3A23%3A10%22%2C%22duration%22%3A10.928571428571429%2C%22rowIndex%22%3A0%2C%22id%22%3A%22b10f9e72-539a-4a31-88bd-746bd09d7f1e%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A2%2C%22startDate%22%3A%222022-03-27%2003%3A08%3A19%22%2C%22id%22%3A%22e329a842-d49c-4f39-83ee-4d7af06dece7%22%2C%22title%22%3A%22Android%20app%22%2C%22description%22%3A%22%22%2C%22duration%22%3A7.311173973214285%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A1%2C%22startDate%22%3A%222022-11-28%2004%3A59%3A24%22%2C%22id%22%3A%22e6c5d0e2-6707-486f-b7e2-dcb7dd6e6e5e%22%2C%22title%22%3A%22New%20Bar%22%2C%22description%22%3A%22Have%20hardware%20finalized%22%2C%22duration%22%3A1.9702970297029703%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22Finalize%22%2C%22color%22%3A%7B%22lane%22%3A%22%23f6c342%22%2C%22bar%22%3A%22%23fadb8e%22%2C%22text%22%3A%22%23594300%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22rowIndex%22%3A0%2C%22startDate%22%3A%222022-12-12%2001%3A39%3A48%22%2C%22id%22%3A%223eb70af6-6b00-4f86-9428-68c1c113d18b%22%2C%22title%22%3A%22New%20Bar%22%2C%22description%22%3A%22Finishing%20touches%3F%22%2C%22duration%22%3A1.504950495049505%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%5D%2C%22markers%22%3A%5B%7B%22title%22%3A%22Marker%201%22%2C%22markerDate%22%3A%2220188cd6-11eeb0b26590%22%2C%22title%22%3A%22understanding%20disarm%20button%20signal%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.4554455445544554%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A2%2C%22startDate%22%3A%222023-01-28%2012%3A25%3A24%22%2C%22id%22%3A%227eb8ad8e-6996-4ad1-82bf-15b9bc61e6f3%22%2C%22title%22%3A%22purposing%20interfaces%20and%20arch%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.277227722772277%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A3%2C%22startDate%22%3A%222023-03-13%2012%3A00%3A14%22%2C%22id%22%3A%222d0cd004-ff4f-42bd-96b1-5d23713bde36%22%2C%22title%22%3A%22automating%20the%20zp%20output%20testing%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.881188118811881%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22coding%22%2C%22color%22%3A%7B%22lane%22%3A%22%23f6c342%22%2C%22bar%22%3A%22%23fadb8e%22%2C%22text%22%3A%22%23594300%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22rowIndex%22%3A0%2C%22startDate%22%3A%222023-02-13%2012%3A40%3A02%22%2C%22id%22%3A%22a7cac00e-c864-4af3-b801-f032fdd2fd74%22%2C%22title%22%3A%22finish%20the%20code%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.3366336633663367%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22unit%20testing%22%2C%22color%22%3A%7B%22lane%22%3A%22%233b7fc4%22%2C%22bar%22%3A%22%236c9fd3%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22rowIndex%22%3A0%2C%22startDate%22%3A%222023-02-19%2023%3A21%3A37%22%2C%22id%22%3A%22d6f4d76d-ecfd-4e14-a082-4bd6ad4c17aa%22%2C%22title%22%3A%22unit%20testing%20each%20output%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.9306930693069306%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A1%2C%22startDate%22%3A%222023-03-03%2019%3A47%3A46%22%2C%22id%22%3A%22996862e9-260a-484c-a92d-78074b3fa90e%22%2C%22title%22%3A%22zp%20integration%20test%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.396039603960396%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%5D%2C%22markers%22%3A%5B%7B%22title%22%3A%22Marker%201%22%2C%22markerDate%22%3A%222018-10-05%2007%3A07%3A43%22%7D%2C%7B%22markerDate%22%3A%222019-03-15%2000%3A00%3A00%22%2C%22title%22%3A%22Marker%22%7D%2C%7B%22markerDate%22%3A%222022-11-28%2001%3A39%3A48%22%2C%22title%22%3A%22Marker%22%7D%2C%7B%22markerDate%22%3A%222022-12-12%2000%3A00%3A00%22%2C%22title%22%3A%22Marker%22%7D%2C%7B%22markerDate%22%3A%222022-11-11%2010%3A27%3A19%22%2C%22title%22%3A%22Marker%22%7D%5D%7D |
---|
pagelinks | |
---|
title | Roadmap%20Planner |
---|
hash | 67ba7a3f93e21ae85cd7e7dffeb17055 | 902058fe54827da96d89fa1cdbb16157 |
---|
|
✈️ Implementation Details
ZP input outputs
1 RFD900x
1 Mateksys 3901 L0x Optical Flow sensor
1 VN-300 Inertial Sensor
1 Neo M.8 GPS Sensor
1 BMX160 Inertial Measurement Unit
1 digital airspeed sensor
4 lift motors + ESC’s + Props
1 push motor + ESC’s
7-8 Servos
Jetson TX2
PX5
Central controller raspberry pi. Attach nucleos to this which run proper firmware.
Open Questions
Do we want this to be a nucleo shield? I know this was mentioned throughout the meeting, but I don't remember if we came to a conclusion.
As it currently stands, when we refer to the “HIL controller,” we’re talking about the nucleo + the computer it interacts with. For the first revisions, we’ll design on a f401. In the future, this might turn into a nucleo shield, but we’re more likely to have a central controller (refer to below).
"Analog ↔︎ Digital conversion up to 6s VBatt" How do we want to do the analog to digital conversion? Where is the analog input coming from ?
By "remote flashing" do we mean having the ability to flash when the programmer is not in physical contact with the device? Would the HIL then be under the view of a camera?
Will this ever interface with the simulator? I feel like this is more of a future expansion thing, especially because the simulator hasn't been started.
"Central controller raspberry pi" I'm not familiar with the pi, so how would this change the flow? Would the nucleo interact with the pi, which then interacts with ZP?
Long term scope for this project is to have one central controller, such as the raspberry pi, and several peripherals (decided to be nucleos as of now) that route through said central controller. For example, one nucleo might be dedicated to mocking an IMU, and another might be dedicated to mocking GPS. The use of a central controller would allow us to break the project up into smaller parts, and have dedicated modules for certain things.
Do I need to write a UART driver? Or can I use the HAL UART driver?
I2C issues, and working with hardware that doesn’t exist. More direction on this would be nice.
✅ Actions Items
...
- Jack Greenwood create architecture diagram, documentation, & open questions!
\uD83D\uDEA9 Milestones and deadlines
Milestone | Owner | Deadline | Status |
---|
| | | |
| | | |
| | | |
\uD83D\uDD17 Reference materials