Skip to content
Snippets Groups Projects
Commit 2be999f9 authored by Jiaao Liu's avatar Jiaao Liu
Browse files

contraint on kalman and image

parent aa6f3894
Branches
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment