Class Wheel

Class Documentation

class Wheel

Represents a wheel on the robot. TODO(francocipollone): Use better practices 1 - Make it a struct 2 - Move Angle method to DiffDriveAndino class or implementation.

Public Functions

Wheel() = default

Default constructor for the Wheel class.

void Setup(const std::string &wheel_name, int ticks_per_rev)

Setup the wheel.

Parameters:
  • wheel_name – name of the wheel.

  • ticks_per_rev – number of encoder ticks per wheel revolution.

double Angle()

Calculate the angle of the wheel.

Returns:

The angle of the wheel in radians.

Public Members

std::string name_ = ""
unsigned int enc_ = 0
double cmd_ = 0
double pos_ = 0
double vel_ = 0
double eff_ = 0
double vel_set_pt_ = 0
double rads_per_tick_ = 0