Preliminary implementation for servo motor #566
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is a fundamental work for servo motor joint.
The current implementation of the servo motor joint works fine for general cases, but there are some corner cases it can't handle properly. For example, a servo joint is allowed to use infinite force to achieve the desired velocity, and, at the same time, the joint is reached the position limit where the desired velocity is toward the position limit. Then the two constraint forces will race against each other to achieve their objectives and will be ended up infinite constraint forces that will drive the constraint solver to undefined behavior. This confliction can happen with Coulomb friction as well.
There are two possible solutions to handle these corner cases I can come up with now:
Also, some user might be interested in getting how much joint force was applied to the joint from the servo motor, but there is no place to store it in the current API. This will be addressed in Actuator class later.