Examples of closed-loop body-frame velocity controllers for a mobile base
Are there any examples of closed-loop velocity controllers for mobile robots? I'm referring to a node, or even a robot-specific function, that takes in:
- a desired velocity command (e.g. from nav stack or teleop)
- an estimate of the robot's current velocity (e.g. via wheel odometry or robot_localization)
and returns a modified body-frame velocity command, which is then sent to the robot's low-level driver to be translated into motor commands. Its purpose would be to compensate for things like static and rolling friction, weird floor types such as thick carpets, inclines/declines, discrepancies between the robot's wheels/motors, etc.
I realize that the nav stack's local planners do some of that. But I'm looking for something that would work independently of the path and motion planning layer and independently of localization w.r.t. a map. For example, it would also correct velocity commands coming from keyboard teleop.
I thought that the turtlebot or kobuki repos might contain examples but I wasn't able to find anything there. Did the PR2 have such functionality?
PS. To clarify, I'm not looking for a controller that converts body-frame velocity commands to wheel velocity commands. Rather, I'm looking for a controller that regulates the body-frame velocity itself. Kind of like cruise control.