forked from Archive/PX4-Autopilot
PositionControl: publish NAN jerk
because the controller does not read or write jerk
This commit is contained in:
parent
5055fec796
commit
cb484c5ac7
|
@ -246,6 +246,7 @@ void PositionControl::getLocalPositionSetpoint(vehicle_local_position_setpoint_s
|
|||
local_position_setpoint.vy = _vel_sp(1);
|
||||
local_position_setpoint.vz = _vel_sp(2);
|
||||
_acc_sp.copyTo(local_position_setpoint.acceleration);
|
||||
nans<3, 1>().copyTo(local_position_setpoint.jerk);
|
||||
_thr_sp.copyTo(local_position_setpoint.thrust);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ TEST(PositionControlTest, EmptySetpoint)
|
|||
EXPECT_FLOAT_EQ(output_setpoint.vy, 0.f);
|
||||
EXPECT_FLOAT_EQ(output_setpoint.vz, 0.f);
|
||||
EXPECT_EQ(Vector3f(output_setpoint.acceleration), Vector3f(0.f, 0.f, 0.f));
|
||||
EXPECT_EQ(Vector3f(output_setpoint.jerk), Vector3f(0.f, 0.f, 0.f));
|
||||
EXPECT_EQ(Vector3f(output_setpoint.jerk), Vector3f(NAN, NAN, NAN));
|
||||
EXPECT_EQ(Vector3f(output_setpoint.thrust), Vector3f(0, 0, 0));
|
||||
|
||||
vehicle_attitude_setpoint_s attitude{};
|
||||
|
|
Loading…
Reference in New Issue