#include <actuator.h>
◆ Actuator() [1/3]
◆ Actuator() [2/3]
◆ ~Actuator()
◆ Actuator() [3/3]
◆ actuate()
| Vec3< float > Actuator::actuate |
( |
Vec3< float > |
vel, |
|
|
Vec3< float > |
psis, |
|
|
uint32_t |
dt_millis, |
|
|
int8_t |
test = 0 |
|
) |
| |
Function that actuate the robot's base(omni-base)
- Parameters
-
| vel | : A vector that holds vx, vy and omega |
| psis | : A vector that holds psi_target, psi and psi_dot |
| dt_millis | : The time period at which this function is called periodically |
- Return values
-
| A | vector that holds vx, vy and omega of the base in the last frame |
Tasks performed by this function
1) Calculates omegas of each wheel to reach the given velocities using the
Coupling Matrix
2) Measure omega of each wheels
3) Compute error
4) Compute PID using available PID_Algorithm
5) set Omega of each wheel
6) update new omegas of all wheels at once
7) Calculates vx, vy and rw of the base from the measured omegas of each
wheel using the inverse Coupling Matrix
◆ check()
◆ clear()
◆ get_Instance()
◆ init()
Function that initializes all the required components for the robot's actuator(omni-base)
- Return values
-
Tasks performed by this function
1) Call the devices initializations in correct order
2) Call the software initializations for utilities like pid for wheels
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ pid_Init()
| void Actuator::pid_Init |
( |
| ) |
|
|
private |
Function that initializes all the required components for the wheel's pid controller.
- Return values
-
Tasks performed by this function
1) Assigns gains for PID controller of each wheel
2) Assigns separate PID controllers for each wheel
◆ profile()
| void Actuator::profile |
( |
Vec3< float > |
vel, |
|
|
uint32_t |
dt_millis |
|
) |
| |
◆ set_AnglePID()
| void Actuator::set_AnglePID |
( |
PID * |
pid | ) |
|
|
inlineprivate |
◆ stop()
| uint32_t Actuator::stop |
( |
uint32_t |
dt_millis, |
|
|
float |
ramp_factor = 2.0, |
|
|
uint32_t |
max_time = 1000 |
|
) |
| |
◆ wheels_Init()
| void Actuator::wheels_Init |
( |
void |
| ) |
|
|
private |
Function that initializes all the required components for the wheels of the robot.
- Return values
-
Tasks performed by this function
1) Assigns appropriate IDs to each wheel
2) Give each wheel the respective radius
3) Assign a timer and a channel to each wheel for it's motor to run in PWM
mode. A timer is shared among all the available wheels since we have
four wheels.
4) Assigns the ppr of each wheel's encoder
5) Assigns the direction pins for each motor's direction
6) Assigns timer for each wheel's encoder
7) Starts the timers to run each wheel in respective configured modes like PWM
mode and the Encoder mode
Need to make sure the following value is correct
◆ angle_pid_
| PID* Actuator::angle_pid_ |
|
private |
◆ wheels_
| Wheel Actuator::wheels_[4] |
|
private |
The documentation for this class was generated from the following files:
- C:/Users/073be/OneDrive/Documents/Robotics/Codes/beta/Khangai-Robot/Khangai-Robot-Full/KhangaiRobot-Play/Core/Inc/parts/actuator.h
- C:/Users/073be/OneDrive/Documents/Robotics/Codes/beta/Khangai-Robot/Khangai-Robot-Full/KhangaiRobot-Play/Core/Src/parts/actuator.cpp