Skip to content

Commit 731b3fb

Browse files
committed
fix test_ros_robot_localization_listener
1 parent 926a4e4 commit 731b3fb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/ros_robot_localization_listener.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ bool RosRobotLocalizationListener::getState(
494494

495495
// Rotate the covariance
496496
covariance.block<POSE_SIZE, POSE_SIZE>(POSITION_OFFSET, POSITION_OFFSET) =
497-
rot_6d * estimator_state.covariance.eval() * rot_6d.transpose();
497+
rot_6d * estimator_state.covariance.block<POSE_SIZE, POSE_SIZE>(
498+
POSITION_OFFSET, POSITION_OFFSET) * rot_6d.transpose();
498499

499500
return true;
500501
}

test/test_ros_robot_localization_listener.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,13 @@ int main(int argc, char ** argv)
125125

126126
g_listener = std::make_unique<robot_localization::RosRobotLocalizationListener>(node);
127127

128-
testing::InitGoogleTest(&argc, argv);
128+
::testing::InitGoogleTest(&argc, argv);
129129

130130
int res = RUN_ALL_TESTS();
131131

132+
rclcpp::shutdown();
133+
node = nullptr;
134+
g_listener = nullptr;
135+
132136
return res;
133137
}

0 commit comments

Comments
 (0)