Skip to content

Chassis and flywheel dynamic adjustment #33

@manelkdm

Description

@manelkdm

Specifications

We want to be able to dynamically adjust the chassis power consumption and the firing speed of our robots according to the limits set by the referee system.

Implementation

Taproot provides the data needed for this adjustment in the RefSerial class. The important type to consider for this issue is the Struct Rx::RobotData that contains the chassis and turrret data types.

The robot data is obtained by calling drivers->refSerial.getRobotData().

Chassis subsystem

  • Check if the current power consumption level exceeds the chassis power consumption limit. If that's the case, the chassis speed needs to be lowered in order for the power to go below the consumption power limit. To do that, the values of the xInputRamp, yInputRamp and rInputRamp targets need to be lowered.
  • In the refresh() method, first check for the chassis consumption power before updating the RPM setpoints.

Flywheel subsystem

  • Check if the last bullet speed exceeds the power consumption limit. If that's the case,the current throttle value should be lowered in the refresh() method.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions