Class Limits
Speed and acceleration limits, with the motion they last allowed.
public sealed class Limits : IDisposable
- Inheritance
-
Limits
- Implements
- Inherited Members
Constructors
Limits(float, float, float, float)
Creates limits starting from rest.
public Limits(float maxLinear, float maxAngular, float maxLinearAccel, float maxAngularAccel)
Parameters
maxLinearfloatThe largest planar speed.
maxAngularfloatThe largest yaw rate.
maxLinearAccelfloatThe largest change in speed per second.
maxAngularAccelfloatThe largest change in yaw rate per second.
Remarks
Each magnitude is used, and one that is not a number is taken as 0, which holds the robot still.
Methods
Apply(Twist, float)
Holds a command to the speed limits and eases toward it within the acceleration limits.
public Twist Apply(Twist desired, float dt)
Parameters
desiredTwistThe requested motion; a part that is not a finite number is taken as 0.
dtfloatThe time since the last call; one that is not a finite number allows no change.
Returns
- Twist
The bounded command.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Reset()
Forgets the motion last allowed, so the next command eases up from rest.
public void Reset()