-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICM20602: new standalone driver (8 kHz gyro, 4 kHz accel)
- uses the FIFO and SPI DMA - currently implemented on px4_fmu-v4 only - clip counters - new low pass filter that operates on an array of data (LowPassFilter2pArray) - new sensor messages for better visibility - sensor_{accel, gyro}_fifo: full raw data for optional logging and analysis - sensor_{accel, gyro}_status: metadata, clipping, etc - sensor_{accel, gyro}_integrated: delta angles and delta velocities - eventually these will replace the existing sensor_{accel, gyro} monolith
- Loading branch information
Showing
33 changed files
with
1,786 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
# WARNING: Not recommend for custom development. | ||
# This topic is part of an incremental refactoring of the sensor pipeline and will likely disappear post PX4 release v1.10 | ||
|
||
uint32 device_id # unique device ID for the sensor that does not change between power cycles | ||
|
||
uint64 timestamp # time since system start (microseconds) | ||
|
||
uint64 timestamp_sample # time the raw data was sampled (microseconds) | ||
|
||
float32[3] xyz # filtered angular velocity in the board axis in rad/s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
uint32 device_id # unique device ID for the sensor that does not change between power cycles | ||
|
||
uint64 timestamp_sample # time since system start (microseconds) | ||
|
||
float32 dt # delta time between samples (microseconds) | ||
float32 scale | ||
|
||
uint8 samples # number of valid samples | ||
|
||
int16[8] x # angular velocity in the NED X board axis in rad/s | ||
int16[8] y # angular velocity in the NED Y board axis in rad/s | ||
int16[8] z # angular velocity in the NED Z board axis in rad/s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
uint32 device_id # unique device ID for the sensor that does not change between power cycles | ||
|
||
uint64 timestamp # time since system start (microseconds) | ||
uint64 timestamp_sample # time since system start (microseconds) | ||
|
||
uint16 dt # integration time (microseconds) | ||
|
||
float32[3] delta_velocity # delta velocity in the NED frame in m/s over the integration time frame (dt) | ||
|
||
bool clipping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
uint32 device_id # unique device ID for the sensor that does not change between power cycles | ||
|
||
uint64 error_count | ||
|
||
float32 temperature | ||
|
||
uint8 rotation | ||
|
||
# clipping per axis? | ||
uint64[3] clipping | ||
|
||
uint16 measure_rate | ||
uint16 sample_rate | ||
|
||
float32 full_scale_range | ||
|
||
float32 high_frequency_vibration # high frequency vibration level in the IMU delta angle data (rad) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
uint32 device_id # unique device ID for the sensor that does not change between power cycles | ||
|
||
uint64 timestamp # time since system start (microseconds) | ||
uint64 timestamp_sample # time since system start (microseconds) | ||
|
||
float32 dt # delta time between samples (microseconds) | ||
float32 scale | ||
|
||
uint8 samples # number of valid samples | ||
|
||
int16[32] x # angular velocity in the NED X board axis in rad/s | ||
int16[32] y # angular velocity in the NED Y board axis in rad/s | ||
int16[32] z # angular velocity in the NED Z board axis in rad/s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
uint32 device_id # unique device ID for the sensor that does not change between power cycles | ||
|
||
uint64 timestamp # time since system start (microseconds) | ||
uint64 timestamp_sample # time since system start (microseconds) | ||
|
||
uint16 dt # integration time (microseconds) | ||
|
||
float32[3] delta_angle # delta angle in the NED frame in rad/s over the integration time frame (integral_dt) | ||
|
||
bool clipping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
uint64 timestamp # time since system start (microseconds) | ||
uint32 device_id # unique device ID for the sensor that does not change between power cycles | ||
|
||
uint64 error_count | ||
|
||
float32 temperature | ||
|
||
uint8 rotation | ||
|
||
# clipping per axis? | ||
uint64[3] clipping | ||
|
||
uint16 measure_rate | ||
uint16 sample_rate | ||
|
||
float32 full_scale_range | ||
|
||
float32 coning_vibration # Level of coning vibration in the IMU delta angles (rad^2) | ||
|
||
float32 high_frequency_vibration # high frequency vibration level in the IMU delta angle data (rad) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
############################################################################ | ||
# | ||
# Copyright (c) 2019 PX4 Development Team. All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in | ||
# the documentation and/or other materials provided with the | ||
# distribution. | ||
# 3. Neither the name PX4 nor the names of its contributors may be | ||
# used to endorse or promote products derived from this software | ||
# without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | ||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | ||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
############################################################################ | ||
|
||
px4_add_module( | ||
MODULE drivers__imu__icm20602 | ||
MAIN icm20602 | ||
COMPILE_FLAGS | ||
SRCS | ||
ICM20602.cpp | ||
ICM20602.hpp | ||
icm20602_main.cpp | ||
DEPENDS | ||
drivers_accelerometer | ||
drivers_gyroscope | ||
px4_work_queue | ||
) |
Oops, something went wrong.