I've just checked if there is any delay between sending the message to change the motor speed and the actual change. The delay is about 5 frames, which is around 0.3 second.
![]() |
| Grey bars shows the message to the motor, blue line shows the star position. |
This explains why i had that sinus like movement of the star. I started the compensation too late, and also stopped it too late.
To solve this, it's not enough to check the star's position, but also need to check the movement of the star. If it's moving to the proper direction, the compensation should be smaller, if not, the compensation should be even bigger.
The blue line shows the star's position, the red line shows the position and also added the gradient of the movement. If the value of the position is increasing (like around 50 on the chart above), the red line is much higher, so we need more compensation. If the blue line is decreasing, the red line is lower, we need less compensation.
The guiding is much smoother like this, but in same cases the maximum compensation is not enough, so that parameter should be increased, and the compensation should be more aggressive.


No comments:
Post a Comment