The new path planner(ftc_local_planner) can't work with hector_mapping together
Hi, all, this question is similiar to the question we have asked here. But we found new situations, so we change the subject and ask a new question here.
We are using hector mapping and move_base to implement an online mapping and path planning. We changed the combination of global planner and local planner.
If the global planner is "navfn/NavfnROS", the local planner is dwa_local_planner, the robot moves fine and builds the map, although the terminal outputs following warning.
[ WARN] [1500425881.365911556, 793.010000000]: Control loop missed its desired rate of 4.0000Hz... the loop actually took 0.5200 seconds
[ INFO] [1500425881.365978957, 793.010000000]: Got new plan
[ WARN] [1500425881.784682569, 793.430000000]: Control loop missed its desired rate of 4.0000Hz... the loop actually took 0.4200 seconds
Then if the local planner is "ftc_local_planner/FTCPlanner", the global planner is navfn or other methods (We tested a linear global planner programmed by us). The robot almost doesn't move(only with rotation in place sometimes), and the following warning outputs. We also decreased the update frequency of costmap and the control frequency, but it didn't work.
[ WARN] [1500431832.147879220, 6740.630000000]: Map update loop missed its desired rate of 1.0000Hz... the loop actually took 21.1200 seconds
[ WARN] [1500431854.738732473, 6763.210000000]: Control loop missed its desired rate of 4.0000Hz... the loop actually took 22.5800 seconds
[ WARN] [1500431854.738900263, 6763.210000000]: Map update loop missed its desired rate of 1.0000Hz... the loop actually took 21.5800 seconds
We also tried other slam package like karto. The robot works fine.
So it seems that the combination of hector mapping with ftc_local_planner can't work together, we wonder why the robot can't translate when the mapping method is hector and the local planner is ftc_local_planner.
Can anyone who is familiar with move_base give us advices?
Thanks!
EDIT 1
For experiments in simulator(gazebo), the hardware is with Intel® Core™ i5-6500 CPU @ 3.20GHz × 4 , memory is 15.6 GiB. We thinks such hardware is totally enough for running hector and ftc_local_planner. So it is so weird that the above warning information is output. As I am told from some questions in answers.ros.org , this is usually because the CPU power or memory is not enough for running such packages.
EDIT 2
Hi,@FelixMarek. Thank you for your advices! After by adding the time calculation into the source code in sereral different places. We found that the most time-consumed part is the function getXPose in transform_global_plan.cpp. When running with hector mapping, It takes about 0.10 seconds for obtainning the transform between the goal_pose and global_frame. Since getXpose is often called by other functions, so the accumulative time is so much that blocks the execution.
However, when running with other mapping pacakges such as gmapping, karto, It takes almost no time (actually 0.0000 seconds) to obtain the transform between the goal_pose and global _frame. Do you know why? We can change the ...
as I understand you are trying to simultaneously map and navigate. have you tried using amcl with a previously built map?
Thank you! We didn't use amcl with a previously built map. In this case, a map server is enough. How the map is built is not important. So the mapping packages don't need to be launched.
Yes, that is the idea. But I was actually wondering if your objective is indeed building a map while navigating?
Our objective is not only building a map. The robot also have to finish other tasks such as cleaning room(with coverage path planning) like cleaner vacuum robot. So the tasks and map building are running at the same time. We also obtain the robot's pose from map building to guide the path planning.
Have you tried hector_navigation?
No. Actually we also considerd hector_move_base_navigation which uses their own move_base node. But we think even if we run them successfully, we can't use the specified planner, our problem is not solved either
We think the key to solve this problem is: how to modify the move_base(or the planner) or hector mapping to make them work together successfully.
Edit my answer