From 2be999f91c4d696daa69bbbb695a9ebd91887610 Mon Sep 17 00:00:00 2001 From: Ethan <jiaao@student.unimelb.edu.au> Date: Tue, 21 May 2024 11:58:50 +0800 Subject: [PATCH] contraint on kalman and image --- catkin_ws/src/asclinic_pkg/src/Kalman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catkin_ws/src/asclinic_pkg/src/Kalman.cpp b/catkin_ws/src/asclinic_pkg/src/Kalman.cpp index eb21fdf1..e48102a4 100644 --- a/catkin_ws/src/asclinic_pkg/src/Kalman.cpp +++ b/catkin_ws/src/asclinic_pkg/src/Kalman.cpp @@ -149,7 +149,7 @@ void ImageAnswer(const asclinic_pkg::position& msg) { //ROS_INFO_STREAM("new_pose: " << new_pose); - if (std::isnan(new_pose(0)) || std::isnan(new_pose(1)) || std::isnan(new_pose(2))||new_pose(0)<-2 ||new_pose(1)<-4||std::abs(odo_position[0]-new_pose[0])>1.5||std::abs(odo_position[1]-new_pose[1]>1.5)) { + if (std::isnan(new_pose(0)) || std::isnan(new_pose(1)) || std::isnan(new_pose(2))||new_pose(0)<-2 ||new_pose(1)<-4||std::abs(odo_position(0)-new_pose(0))>1.5||std::abs(odo_position(1)-new_pose(1)>1.5)) { x = odo_position(0); y = odo_position(1); phi = odo_position(2); -- GitLab