My experience with DWA planner is that it does not perform in place rotations unless it really really needs to (gives a high cost for in-place rotation I'm guessing). If given a certain type of rotation goal, it may sometimes calculate that it is better to reverse and move forward to achieve the rotation goal. You can think of it as behaving similarly to a car. As far as I know, there was no known way to tune DWA planner such that it would optimize on in-place rotations (hopefully someone can answer otherwise). If you require a more specific and deterministic local planner, I would recommend writing your own simple planner unless you are ok with the car-like behaviour of DWA local planner.
Regarding your second question, the local map not clearing has nothing to do with DWA planner. Please have a look at your move_base config and double check the settings for your local costmap. You can check the update_frequency
and the publish_frequency
parameters. Also make sure your Transforms are setup correctly and that your data source for the costmap (eg: lidar) is outputting data properly.
Hope that helps.
Originally posted by hashirzahir with karma: 228 on 2020-04-17
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by Yehor on 2020-04-17:
@hashirzahir what navigator so you suggest for differential drive robot?
Comment by hashirzahir on 2020-04-17:
This is quite a generic question. Perhaps you could state your use case. For example, it you are in a static environment (no moving obstacles) and you have a good local costmap that you can rely on, I don't see the need for obstacle avoidance infused local planners. Of course safety is another concern. Otherwise, I would recommend just writing your own path following algorithm (eg: Pure Pursuit) that can follow the obstacle free path provided by the global path planner. So the task becomes outputting a set of velocities given a fixed path. This isn't as hard as it sounds for simple scenarios.
However, if you are in a situation where your robot interacts with moving obstacles and other humans, I would strongly recommend sticking to DWA planner as it does offer very useful real time obstacle avoidance. In my experience, the robot has not yet hit any obstacle that could be seen in the local costmap when using DWA planner (given sufficient compute power).
Comment by Yehor on 2020-04-17:
@hashirzahir Sorry, for too many questions. But how do you think, Jetson Nano is it enough for that task with DWA?
Comment by hashirzahir on 2020-04-17:
It would be really helpful if you answered the earlier questions. Please state your use case otherwise it is very hard to answer your question.
I have used the jetson Nano, but its GPU is the selling point, not its CPU (i.e. better for Deep Learning, Machine Learning stuff). There are so many questions I need to ask before I can answer this. Please tell me your use case. And exactly what processes will be running on the Jetson Nano. If the Nano will only be running the Dwa and nothing else (the navigation and lidar driver stack running on another SBC), then it should be fine. But if you are running your whole ROS and navigation stack with lidar data on your Jetson Nano, I think you will find it quite "slow", meaning that the system is not able to output velocity commands fast enough and it can result in very erratic behaviour and may even crash into something.
Comment by Yehor on 2020-04-18:
@hashirzahir I future I want to use that robot with the dynamic obstacles. But for now, I want to at least achieve stable navigation on a static map.
Ideally, I planned to use Jetson nano for the whole system. And it is very sad that that's will be not enough. But what did you mean when you say to run only DWA and nothing else. (Does it mean to run move_base node on Jetson nano?).
Thank you very much for your answers! It is really very helpful for me.
Comment by hashirzahir on 2020-04-18:
Yes running only the move base node on the jetson nano should not be a problem. But the nano is not good at handling multiple CPU intensive tasks since it only has a low spec ARM processor.
Comment by Yehor on 2020-04-18:
@hashirzahir Thank you, do you have any suggestions for that. Maybe Raspberry 4 Pi would be better?
Can I ask one more question? Is it possible to for example run the only global_planner and follow the trajectory which is produced? I mean without local_planner?
Comment by Yehor on 2020-04-18:
@hashirzahir I also found the problem, I have changed the parameters of DWA planner min_vel_trans: to 0.0, and it seemed to solve the problem. However, probably because of the luck of CPU on Jetson Nano I lose the map update loop frequently.
Comment by hashirzahir on 2020-04-18:
Good for you. I generally would avoid ARM based SBCs. I dont think the raspi 4 is that much better (but I personally have not tried it out, maybe it will be decent). I would recommend x86 based chips as their CPUs are generally better for handling these tasks. Personally, I used an Udoo x86 intel celeron chip that costed around $200-300 and it was able to run all our nodes in 1 SBC, and even then almost all 8 cores were at max load. This is partially because we had a very difficult use case and there were around 6 sensors loaded on board and it had localization, obstacle avoidance, as well as some autonomy algorithms all running on board. And even then, maybe the update rate of move base was less than 5.0hz, which is not that great. If you have the money, I would recommend the Intel NUC (i3/i5/i7), which serious roboticists with strong computational requirements generally use.