Tuning RoadRunner following the instructions, all seem went well until the final step with the SplineTest. The robot changes heading drastically for (~half a second) in the middle of movement. At the beginning I thought it is due to incorrect heading gain, but after I remove all gains (no feedback), I still see the same.
I finally decided to draw graph with command.linearVel.x.value(), command.linearVel.y.value() and command.angVel.value(), command being the return value of below:
In my understanding, since the trajectory is roughly a half circle, for most of the time x linear velocity should be a constant, except or a short period of ramp up and ramp down, while both y linear velocity and angular velocity should be both small. But what I'm surprised to see the curve for x linear velocity has a "sharp angle" in the middle, around when 2 spline path connects. I think this is causing the robot to change heading drastically?
The trajectory is like below (same as SplineTest from QuickStart except left/right flipped):
Tuning RoadRunner following the instructions, all seem went well until the final step with the SplineTest. The robot changes heading drastically for (~half a second) in the middle of movement. At the beginning I thought it is due to incorrect heading gain, but after I remove all gains (no feedback), I still see the same.
I finally decided to draw graph with command.linearVel.x.value(), command.linearVel.y.value() and command.angVel.value(), command being the return value of below:
In my understanding, since the trajectory is roughly a half circle, for most of the time x linear velocity should be a constant, except or a short period of ramp up and ramp down, while both y linear velocity and angular velocity should be both small. But what I'm surprised to see the curve for x linear velocity has a "sharp angle" in the middle, around when 2 spline path connects. I think this is causing the robot to change heading drastically?
The trajectory is like below (same as SplineTest from QuickStart except left/right flipped):
Screen recording of FTC Dashboard attached.
https://github.com/acmerobotics/road-runner/assets/12581739/0f119c07-ee1a-46e0-a7cd-d9a1915a2cc0