-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about smoother controller change in Rotation Shim #4828
Comments
First, what branch are you using? We added a feature in Second, I don't totally understand the idea, but we could have it set to slow down the rotation as its approaching the target heading as if it were going to stop at the target heading (see: spin behavior). We have the disengagement threshold in main (or the threshold in general in other branches) that would pass it off to the controller before we actually stop-stop, so the deceleration would occur based on the distance remaining and the maximum acceleration allowed until that pass off is handled. The 2 edge cases we'd need to capture are:
|
Hi @SteveMacenski ! I checked out the spin behavior, my thoughts/understanding about that:
In terms of points in a coordinate system (x,y) -> [angle difference from target angle, angular velocity], my proposition is to push the spin velocity's equation to point [child controller max angular velocity, yaw threshold] from origo.
I really hope it makes sense. |
You are correct - I'm providing a suggestion for a different way of dealing with the problem that I think is actually more natural in terms of the behavior it provides as the output for both the situation you bring up as well as the general dynamic feasibility of the rotation shim controller passing off to the child controller. If you do the back of the envelope math for your ranges of angular velocity maximums / accelerations, I think you'll see that this works well for good values of disengagement threshold sizes and dynamic constraints. Yes, you may need to calculate to make sure for a particular situation you don't go past that limit, but you'd have to do something adjacent to tune the value of Also, even if we add in the change for the differences in rotational velocities of the parent and child controllers, I still think it would be wise to have these dynamic limits in place to slow down on approach to the target orientation. I think this largely knocks out both in one contribution (with a small amount of math). Additionally but separately, I think this also really solves what you might want anyway:
Thus, this one change would deal with the issue you bring up, decoupling the rotational velocity from the controller's dynamic settings, while also (a) improving the starting conditions given to the controller and (b) being more intuitive. I'd be really interested in that actually being the default, out of the box behavior of the rotation shim controller, by tightening up the disengagement threshold after the deceleration is added. I think that's mostly what people would want anyway. |
Feature request
Feature description
When changing controller the last velocity published by Shim could be different, from what the child controller can handle.
For example: Shim is rotating with 1 [rad/s], but under it a MPPI controller's
wz_max
is smaller. In a use case someone might want to rotate faster while having information about that the robot is stationary (at the start of the path for example) and a hand the control to the inner controller with velocity that it has been tuned to.Implementation considerations
So an idea is to make a linear interpolation between the maximal possible angular velocity (calculated from acc limit) and the target velocity (upper bound provided by the child controller) when the angular distance from goal getting near to the angular threshold.
I thought about an implementation (so its just a doodle at this point), wanted to ask for feedback on whether is this a good way of doing it?
The base idea is before clamping the velocity calculate a linearly extrapolated relative velocity.
My handwriting might be totally worthless but I am happy to explain.
Short code change (not tested) just for an idea.
The text was updated successfully, but these errors were encountered: