VSpin Transition Guidance

This documentation is meant to help users who are transitioning from using the stock firmware to the VSpin firmware. It highlights key considerations that may affect you as you test VSpin if you have already set up your modules with the stock firmware.

VSpin Velocity and Position Gain Tuning Changes

The closed loop velocity controller and closed loop position controller now output a motor current command instead of a voltage command. This means that the units of the controllers’ gains have changed, and so the specific gains used for any tuning will be different. It is important to understand this change. Gains that worked well for the previous stock firmwares will not provide the same performance if you change to the VSpin firmware. If you are using velocity or position setpoints, we recommend repeating the tuning process when transitioning to the VSpin firmware to find appropriate gains.

Note

If you are transitioning from using a module that was previously configured on the stock speed or servo firmware, you may want to consider resetting to defaults. This resets your module’s gains to the default settings as a starting point, but would also reset any other parameters that were previously configured, such as arming ranges, so it is recommended to take note of your existing configuration to be able to replicate any parameters that you do want to carry over before resetting to defaults.

VSpin API Usage

The VSpin firmware eliminates the Brushless Drive client and splits its functionality among several new IQUART clients. This documentation is meant to provide guidance on how to transition from using Brushless Drive to these new clients when moving from the stock speed or servo firmware to the VSpin firmware.

Python API Usage

Make sure you have the latest version of the Python API. The Python API can be used as normal, but when creating the module object, a VSpinG2Module should be used to allow access to these new clients.

Drive Control Interface

The Drive Control Interface is a newly introduced client that allows for direct control of the underlying drive. This client allows for sending commands directly to the drive in the same way that it was previously possible to directly command the Brushless Drive client, so it can serve to simplify the transition to VSpin if you were previously commanding Brushless Drive. This interface also makes it possible to send the module torque and motor current commands for modules that use VSpin. For more information on what entries are available for the Drive Control Interface, see the Drive Control Interface message table.

Querying Motor Model and State Information With VSpin

With the removal of the Brushless Drive client, several API entries that could be used to gather basic information on the module’s state will no longer be available. This includes information on the module’s current velocity and details about its model’s tuning. Substitutes for these entries can generally be found in the newly added Motor Model client, Current Safeties client, and Motor Driver client.

The tables below provides guidance on how to transition some of the most commonly used entries from Brushless Drive:

Motor Velocity

Motor Velocity API Entries for VSpin

Firmware Style

Client

Entry

Stock

brushless_drive

obs_velocity

VSpin

motor_model

mechanical_velocity

Drive Voltage

Drive Voltage API Entries for VSpin

Firmware Style

Client

Entry

Stock

brushless_drive

drive_volts

VSpin

motor_driver

stator_magnitude

Estimated Motor Current

Estimated Motor Current API Entries for VSpin

Firmware Style

Client

Entry

Stock

brushless_drive

est_motor_amps

VSpin

motor_driver

estimated_motor_amps

Drive Mode

Drive Mode API Entries for VSpin

Firmware Style

Client

Entry

Stock

brushless_drive

drive_mode

VSpin

motor_driver

driver_mode