Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5x sensors #12593

Merged
merged 16 commits into from
Dec 3, 2019
Merged

v5x sensors #12593

merged 16 commits into from
Dec 3, 2019

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Jul 31, 2019

@dagar Integration in sensors is done here.
I dropped you stub and pulled in @ksschwabe branch here in (@ksschwabe Thank you!)

Last commit has formatting changes (:

@davids5 davids5 requested a review from dagar July 31, 2019 21:17
@davids5 davids5 force-pushed the master_v5x_sensors branch from 1b9a40f to 372ecf2 Compare August 2, 2019 13:42
@ksschwabe
Copy link
Contributor

ksschwabe commented Aug 2, 2019

@davids5: Maybe I can go and fix those formatting changes for the BMI088 driver on my branch, so that we don't end up with a horrible "fixes whitespace" commit. Let me know if you want/need me to do this.

@dagar
Copy link
Member

dagar commented Aug 2, 2019

@davids5: Maybe I can go and fix those formatting changes for the BMI088 driver, so that we don't end up with a

@ksschwabe I'll squash it with your PR and bring it in so we can keep iterating. I have the FIFO version with sync coming together and it's going to make a bigger mess if I don't do it on top of the existing structure.

@ksschwabe
Copy link
Contributor

Also note: the commit 3b804af (adds dev types for BMI088 accel and gyro) now has a conflict with the BMP388 DEV_TYPE. This we need to fix.

@dagar dagar force-pushed the master_v5x_sensors branch from 372ecf2 to 2a2f575 Compare August 2, 2019 19:13
@dagar
Copy link
Member

dagar commented Aug 2, 2019

Rebased on master (with BMI088).

@davids5
Copy link
Member Author

davids5 commented Aug 3, 2019

Also note: the commit 3b804af (adds dev types for BMI088 accel and gyro) now has a conflict with the BMP388 DEV_TYPE. This we need to fix.

@ksschwabe I believe that is sorted out in @dagar changeset

@davids5 davids5 force-pushed the master_v5x_sensors branch from 2a2f575 to 56ee3fb Compare August 5, 2019 15:39
@davids5
Copy link
Member Author

davids5 commented Aug 5, 2019

@dagar - rebased on master

@davids5 davids5 force-pushed the master_v5x_sensors branch from 56ee3fb to 5655f8d Compare August 5, 2019 20:43
@davids5
Copy link
Member Author

davids5 commented Aug 5, 2019

@dagar - rebased on master

@davids5 davids5 force-pushed the master_v5x_sensors branch from 5655f8d to 371520a Compare August 6, 2019 13:13
@davids5
Copy link
Member Author

davids5 commented Aug 6, 2019

@dagar rebased on master_v5x

@davids5 davids5 force-pushed the master_v5x_sensors branch 2 times, most recently from f30aa7e to 49c444b Compare August 9, 2019 18:23
@davids5 davids5 force-pushed the master_v5x_sensors branch 2 times, most recently from d7961da to 92bf66f Compare August 17, 2019 06:47
@davids5
Copy link
Member Author

davids5 commented Aug 17, 2019

@dagar -Do you have hardware with a BMP388 that you can cross test @modaltb changes?

If not, since the BMP388 is not currently in tree and only the FMUv5X uses it, Would be safe to bring in as is?

@davids5
Copy link
Member Author

davids5 commented Nov 21, 2019

@dagar - the commit from PR for ST ISM330DLC IMU driver is merged here.

Please review output

nsh> reboot
WARN  [shutdown] Reboot NOW.
reset done, 10 ms
[boot] Rev 0x0 : Ver 0x0 V5X00
[boot] Fault Log info File No 4 Length 3177 flags:0x01 state:1
[boot] Fault Log is Armed
sercon: Registering CDC/ACM serial driver
sercon: Successfully registered the CDC/ACM serial driver
HW arch: PX4_FMU_V5X
HW type: V5X00
HW version: 0x00000000
HW revision: 0x00000000
FW git-hash: 3d2ca78c52b3ff4f0221b36039d31f85b26a7c34
FW version: 1.10.0 80 (17432704)
FW git-branch: master_v5x_sensors_st_ism330dlc
OS: NuttX
OS version: 0.0.0 0 (0)
OS git-hash: 66401c8960c5211ded41ae4f60bfb1746a84bd50
Build datetime: Nov 20 2019 16:05:41
Build uri: localhost
Toolchain: GNU GCC, 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
PX4GUID: 0002000000003533383731385117003f0024
MCU: STM32F76xxx, rev. Z
[hardfault_log] Fault Log is Armed
INFO  [param] selected parameter default file /fs/mtd_params
INFO  [tune_control] Publishing standard tune 1
Board defaults: /etc/init.d/rc.board_defaults
ERROR [safety_button] not starting (use px4io for safety button)
ERROR [safety_button] Task start failed (-1)
INFO  [dataman] Unknown restart, data manager file '/fs/microsd/dataman' size is 362560 bytes
rgbled on I2C bus 1 at 0x55 (bus: 100 KHz, max: 100 KHz)
WARN  [rgbled_ncp5623c] no RGB led on bus #1
nsh: rgbled_pwm: command not found
Board sensors: /etc/init.d/rc.board_sensors
MPU6000 on SPI bus 1 at 0 (1000 KHz)
ism330dlc on SPI bus 2 at 0 (10000 KHz)
BMI088_ACCEL on SPI bus 3 at 1 (10000 KHz)
BMI088_GYRO on SPI bus 3 at 0 (10000 KHz)
IST8310 on I2C bus 1 at 0x0e (bus: 100 KHz, max: 400 KHz)
INFO  [ist8310] no device on bus 2
WARN  [hmc5883] no device on bus 1 (type: 2)
WARN  [hmc5883] no device on bus 2 (type: 2)
WARN  [hmc5883] no device on bus 3 (type: 2)
ERROR [hmc5883] bus 2 not started
ERROR [hmc5883] bus 2 not started
WARN  [qmc5883] no device on bus 1 (type: 2)
WARN  [qmc5883] no device on bus 2 (type: 2)
WARN  [qmc5883] no device on bus 3 (type: 2)
BMM150 on I2C bus 4 at 0x10 (bus: 100 KHz, max: 100 KHz)
BMP388_I2C on I2C bus 4 at 0x76 (bus: 100 KHz, max: 100 KHz)
WARN  [bmp388] already started
BMP388_I2C on I2C bus 4 at 0x77 (bus: 100 KHz, max: 100 KHz)
WARN  [ms5611] no device on bus 2
WARN  [ms5611] no device on bus 2
MS5611_I2C on I2C bus 3 at 0x77 (bus: 100 KHz, max: 400 KHz)
WARN  [rm3100] no device on bus 2
WARN  [rm3100] no device on bus 2
WARN  [rm3100] no device on bus 2
WARN  [rm3100] no device on bus 1
nsh: battery_status: command not found
Board extras: /etc/init.d/rc.board_mavlink
INFO  [mavlink] mode: Config, data rate: 800000 B/s on /dev/ttyACM0 @ 57600B
Starting Main GPS on /dev/ttyS0
Starting MAVLink on /dev/ttyS6
INFO  [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS6 @ 57600B
No autostart ID found
INFO  [logger] logger started (mode=all)

NuttShell (NSH)
nsh> INFO  [ecl/EKF] EKF aligned, (pressure height, IMU buf: 22, OBS buf: 14)

nsh> top

 PID COMMAND                   CPU(ms) CPU(%)  USED/STACK PRIO(BASE) STATE FD
   0 Idle Task                   10765 27.152   244/  512   0 (  0)  READY  3
   1 hpwork                          0  0.000   344/ 1260 249 (249)  w:sig  3
   2 lpwork                         26  0.082   632/ 1516  50 ( 50)  w:sig  8
   3 init                         2440  0.000  1728/ 2604 100 (100)  w:sem  3
   4 wq:manager                      0  0.000   384/ 1252 243 (243)  w:sem  3
   5 Telnet daemon                   0  0.000   520/ 2020 100 (100)  w:sem  0
  78 wq:att_pos_ctrl              2368  5.960  4768/ 6596 244 (244)  READY  3
  18 dataman                         0  0.000   792/ 1204  90 ( 90)  w:sem  4
  21 wq:lp_default                   3  0.000   792/ 1700 205 (205)  w:sem  3
  23 wq:I2C1                       206  0.496   788/ 1396 246 (246)  READY  3
  27 wq:hp_default                   5  0.000   488/ 1500 243 (243)  w:sem  3
  38 wq:SPI1                      3975  9.602  1048/ 1596 253 (253)  w:sem  3
  40 wq:SPI2                     10085 24.254  1160/ 1596 252 (252)  w:sem  3
  42 wq:SPI3                      5783 13.907   992/ 1596 251 (251)  w:sem  3
  50 wq:I2C4                       565  1.407   704/ 1396 243 (243)  READY  3
  54 wq:I2C3                      1114  0.579   720/ 1396 244 (244)  READY  3
  77 sensors                      1307  3.062  1472/ 1964 237 (237)  READY 14
 238 top                           421  2.897  1560/ 2028 248 (248)  RUN    3
  80 wq:rate_ctrl                  751  1.821   864/ 1596 255 (255)  w:sem  3
  81 commander                     384  0.579  1640/ 3212 140 (140)  READY  6
  83 commander_low_prio              0  0.000   624/ 2996  50 ( 50)  w:sem  6
  90 mavlink_if0                  1659  3.476  1720/ 2924 100 (100)  READY  4
  92 mavlink_rcv_if0               126  0.248  3544/ 5332 175 (175)  w:sem  4
 140 gps                            77  0.165  1088/ 1540 208 (208)  w:sem  4
 184 mavlink_if1                   659  1.076  1664/ 2836 100 (100)  w:sig  4
 185 mavlink_rcv_if1               145  0.331  3544/ 5332 175 (175)  w:sem  4
 212 navigator                      62  0.165   912/ 1764 105 (105)  w:sem  5
 231 logger                        225  0.413  1240/ 3644 233 (233)  w:sem  3
 233 log_writer_file                 0  0.000   368/ 1164  60 ( 60)  w:sem  3

Processes: 29 total, 9 running, 20 sleeping, max FDs: 20
CPU usage: 70.53% tasks, 2.32% sched, 27.15% idle
DMA Memory: 5120 total, 5120 used 5120 peak
Uptime: 44.288s total, 10.766s idle
nsh> sensors status
INFO  [sensors] gyro status:
INFO  [ecl/validation] validator: best: 1, prev best: 1, failsafe: NO (0 events)
INFO  [ecl/validation] sensor #0, prio: 75, state: OK
INFO  [ecl/validation]  val:   0.0549, lp:  -0.0002 mean dev:   0.0000 RMS:   0.0343 conf:   1.0000
INFO  [ecl/validation]  val:   0.0757, lp:   0.0405 mean dev:   0.0001 RMS:   0.0284 conf:   1.0000
INFO  [ecl/validation]  val:  -0.0219, lp:  -0.0194 mean dev:  -0.0000 RMS:   0.0039 conf:   1.0000
INFO  [ecl/validation] sensor #1, prio: 100, state: OK
INFO  [ecl/validation]  val:  -0.0041, lp:  -0.0018 mean dev:   0.0000 RMS:   0.0016 conf:   1.0000
INFO  [ecl/validation]  val:  -0.0796, lp:  -0.0777 mean dev:   0.0000 RMS:   0.0014 conf:   1.0000
INFO  [ecl/validation]  val:  -0.0040, lp:  -0.0039 mean dev:   0.0000 RMS:   0.0010 conf:   1.0000
INFO  [ecl/validation] sensor #2, prio: 99, state: ECNT
INFO  [ecl/validation]  val:   0.0153, lp:   0.0037 mean dev:   0.0001 RMS:   0.0272 conf:   0.0000
INFO  [ecl/validation]  val:  -0.1000, lp:  -0.0028 mean dev:  -0.0000 RMS:   0.0336 conf:   0.0000
INFO  [ecl/validation]  val:  -0.0090, lp:  -0.0023 mean dev:  -0.0000 RMS:   0.0043 conf:   0.0000
INFO  [sensors] accel status:
INFO  [ecl/validation] validator: best: 1, prev best: 1, failsafe: NO (0 events)
INFO  [ecl/validation] sensor #0, prio: 75, state: OK
INFO  [ecl/validation]  val:   3.6036, lp:   3.6046 mean dev:   0.0001 RMS:   0.0329 conf:   1.0000
INFO  [ecl/validation]  val:  -0.9188, lp:  -0.8929 mean dev:   0.0001 RMS:   0.0224 conf:   1.0000
INFO  [ecl/validation]  val:   9.2746, lp:   9.3128 mean dev:  -0.0000 RMS:   0.0575 conf:   1.0000
INFO  [ecl/validation] sensor #1, prio: 100, state: OK
INFO  [ecl/validation]  val:  -0.1479, lp:  -0.1906 mean dev:  -0.0001 RMS:   0.0108 conf:   1.0000
INFO  [ecl/validation]  val:  -0.5722, lp:  -0.5540 mean dev:   0.0001 RMS:   0.0121 conf:   1.0000
INFO  [ecl/validation]  val:  -9.6256, lp:  -9.6739 mean dev:   0.0000 RMS:   0.0438 conf:   1.0000
INFO  [ecl/validation] sensor #2, prio: 99, state: OK
INFO  [ecl/validation]  val:  -0.4512, lp:  -0.4475 mean dev:   0.0001 RMS:   0.0254 conf:   1.0000
INFO  [ecl/validation]  val:  -4.3105, lp:  -4.2983 mean dev:   0.0000 RMS:   0.0346 conf:   1.0000
INFO  [ecl/validation]  val:   8.9141, lp:   8.9400 mean dev:   0.0001 RMS:   0.0577 conf:   1.0000
INFO  [sensors] mag status:
INFO  [ecl/validation] validator: best: 0, prev best: 1, failsafe: YES (1 events)
INFO  [ecl/validation] sensor #0, prio: 255, state: OK
INFO  [ecl/validation]  val:  -0.1590, lp:  -0.1559 mean dev:   0.0000 RMS:   0.0026 conf:   1.0000
INFO  [ecl/validation]  val:  -0.0120, lp:  -0.0126 mean dev:  -0.0000 RMS:   0.0015 conf:   1.0000
INFO  [ecl/validation]  val:   0.2160, lp:   0.2168 mean dev:   0.0000 RMS:   0.0033 conf:   1.0000
INFO  [ecl/validation] sensor #1, prio: 255, state: OK
INFO  [ecl/validation]  val:  -0.3011, lp:  -0.2958 mean dev:   0.0000 RMS:   0.0054 conf:   1.0000
INFO  [ecl/validation]  val:  -0.1101, lp:  -0.1088 mean dev:   0.0000 RMS:   0.0057 conf:   1.0000
INFO  [ecl/validation]  val:  -0.1589, lp:  -0.1630 mean dev:  -0.0000 RMS:   0.0061 conf:   1.0000
INFO  [sensors] baro status:
INFO  [ecl/validation] validator: best: 0, prev best: 2, failsafe: YES (1 events)
INFO  [ecl/validation] sensor #0, prio: 75, state: OK
INFO  [ecl/validation]  val: 995.0232, lp: 994.9902 mean dev:  -0.0018 RMS:   0.0191 conf:   1.0000
INFO  [ecl/validation]  val:  44.6300, lp:  44.6509 mean dev:   0.0297 RMS:   0.0681 conf:   1.0000
INFO  [ecl/validation]  val:   0.0000, lp:   0.0000 mean dev:   0.0000 RMS:   0.0000 conf:   1.0000
INFO  [ecl/validation] sensor #1, prio: 75, state: OK
INFO  [ecl/validation]  val: 995.0762, lp: 995.0671 mean dev:  -0.0014 RMS:   0.0168 conf:   1.0000
INFO  [ecl/validation]  val:  31.0200, lp:  31.0095 mean dev:   0.0125 RMS:   0.0382 conf:   1.0000
INFO  [ecl/validation]  val:   0.0000, lp:   0.0000 mean dev:   0.0000 RMS:   0.0000 conf:   1.0000
INFO  [ecl/validation] sensor #2, prio: 1, state: OK
INFO  [ecl/validation]  val: 994.3900, lp: 994.4074 mean dev:  -0.0008 RMS:   0.0311 conf:   1.0000
INFO  [ecl/validation]  val:  37.0500, lp:  37.0383 mean dev:   0.0059 RMS:   0.0296 conf:   1.0000
INFO  [ecl/validation]  val:   0.0000, lp:   0.0000 mean dev:   0.0000 RMS:   0.0000 conf:   1.0000
INFO  [sensors] Temperature Compensation:
INFO  [sensors]  gyro: enabled: 0
INFO  [sensors]  accel: enabled: 0
INFO  [sensors]  baro: enabled: 0
INFO  [sensors] Airspeed status:
INFO  [ecl/validation]  no data
INFO  [vehicle_acceleration] selected sensor: 1
INFO  [vehicle_angular_velocity] selected sensor: 1
INFO  [vehicle_angular_velocity] using sensor_gyro_control: 3670026 (1)
nsh> work_queue status

Work Queue: 10 threads                      RATE        INTERVAL
|__ 1) wq:rate_ctrl
|   \__ 1) vehicle_angular_velocity    989.1 Hz       1011.1 us
|__ 2) wq:att_pos_ctrl
|   |__ 1) ekf2                        247.8 Hz       4035.7 us
|   \__ 2) vehicle_acceleration        247.8 Hz       4035.5 us
|__ 3) wq:I2C3
|   \__ 1) ms5611                      100.0 Hz       9999.1 us
|__ 4) wq:I2C4
|   |__ 1) bmp388                       23.1 Hz      43297.3 us (43300 us)
|   |__ 2) bmp388                       23.1 Hz      43298.3 us (43300 us)
|   \__ 3) bmm150                       76.7 Hz      13042.3 us
|__ 5) wq:SPI3
|   |__ 1) bmi088                     1249.9 Hz        800.1 us (800 us)
|   \__ 2) bmi088                     1666.5 Hz        600.1 us (600 us)
|__ 6) wq:SPI2
|   \__ 1) ism330dlc                   999.9 Hz       1000.1 us (1000 us)
|__ 7) wq:SPI1
|   \__ 1) mpu6000                    1249.9 Hz        800.1 us (800 us)
|__ 8) wq:hp_default
|   |__ 1) adc                           0.0 Hz          0.0 us
|   \__ 2) tone_alarm                   10.0 Hz      99811.8 us
|__ 9) wq:I2C1
|   |__ 1) ist8310                      93.2 Hz      10727.6 us
|   \__ 2) rgbled                       38.4 Hz      26020.8 us
\__ 10) wq:lp_default
    \__ 1) load_mon                      1.0 Hz     997506.3 us (1000000 us)

NuttShell (NSH)
nsh> INFO  [ecl/EKF] EKF aligned, (pressure height, IMU buf: 22, OBS buf: 14)

nsh> free
             total       used       free    largest
Umem:       460928     185248     275680     275264
nsh>


@davids5 davids5 force-pushed the master_v5x_sensors branch 3 times, most recently from 9d38f66 to 6126406 Compare November 26, 2019 12:39
@mrpollo mrpollo requested a review from a team November 27, 2019 16:19
@mrpollo
Copy link
Contributor

mrpollo commented Nov 27, 2019

@PX4/testflights Please test on Durandal. sdlog profile sensor comparison

@davids5 davids5 changed the title [WIP Do NOT MERGE] v5x sensors v5x sensors Nov 27, 2019
@davids5 davids5 force-pushed the master_v5x_sensors branch from b5ea3d1 to d892199 Compare December 3, 2019 19:31
@davids5
Copy link
Member Author

davids5 commented Dec 3, 2019

@dagar - this is rebased on master and the ST ISM330DLC IMU driver is updated. Let Bring it now!

@dagar dagar merged commit feaa657 into master Dec 3, 2019
@dagar dagar deleted the master_v5x_sensors branch December 3, 2019 21:17
@dagar dagar mentioned this pull request Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants