changes to stacked and vel
This commit is contained in:
parent
ede403613d
commit
be4040adc5
|
|
@ -110,7 +110,18 @@ impl DroneController for StackedController {
|
||||||
let angular_rate_setpoint = if self.input.mode != ModeInput::Acro {
|
let angular_rate_setpoint = if self.input.mode != ModeInput::Acro {
|
||||||
let rotation_setpoint = if self.input.mode != ModeInput::Rotation {
|
let rotation_setpoint = if self.input.mode != ModeInput::Rotation {
|
||||||
let lin_accel_setpoint = if self.input.mode != ModeInput::Acceleration {
|
let lin_accel_setpoint = if self.input.mode != ModeInput::Acceleration {
|
||||||
panic!("Not Implemented")
|
let lin_vel_setpoint: Velocity = if self.input.mode != ModeInput::Velocity {
|
||||||
|
println!("LAYER NOT IMPLENETED. TAKING 0 AS INPUT;");
|
||||||
|
Velocity(na::Vector3::zeros())
|
||||||
|
} else {
|
||||||
|
Velocity(na::vector![
|
||||||
|
self.input.velocity.x,
|
||||||
|
self.input.velocity.y,
|
||||||
|
self.input.velocity.z
|
||||||
|
])
|
||||||
|
};
|
||||||
|
self.linvel_rt
|
||||||
|
.update(lin_vel_setpoint, &self.drone_state, frame_dt)
|
||||||
} else {
|
} else {
|
||||||
Acceleration(na::vector![
|
Acceleration(na::vector![
|
||||||
self.input.acceleration.x,
|
self.input.acceleration.x,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ pub enum MotorMixingMode {
|
||||||
}
|
}
|
||||||
impl Default for MotorMixingMode {
|
impl Default for MotorMixingMode {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::ThrottleAuthorityReasonable { min_scale: 0.1 }
|
Self::ThrottleAuthorityReasonable { min_scale: 0.05 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue