RoboMaster / RoboRTS

An open source software stack for Real-Time Strategy research on mobile robots
Other
823 stars 347 forks source link

something wring in teb_local_planner.cpp #34

Closed lyziew closed 5 years ago

lyziew commented 5 years ago

in teb_local_planner.cpp i try print 'robot_inscribedradius' and 'robot_circumscribedradius' ` bool feasible = optimal->IsTrajectoryFeasible(teb_errorinfo, robotcost.get(), robotfootprint, robot_inscribedradius, robot_circumscribed_radius, fesiable_step_lookahead); ROS_INFO("Footprint %f, %f", robot_inscribedradius, robot_circumscribed_radius); ` the result is that Selection_007 so i am sure robot_inscribedradius and robot_circumscribed_radius calculate wrong

XYvven commented 5 years ago

hi,guy. this two value are not used for feasible checking(because the robot footprint I used is point), and I intialize the robot_inscribedradius with std::numeric_limits::max() initialize the robot_circumscribed_radius with 0.0. so when you print out it is what you see in the picture.

lyziew commented 5 years ago

谢谢你的回复,我尝试添加dynamic obstacle 功能添加到现有框架上,然后发现我修改后的代码一直出现 trajectory is not feasible的错误,于是尝试打印这两个值查看一下,发现一个很大的值误以为是没有初始化的量,我在仔细检查一下footprint初始化那部分代码,再次感谢您的回复

lyziew commented 5 years ago

我看代码时没仔细看,从costmap里取到的footprint并没有用到而是使用了机器人位置的点作为footprint,这里为什么使用点模型而不使用多边形,我使用的是从costmap中获取的polygon(四个点),但是效果不好,一直会轨迹不可达,很迷

XYvven commented 5 years ago

因为在实际从world到map,会有一些精度损失,而在优化中设置的与障碍物的距离很近,这些精度损失就会导致实际在costmap中查询四边形的点的时候导致not feasible,另外在costmap的配置文件中,inflation_layer_config_min.prototxt里面的inflation值是直径,如果你使用四个点的话就是在c space里面使用多边形,那肯定会not feasible。所以实际情况中就使用了point计算

lyziew commented 5 years ago

I get it, thanks very much