mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-26 02:28:29 -04:00
AP_VisualOdom: front-end implements handle_vision_position_estimate with eulers
This commit is contained in:
parent
3530d5b348
commit
a41b169635
@ -131,7 +131,10 @@ void AP_VisualOdom::handle_vision_position_estimate(uint64_t remote_time_us, uin
|
||||
|
||||
// call backend
|
||||
if (_driver != nullptr) {
|
||||
_driver->handle_vision_position_estimate(remote_time_us, time_ms, x, y, z, roll, pitch, yaw);
|
||||
// convert attitude to quaternion and call backend
|
||||
Quaternion attitude;
|
||||
attitude.from_euler(roll, pitch, yaw);
|
||||
_driver->handle_vision_position_estimate(remote_time_us, time_ms, x, y, z, attitude);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,15 +35,6 @@ bool AP_VisualOdom_Backend::healthy() const
|
||||
return ((AP_HAL::millis() - _last_update_ms) < AP_VISUALODOM_TIMEOUT_MS);
|
||||
}
|
||||
|
||||
// general purpose method to send position estimate data to EKF
|
||||
// distances in meters, roll, pitch and yaw are in radians
|
||||
void AP_VisualOdom_Backend::handle_vision_position_estimate(uint64_t remote_time_us, uint32_t time_ms, float x, float y, float z, float roll, float pitch, float yaw)
|
||||
{
|
||||
Quaternion attitude;
|
||||
attitude.from_euler(roll, pitch, yaw);
|
||||
handle_vision_position_estimate(remote_time_us, time_ms, x, y, z, attitude);
|
||||
}
|
||||
|
||||
// general purpose method to send position estimate data to EKF
|
||||
void AP_VisualOdom_Backend::handle_vision_position_estimate(uint64_t remote_time_us, uint32_t time_ms, float x, float y, float z, const Quaternion &attitude)
|
||||
{
|
||||
|
@ -33,7 +33,6 @@ public:
|
||||
|
||||
// general purpose methods to consume position estimate data and send to EKF
|
||||
// distances in meters, roll, pitch and yaw are in radians
|
||||
void handle_vision_position_estimate(uint64_t remote_time_us, uint32_t time_ms, float x, float y, float z, float roll, float pitch, float yaw);
|
||||
void handle_vision_position_estimate(uint64_t remote_time_us, uint32_t time_ms, float x, float y, float z, const Quaternion &attitude);
|
||||
|
||||
// calibrate camera attitude to align with vehicle's AHRS/EKF attitude
|
||||
|
Loading…
Reference in New Issue
Block a user