-
Notifications
You must be signed in to change notification settings - Fork 19.6k
AP_ExternalAHRS: Add driver for Kebni SensAItion as External AHRS #31305
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
base: master
Are you sure you want to change the base?
AP_ExternalAHRS: Add driver for Kebni SensAItion as External AHRS #31305
Conversation
Supports SensAItion running in two modes: IMU (in principle gyro, accelerometer and magnetometer) and AHRS (also adds quaternion for attitude). The SensAItion driver is partitioned into a parser class (for simpler unit testing) and an interface class. Includes unit tests and SITL tests.
To help with the review, here is the suggested documentation to add to the wiki when the pull request is approved: Kebni SensAItion External AHRSThe Kebni SensAItion range includes three sensor models:
For easier integration into various customer applications, each model exists in two hardware versions: a rugged version in an IP67 aluminium housing or a low-profile OEM version that can easily be mounted on an application-specific circuit board. Details and specifications for each model can be found on Kebni's product homepage. For now, the SensAItion External AHRS driver only supports using the SensAItion sensor to feed measurement values to the ArduPilot EKF3 estimator, so it is suffient to use the IMU model of SensAItion. If using the AHRS version, the estimated orientation quaternion will be available in ArduPilot but not used in the EKF3. There is currently no support for the INS version. Hardware setupConnect the SensAItion Data UART pins (TX, RX and ground) to an available serial port on the ArduPilot platform, such as GPS or TELEM. Power the sensor as described in the User Manual. Both the rugged and OEM version of the sensor have the required serial port connections available. Please note that the rugged sensor version has output voltage levels +/-5 V, while the OEM sensor version has output voltage levels of 0 and +3.3 V. The SensAItion sensor can be mounted in any orientation and the output can be rotated to match the local coordinate system if needed - see the configuration section below. As with any IMU, it is important to avoid excessive vibration levels and it is beneficial to use a mechanical damper between the sensor and the platform frame. Configuration of the sensorThe SensAItion sensor has a number of configuration registers that control the baudrate, output data format, coordinate system rotation and much more. The configuration registers can be read and written using a text-based protocol via the User UART port as described in the User Manual. But Kebni also provides, on request, the Kebni INSight graphical user interface that helps the user set all configuration registers and can also be used to read and plot sensor data and perform a magnetometer calibration. For complete control of the sensor configuration, it is recommended to use INSight. Contact Kebni for access to the User Manual or Kebni INSight. To get started with the default configuration, it is sufficient to connect to the User UART port of the sensor with a terminal program. Start by doing a factory reset of all configuration registers, saving to flash and doing a reboot:
After getting a reboot message from the sensor, send the following commands to enable Data UART output and set the baudrate to 460800:
For an IMU sensor, send the following command that sets an output rate of 1000 Hz and determines the contents of each message (acceleration, gyro rates, temperature, magnetic field and air pressure):
For an AHRS sensor, send the following command that includes all of the above but with reduced output rate of 500 Hz, together with the orientation quaternion in each message:
Then save the updated register values to flash and reboot to make them active:
Configuration of ArduPilotThe following parameters must be set:
Also remember to build the ArduPilot binary with the flags |
I don't understand the need to for the IMU vs AHRS option. For mission planner, the meta-data is generated from master, so once its merged it will turn up. |
…nal AHRS. Fix Lint/Build Errors.
…nal AHRS. Fix esp32 build errors.
Supports SensAItion running in two modes: IMU (in principle gyro, accelerometer and magnetometer) and AHRS (also adds quaternion for attitude).
The SensAItion driver is partitioned into a parser class (for simpler unit testing) and an interface class. Includes unit tests and SITL tests, which have been confirmed to run without errors.
We also have two open issues that we'd like to discuss: