Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
galaxis::motorSettings Namespace Reference

Functions

float erpmToVelocity (float const p_erpm)
 returns the velocity in [m/s] for a given ERPM More...
 
float velocityToErpm (float const p_velocity)
 

Variables

constexpr float minimumCurrent = -10.f
 
constexpr float maximumCurrent = 10.f
 
constexpr float maximumSpeed = 2.5
 
constexpr float maximumBrakeCurrent = 6.0
 

Function Documentation

◆ erpmToVelocity()

float galaxis::motorSettings::erpmToVelocity ( float const  p_erpm)

returns the velocity in [m/s] for a given ERPM

Parameters
erpmthe ERPM to convert
Returns
velocity in [m/s]

Definition at line 5 of file motorSettings.cpp.

5  {
6  return p_erpm * 8.448e-5;
7  }

Referenced by AutoPilotNode::on_ecu_measurement_callback(), ControllerNode::on_measurement_callback(), and ECUNode::publishMeasurements().

Here is the caller graph for this function:

◆ velocityToErpm()

float galaxis::motorSettings::velocityToErpm ( float const  p_velocity)

Definition at line 9 of file motorSettings.cpp.

9  {
10  return p_velocity / 8.448e-5;
11  }

Referenced by ControllerNode::loop().

Here is the caller graph for this function:

Variable Documentation

◆ maximumBrakeCurrent

constexpr float galaxis::motorSettings::maximumBrakeCurrent = 6.0
constexpr

Definition at line 11 of file motorSettings.hpp.

◆ maximumCurrent

constexpr float galaxis::motorSettings::maximumCurrent = 10.f
constexpr

Definition at line 9 of file motorSettings.hpp.

◆ maximumSpeed

constexpr float galaxis::motorSettings::maximumSpeed = 2.5
constexpr

Definition at line 10 of file motorSettings.hpp.

◆ minimumCurrent

constexpr float galaxis::motorSettings::minimumCurrent = -10.f
constexpr

Definition at line 8 of file motorSettings.hpp.