PX4 Device Driver
- PX4 Hardware
- PX4 Software
- APM
PX4 Hardware 이해
px4fmu v2.4.5 (회로)
Device 만들때 고려점
- interface port (uart, i2c, adc, can)
- 전류/전압
Software
PX4 코드 이해 (속성!)
- 툴체인 설치(개발환경 구축)
- 디렉토리 구성
tree -d -L 2
- 부팅 과정: px4-부팅-분석.md
- 시작 스크립트 Firmware/ROMFS/px4fmu_common/init.d
- 아키텍쳐
PX4 폴더 구성
기존의 driver (i2c/uart/adc)
tree -d -L 2
tree src -d -L 2
PX4 수정하기
Simple App
px4-simple-app.md
PX4 Drivers
https://github.com/PX4/Firmware/tree/master/src/drivers
https://github.com/PX4/Firmware/tree/master/src/drivers/mb12xx
https://github.com/PX4/Firmware/blob/master/src/drivers/mb12xx/mb12xx.cpp#L583
orb_publish(ORB_ID(distance_sensor), _distance_sensor_topic, &report);
부록 APM
APM_HAL
AP_HAL in ArduPilot
– creates hardware abstraction layer – allows porting to many OSes and CPU architectures – each HAL provides minimal system level glue
Current ports
– AP_HAL_AVR (8 bit AVR2560) – AP_HAL_SITL (SITL simulator) – AP_HAL_PX4 (PX4 based autopilots) – AP_HAL_Flymaple (low cost ARM autopilot) – AP_HAL_VRBrain (ARM32 autopilot) – AP_HAL_Linux (embedded Linux port) – AP_HAL_Empty (very useful!)
https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_HAL_Empty
Device Driver
https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_Airspeed
실시간으로 기체의 포지션을 바꾸고 싶은 경우 사용
충돌방지
ArduPilot Object Avoidance with 3D camera
https://www.youtube.com/watch?v=qk_hEtRASqg
https://github.com/ArduPilot/ardupilot/blob/master/libraries/AC_Avoidance/AC_Avoid.cpp