work:quadcopter
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
work:quadcopter [2014/04/02 16:39] – created donghee | work:quadcopter [2018/07/18 14:10] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 개발 | ||
+ | |||
+ | |||
+ | ## ar9331 보드 만들기 | ||
+ | |||
+ | ### USB 허브칩 ftdi GL850G | ||
+ | |||
+ | TP WR703N의 확장 보드: GL850사용해서 만든 허브 http:// | ||
+ | |||
+ | arduino yun에서 RT8010-33GQW라는 step down dcdc 사용합 1.5mhz 1A | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ## 알리바바에 파는 ar9331 보드 | ||
+ | |||
+ |  carambola2랑 비슷한 수준; 그런데 1000개가 기본 수량 | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ### TL-WR703N Reverse Engineering | ||
+ | |||
+ | * https:// | ||
+ | * http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ## openwrt configure for tplink 703N | ||
+ | |||
+ | steps: | ||
+ | |||
+ | 1. buy an tplink 703N, if it is A17 version , need to download an old firmware from tplink http:// | ||
+ | 2. download the bin to downgrade the firmware | ||
+ | 3. download tplink specific firmware with squre factory os | ||
+ | 4. flash the firmware within the web ui | ||
+ | 5. after reboot, link lan with laptop, and telnet into the system | ||
+ | 6. type passwd to set new passwd for root, reboot and ssh to system with new passwd | ||
+ | 7. change / | ||
+ | ------------------------ | ||
+ | |||
+ | | ||
+ | |||
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | 좀 이유 설명 | ||
+ | |||
+ | Hard Fault freertos xPortPendSVHandler | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | http:// | ||
+ | Mike, | ||
+ | I've seen exactly this problem several times on the 205 and it was generally caused by the main ' | ||
+ | |||
+ | http:// | ||
+ | |||
+ | . If you are using an STM32 with the STM32 driver library then ensure all the | ||
+ | | ||
+ | |||
+ | 이미 NVIC_PriorityGroup_4로 되어 있네ㅣ | ||
+ | |||
+ | 스택 사이즈? | ||
+ | 시스템 테스크를 2배에서 4배로 스택 크기를 수정 | ||
+ | -> 그래도 죽네;; 다른때보다 3배정도는 늦게 죽는다. | ||
+ | |||
+ | http:// | ||
+ | |||
+ | Uart에 이걸 넣음 | ||
+ | |||
+ | vTaskSuspendAll() | ||
+ | xTaskResumeAll() | ||
+ | |||
+ | The stack in use when you call main() is recycled for use by all interrupt handlers. | ||
+ | |||
+ | |||
+ | |||
+ | ---------------- | ||
+ | |||
+ | Heli controls are like following | ||
+ | |||
+ | Throttle/ | ||
+ | Rudder == yaw, rotate left/right | ||
+ | Elevator == (bank)/fly forward/ | ||
+ | Aileron == (bank)/fly sideways left/right | ||
+ | |||
+ | openpilot | ||
+ | |||
+ | https:// | ||
+ | |||
+ | 체크 리스트 | ||
+ | - http:// | ||
+ | - mbed로 | ||
+ | |||
+ | - openpilot esc | ||
+ | - x copter, quard copter http:// | ||
+ | |||
+ | |||
+ | esc 세팅 | ||
+ | http:// | ||
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | pwm 코드 수정 | ||
+ | - http:// | ||
+ | - 50mhz 1ms~2ms 로 데이터 수정! | ||
+ | |||
+ | pid 코드 수정 | ||
+ | - http:// | ||
+ | - pid 값 수정해서 스테이블한 상태 만들기 | ||
+ | |||
+ | |||
+ | modules/ | ||
+ | |||
+ | http:// | ||
+ | |||
+ | crazyflie는 기본으로 attitude mode? rate 모드는 뭐지? | ||
+ | | ||
+ | Project Quadcopter | ||
+ | |||
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | m-bugs altitude holding | ||
+ | |||
+ | 쿼드콥터 만들기 | ||
+ | - 8MIPS로 400hz? 제어기 성능보다 추저성능이 중요. | ||
+ | http:// | ||
+ | - 인터럽트 사용해서 쓰는uart와 i2c가 추적 성능을 낮게 만들지.도 nrf24는 dma로 했나? | ||
+ | |||
+ | 칼만필터: | ||
+ | |||
+ | |||
+ | ## crazyflie | ||
+ | |||
+ | https:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | 슬라이딩 어떻게 하지? | ||
+ | |||
+ |  | ||
+ | |||
+ | |||
+ | Accel보다 자이로만 사용했을때 계속 밀린다. | ||
+ | |||
+ | GyroBias 값을 0으로 해보았는데, | ||
+ | |||
+ | Gyro에 low pass filter를 적용 해보자! | ||
+ | |||
+ | -> lpf와 average filter(250hz) 적용 | ||
+ | |||
+ | low pass filter가 별로 나아지는것은 없어보이는데 | ||
+ | GyroBias가 지대한 영향을 끼치는것 같다. | ||
+ | 분산, 평균을 이용해서 추세를 보는듯. | ||
+ | |||
+ | 0.296548, -0.452743, 3.047594 | ||
+ | | ||
+ | 0.295663, -0.450056, 3.115887 | ||
+ | | ||
+ | 0.292134, -0.452814, 3.190397 | ||
+ | | ||
+ | 0.236752, -0.417580, 3.254106 | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | bias계산 안하고 그냥 손으로 넣은게 나을려나? | ||
+ | |||
+ | bias계산해서 넣으니깐 한쪽으로 계속 치우친다. | ||
+ | |||
+ | 날개를 바꾸는것도 이상해. | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | #### Reading accelerometers | ||
+ | |||
+ | | ||
+ | |||
+ | ## openpilot | ||
+ | |||
+ | - http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
+ | 모터를 exp? 왜 이렇게 계산하냐? | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | { | ||
+ | | ||
+ | |||
+ | - value = ipow(UINT16_MAX, | ||
+ | + value = fastPow(UINT16_MAX, | ||
+ | | ||
+ | } | ||
+ | |||
+ | +double fastPow(double a, double b) { | ||
+ | + union { | ||
+ | + double d; | ||
+ | + int x[2]; | ||
+ | + } u = { a }; | ||
+ | + u.x[1] = (int)(b * (u.x[1] - 1072632447) + 1072632447); | ||
+ | + u.x[0] = 0; | ||
+ | + return u.d; | ||
+ | +} | ||
+ | |||
+ | +static double fastPrecisePow(double a, double b) { | ||
+ | + // calculate approximation with fraction of the exponent | ||
+ | + int e = (int) b; | ||
+ | + union { | ||
+ | + double d; | ||
+ | + int x[2]; | ||
+ | + } u = { a }; | ||
+ | + u.x[1] = (int)((b - e) * (u.x[1] - 1072632447) + 1072632447); | ||
+ | + u.x[0] = 0; | ||
+ | + | ||
+ | + // exponentiation by squaring with the exponent' | ||
+ | + // double r = u.d makes everything much slower, not sure why | ||
+ | + double r = 1.0; | ||
+ | + while (e) { | ||
+ | + if (e & 1) { | ||
+ | + r *= a; | ||
+ | + } | ||
+ | + a *= a; | ||
+ | + e >>= 1; | ||
+ | + } | ||
+ | + | ||
+ | + return r * u.d; | ||
+ | +} | ||
+ | + | ||
+ | ---- | ||
+ | |||
+ | 안드로이드 콘트롤러 | ||
+ | |||
+ | < | ||
+ | |||
+ | 이어서 시작 | ||
+ | |||
+ | andorid vm 버전 avd 4.3과 avd 4.0.3 설치 두개 설치 | ||
+ | |||
+ | E: | ||
+ | |||
+ | 4.3에서 한글이 안나오네. 4.0.3으로 가자! | ||
+ | |||
+ | |||
+ | - http:// | ||
+ | - http:// | ||
+ | - http:// | ||
+ | |||
+ | cara-rover2를 다운받아서 우선 설치. | ||
+ | |||
+ | http:// | ||
+ | |||
+ | mjpeg jni사용해서 빠름 | ||
+ | |||
+ | |||
+ | 시간나면 안드로이드 말고 pc용 클라이언트도 하나 만들어야 겠다. | ||
+ | pyside가 좋겠어. http:// | ||
+ | |||
+ | 여기보니 pyqt가 낫다고 하네;;; | ||
+ | |||
+ | |||
+ | pc client 수정해서 동작 하도록 만들고 있음 | ||
+ | |||
+ | <- 5:3 (97, 114, 100, 32, 102, 97, 117, 108, 116, 32, 104, 97, 110, 100, 108, 101, 114, 93, 10, 82, 48, 32, 61, 32, 50, 48, 48, 48, 53, 48, 48, 48, 10, 82, 49, 32, 61, 32, 48, 10, 82, 50, 32, 61, 32, 48, 10, 82, 51, 32, 61, 32, 50, 48, 48, 48, 48, 50, 49, 67, 10, 82, 49, 50, 32, 61, 32, 50, 48, 10, 76, 82) | ||
+ | |||
+ | 그런데 이거 뱃으면서 죽어버렸네.. | ||
+ | |||
+ | 3채널은 있지도 않은데. | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | 이건 HardFault 메시지? gdbㄷ로 디버깅 필요. | ||
+ | |||
+ | |||
+ | |||
====== Camera ====== | ====== Camera ====== | ||
Line 11: | Line 330: | ||
- cmos usb 3.2mp 29mm 원형 http:// | - cmos usb 3.2mp 29mm 원형 http:// | ||
- | - DFM 42BUC03-ML http:// | + | ] - DFM 42BUC03-ML http:// |
H: 30 mm, W: 30 mm, L: 15 mm | H: 30 mm, W: 30 mm, L: 15 mm | ||
work/quadcopter.1396456781.txt.gz · Last modified: 2018/07/18 14:09 (external edit)