From 3c21c5ea714ca05cacdfc4df015b74916ae57ecf Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Thu, 8 Dec 2022 11:44:02 +0300 Subject: [PATCH] Add test for set_rates thrust output --- clover/test/offboard.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clover/test/offboard.py b/clover/test/offboard.py index 1a009c02..a5c911c8 100755 --- a/clover/test/offboard.py +++ b/clover/test/offboard.py @@ -105,7 +105,7 @@ def test_offboard(node): assert msg.thrust == approx(0.5) # test set_rates - res = set_rates(roll_rate=nan, pitch_rate=nan, yaw_rate=0.3, thrust=0.5) + res = set_rates(roll_rate=nan, pitch_rate=nan, yaw_rate=0.3, thrust=0.6) assert res.success == True state = get_state() assert state.mode == State.MODE_RATES @@ -113,7 +113,9 @@ def test_offboard(node): assert state.roll_rate == approx(0) assert state.pitch_rate == approx(0) assert state.yaw_rate == approx(0.3) - assert state.thrust == approx(0.5) + assert state.thrust == approx(0.6) + msg = rospy.wait_for_message('/mavros/setpoint_raw/attitude', mavros_msgs.msg.AttitudeTarget, timeout=3) + assert msg.thrust == approx(0.6) res = set_rates(roll_rate=0.3, pitch_rate=0.2, yaw_rate=0.1, thrust=0.4) assert res.success == True