AP_Vehicle: add visual odometry

This commit is contained in:
Randy Mackay 2020-04-06 13:12:11 +09:00
parent 1b1687f43d
commit d1aa3858f0
2 changed files with 16 additions and 0 deletions

View File

@ -19,6 +19,13 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = {
// @Path: ../AP_GyroFFT/AP_GyroFFT.cpp
AP_SUBGROUPINFO(gyro_fft, "FFT_", 2, AP_Vehicle, AP_GyroFFT),
#endif
#if HAL_VISUALODOM_ENABLED
// @Group: VISO
// @Path: ../AP_VisualOdom/AP_VisualOdom.cpp
AP_SUBGROUPINFO(visual_odom, "VISO", 3, AP_Vehicle, AP_VisualOdom),
#endif
AP_GROUPEND
};
@ -90,6 +97,10 @@ void AP_Vehicle::setup()
#if HAL_HOTT_TELEM_ENABLED
hott_telem.init();
#endif
#if HAL_VISUALODOM_ENABLED
// init library used for visual position estimation
visual_odom.init();
#endif
#if AP_PARAM_KEY_DUMP
AP_Param::show_all(hal.console, true);

View File

@ -39,6 +39,7 @@
#include <AP_Hott_Telem/AP_Hott_Telem.h>
#include <AP_ESC_Telem/AP_ESC_Telem.h>
#include <AP_GyroFFT/AP_GyroFFT.h>
#include <AP_VisualOdom/AP_VisualOdom.h>
class AP_Vehicle : public AP_HAL::HAL::Callbacks {
@ -231,6 +232,10 @@ protected:
AP_Hott_Telem hott_telem;
#endif
#if HAL_VISUALODOM_ENABLED
AP_VisualOdom visual_odom;
#endif
AP_ESC_Telem esc_telem;
static const struct AP_Param::GroupInfo var_info[];