-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
When I send a twist to the pr2 base, it doesn't reach the commanded velocity, according to odometry.

This does not happen when we put the pr2 on blocks, so that the wheels are in the air. So I suspect that it is related to friction caused by the pr2's weight.
We thought that such a steady state error should be fixable by increasing the I term for the wheels in the base controller 2 config file. But all it did was making the caster wheels behave weirdly. So I looked into the code and I think the pid controller is not used properly.
pr2_controllers/pr2_mechanism_controllers/src/pr2_base_controller2.cpp
Lines 470 to 473 in c01cb6f
| double command = wheel_pid_controllers_[i].computeCommand( | |
| - wheel_caster_steer_component.linear.x/base_kinematics_.wheel_[i].wheel_radius_, | |
| base_kinematics_.wheel_[i].wheel_speed_cmd_ - filtered_wheel_velocity_[i], | |
| ros::Duration(dT)); |
Here the new command for the wheels gets computed. The first term is error, where the velocity needed to help with the steering is put. And for error dot, the velocity difference is put, needed to make the robot drive forward. But that means that P and I only affect the steering and D affects how the pr2 drives forward. That seems very weird to me, is there a reason for this? It makes it impossible to get rid of the steady state error through tuning of the pid controller.
Metadata
Metadata
Assignees
Labels
No labels