ros-navigation / navigation2_tutorials

Tutorial code referenced in https://docs.nav2.org/
184 stars 124 forks source link

Add nav2 rrtconnect planner plugin #2

Closed shivaang12 closed 3 years ago

shivaang12 commented 4 years ago
shivaang12 commented 4 years ago

What's the speed of this? For instance, across the map in https://github.com/turtlebot/turtlebot_apps/tree/indigo/turtlebot_navigation/maps. Can you post some example paths for me to visualize?

I do have a youtube video if that helps! https://youtu.be/MSy7WAE_xz4

shivaang12 commented 4 years ago

A value point in sampling based is to have state - you should use a costmap model and check the validity of the footprint so it works with non-circular robots. A value prop on OMPL is using many planners easily (https://github.com/windelbouwman/move-base-ompl/blob/master/src/ompl_global_planner.cpp#L308) you should parameterize some enum to expose all to a user. Its a 5 minute task that could be really helpful if RRT connect isnt the right solution.

I thing this would be a great addition. Actually I was planning on doing these after this PR gets through. But I have no problem of doing it now.

SteveMacenski commented 4 years ago

If you make a chrono timer (https://learntechway.com/simple-timer-in-c-using-chrono-library/) on the start and end of your callback you can get actual metrics on speed

shivaang12 commented 4 years ago

That would be mean: 8481.04 max: 23855.0 min: 1922.0 all in microseconds

SteveMacenski commented 4 years ago

Ok, that's a pretty short path which isn't really indicative of much. My recommendation is to use that willow map I linked you to. In the launch files, you can change the TB3 world to that. As a hack, you can remove the obstacle/voxel layers so you have only the static and inflation layers. Then you can launch everything and test a few paths (though the robot will try to move through the TB3 world and eventually crash or something, so only good for quick tests. I've been doing that this week for some quick prototyping on planning).

For a benchmark, NavFn takes about 12-20ms to plan clear across the map. Sampling based approaches are notorious for being time consuming in narrow configuration spaces. That's one of the reasons I'd want some tests on that map since there's lot of hallways. Some of the work I'm doing is ~10-50ms (not yet ready to show, but getting there).

I think the velocity sampling would help with that a bit.

Maybe we should focus on one thing at a time - want to focus on sampling planner or a tutorial?

shivaang12 commented 4 years ago

Lets get over with tutorial first. I will removed OMPL stuff from the tutorial PR.

shivaang12 commented 4 years ago

Data for the willograge map For Medium goal: mean: 6029.151898734177 max: 54937.0 min: 632.0

For farthest goal mean: 10043.780487804877 max: 23019.0 min: 301.0

All time in microseconds

SteveMacenski commented 4 years ago

@shivaang12 maybe take into account these comments and then submit a new draft PR with those changes and any others you want to make on the main github page.

Some key things I want to make sure this does:

SteveMacenski commented 3 years ago

Closing since no movement in awhile and we made a simpler path planning tutorial. OMPL work belongs in main repo once we get back into it.