So we made a a couple of changes in the FW to handle multi-turn position control.
The modified FW is based on 3.33, Which was working quite nice for us.
we do no longer compute shorted angles , we use full revolutions.
The encoder position still remains degrees. For example one can control 0-2160degress for a 6:1 gearbox and the output is 360degress on output.
we added a command in the FW: COMM_SET_POS_CUMULATIVE.
implement a cascaded style position, velocity and current control loop in the VESC firmware. Now we can control multi-turn positions with speed settings.
We made a simulator for this new multi-turn cascade position control so everyone can see how this modified VESC firmware works ( http://grauonline.de/alexwww/motorsim/motorsim.html )
Some rotation testing with new firmware over ROS. 0-2160 degress to get 0-360 degress output on gearbox.
sin motion #set_pos = math.sin(time.time() % 10.0 / 10.0 * 2 * math.pi) * 500 + 500. We try go get it working with joint_trajectory_controller
Here are the files:
Ros Driver: https://github.com/raess1/Vesc-ROS-FW-3.33
Ros Talker: https://github.com/raess1/ROS-Talker