Skip to content

Commit

Permalink
tests: send correct drone attitude measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeLaine authored and bkueng committed Jan 17, 2024
1 parent 9dbb37a commit 736f925
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions px4_ros2_cpp/test/integration/local_navigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ TEST_F(LocalPositionInterfaceTest, fuseEvVel) {

TEST_F(LocalPositionInterfaceTest, fuseEvYaw) {
auto measurement = std::make_unique<LocalPositionMeasurement>();
measurement->attitude_quaternion = Eigen::Quaternionf {1.0F, 0.0F, 0.0F, 0.0F};
measurement->attitude_quaternion =
Eigen::Quaternionf(Eigen::AngleAxisf(M_PI_2, Eigen::Vector3f::UnitZ())); // East
measurement->attitude_variance = Eigen::Vector3f {0.1F, 0.1F, 0.1F};

waitForMeasurementUpdate(
Expand All @@ -159,7 +160,8 @@ TEST_F(LocalPositionInterfaceTest, fuseAll) {
measurement->velocity_xy_variance = Eigen::Vector2f {0.1F, 0.1F};
measurement->velocity_z = 0.0F;
measurement->velocity_z_variance = 0.1F;
measurement->attitude_quaternion = Eigen::Quaternionf {1.0F, 0.0F, 0.0F, 0.0F};
measurement->attitude_quaternion =
Eigen::Quaternionf(Eigen::AngleAxisf(M_PI_2, Eigen::Vector3f::UnitZ())); // East
measurement->attitude_variance = Eigen::Vector3f {0.1F, 0.1F, 0.1F};

waitForMeasurementUpdate(
Expand Down

0 comments on commit 736f925

Please sign in to comment.