Implemented Constant Acceleration Move #21
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.
Hi! I implemented a constant acceleration move function. I wonder if it can be useful to someone else.
Few thinks to note:
I'm certain that there is a better way to implement this. In this implementation the velocity is adjusted by the actual position. The function used is:
V= 2 * V_max * t (0 < t < 0.5)
V= 2 * V_max - 2 * V_max * t (0.5 < t < 1.0)
(using t as a lineal position parameter)
The moveCA command takes two arguments: the absolute position and the max speed in RPM. Given the nature of a CA movement the max speed should be adjusted to have a reasonable movement time for each movement as the same RPM will produce slow acceleration rates in long movements and fast acceleration in short movements.
Fine adjusting the pid parameters could still be necessary in some dynamics.