sea-bass / pyroboplan

Educational Python library for manipulator motion planning
https://pyroboplan.readthedocs.io
MIT License
237 stars 25 forks source link

Add Initial Implementation of PRM #38

Closed eholum closed 5 months ago

eholum commented 5 months ago

I've been playing around with PRM, so tried to cleanup my ws and get something basic in a useful state. This is a very naive implementation of PRM, I think complexity and optimizations can come in follow on PRs.

The example just uses the 2-DOF model because it's very fast to generate roadmaps in reasonable amounts of time.

Screenshot 2024-05-13 at 4 35 34 PM
sea-bass commented 5 months ago

lol. 800 seconds

image

eholum commented 5 months ago

lol. 800 seconds

It may be slow, but you have to admit that it's got style.

sea-bass commented 5 months ago

One other note... it is very much possible that the neighbor distance / number of neighbors just needs to be higher for higher-DOF arms.

I just tried the UR5 again with max_neighbor_radius=1.57 and max_neighbor_connections=10 and got this guy in ~30 seconds.

image

I then thought... it might be even better if we actually fill in a reasonable self-collision matrix. So I tried with the Panda which has this -- same parameters -- and got this returned to me after ~20-90 seconds, depending on trials.

image

Obviously the paths leave something to be desired, but just saying... there are tunings that can help.

eholum commented 5 months ago

One other note... it is very much possible that the neighbor distance / number of neighbors just needs to be higher for higher-DOF arms.

I just tried the UR5 again with max_neighbor_radius=1.57 and max_neighbor_connections=10 and got this guy in ~30 seconds.

Oh yeah, probably worth putting that in the comments. I used the same radius and max_neighbor_connections=10 and things were pretty speedy.

sea-bass commented 5 months ago

Oh yeah, probably worth putting that in the comments. I used the same radius and max_neighbor_connections=10 and things were pretty speedy.

Speedy? We must not be hasty...