2023-10-07 07:04:56 -03:00
|
|
|
/*
|
|
|
|
external control library for rover
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_ExternalControl/AP_ExternalControl.h>
|
|
|
|
|
|
|
|
#if AP_EXTERNAL_CONTROL_ENABLED
|
|
|
|
|
2024-05-01 16:43:49 -03:00
|
|
|
class AP_ExternalControl_Rover : public AP_ExternalControl
|
|
|
|
{
|
2023-10-07 07:04:56 -03:00
|
|
|
public:
|
|
|
|
/*
|
|
|
|
Set linear velocity and yaw rate. Pass NaN for yaw_rate_rads to not control yaw.
|
|
|
|
Velocity is in earth frame, NED [m/s].
|
|
|
|
Yaw is in earth frame, NED [rad/s].
|
|
|
|
*/
|
2023-10-30 21:18:58 -03:00
|
|
|
bool set_linear_velocity_and_yaw_rate(const Vector3f &linear_velocity, float yaw_rate_rads)override WARN_IF_UNUSED;
|
2024-05-01 16:43:49 -03:00
|
|
|
|
|
|
|
/*
|
|
|
|
Sets the global position for loiter point
|
|
|
|
*/
|
|
|
|
bool set_global_position(const Location& loc) override WARN_IF_UNUSED;
|
|
|
|
|
2023-10-07 07:04:56 -03:00
|
|
|
private:
|
|
|
|
/*
|
|
|
|
Return true if Rover is ready to handle external control data.
|
|
|
|
Currently checks mode and arm states.
|
|
|
|
*/
|
2023-10-30 21:18:58 -03:00
|
|
|
bool ready_for_external_control() WARN_IF_UNUSED;
|
2023-10-07 07:04:56 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // AP_EXTERNAL_CONTROL_ENABLED
|