Open
Description
Right now the Graceful Controller computes a smooth spiral curve from the control law from the robot's current state to a pose on the path to track. The path pose is based on a lookahead distance that is shortened up if there is a collision in the trajectory's spiral curve on the way. Getting out some ideas / thoughts so we can collaborate on this as a community instead of staying in some notes document
Linking @ajtudela @mikeferguson for visibility (feel free to mute & sorry to ping you if you don't care 😉 )
There are quite a few other ways, I think that this control law could be utilized that are worth experimenting with for improvements or different behaviors:
Current controller improvements
- Interpolate the path point for the distance requested by the lookahead, to smooth out the trajectories from frame to frame. We do this in the RPP controller, so this should be a relatively straight forward improvement that improves the controller as-is. Other RPP-based bells-and-whistles improvements?
-
Consider committing to a given trajectory for a period of time before computing a new spiral. Each iteration, we compute a new spiral and perhaps its worth committing to the current spiral for a couple of seconds (except if collision or large change in cost) so we commit to actions more fully, before then computing a new curve. Compute a new curve after moving some distance or collision now in the spiral arcDeemed unhelpful in [Graceful Controller] Additional Controller Techniques - Experimentation #4865 (comment) - Get rid of the slowdown radius and do the forward simulation using proper acceleration limits. This same thing could be done with docking - where it might actually be a very big improvement (especially if people know their acceleration limits well, they can be certain the robot won't hit the dock real hard)
- Consider sampling a set of spiral trajectories with different spiral parameters instead of them as static parameters. Sample within some range of values and score them for the best trajectory. Score on integrated path distance, obstacles, smoothness, length, etc. See [Graceful Controller] Additional Controller Techniques - Experimentation #4865 (comment) for insights.
- "The collision checking in the iterative loop assumes you are starting at max speed (not at your current speed). This is probably not that big of a deal, but if you're going very slowly in a tight area, the controller might wobble a bit more." I think this is actually easier to do with the nav2 controller API than what existing in nav1 where we had to separately subscribe to odom and whatnot.
- Footprint expansion - as you go faster, your footprint is enlarged to account for the uncertainty in how well your controls will actually work. This is especially helpful if you have an environment which is quite varied in how open space it is (like, when you want to go 1.5m/s in wide open hallways but automatically slow down when entering a cubicle farm that is quite a bit less open).
New Graceful motion model controller - probably good
- Consider the above, with relaxation on the exact goal pose so we compute (collision valid) spirals towards or along the path, but no so exact. Further, we could sample based on some time duration into the future from the robot's starting pose + spiral parameters. Part of the scoring could be how close / near the path or it is (so not even considering the path's poses in the spiral constraints)
- Perhaps rather than randomly sampling (like RRT) or sampling in fixed intervals (like DWA) of the the spiral parameters, attempt to use convex optimization on some cost functions to select the best trajectory and goal. It looks like we'd be in good company in this direction and I'm reading between the lines that this is what the Amazon Astro does given Jong Jin Park's current employment and the relatedness of the graphics on these papers to some Amazon Astro blog posts Unconstrained Model Predictive Control for Robot Navigation under
Uncertainty Robot Navigation with MPEPC in Dynamic and Uncertain
Environments: From Theory to Practice Robot Navigation with Model Predictive Equilibrium Point Control dissertation
Some things we can score:
- Path smoothness
- Collision
- How well it follows the path // gets close to the desired intermediate goal pose on the path
- Adjust scoring weighting based on distance from obstacle (follow goal better when far from objects; avoid objects better when close to them)
New Graceful motion model controller - probably dumb?
- Consider the aforementioned, but in multiple timesteps. If we sample / optimize for a trajectory that is some time in the future, then we can do so again at that time to compute a new trajectory to hand it off to. For example: we compute trajectories that are 1s into the future via sampling or optimization. Then we do so again for another 1s and so forth to compute more sophisticated trajectories. This is somewhat similar to MPPI, but more coarsely and the trajectories themselves are known to be smooth and feasibly connect to each other. This would be quite computational and not sure its an improvement over MPPI, so perhaps this is better a thought experiment to pull ideas from for simpler modifications. I think Graceful as a simple, smooth trajectory planner is where we should keep it -- rather than being highly reactive or dealing with multiple time-step issues, where MPC/MPPI shine best. https://www.cs.cmu.edu/~iwan/papers/vfhstar.pdf