RoboidControl
Loading...
Searching...
No Matches
d:/PlatformIO/RoboidControl/Propulsion.h
Go to the documentation of this file.
1#pragma once
2
6#include "Motor.h"
7
8namespace Passer {
9namespace RoboidControl {
10
11class Roboid;
12
19public:
21 Propulsion();
22
25 void Update(float currentTimeMs);
26
29 unsigned int GetMotorCount();
34 Motor *GetMotor(unsigned int motorIx);
39 // Placement *GetMotorPlacement(unsigned int motorIx);
40
46 virtual void SetTwistSpeed(float forward, float yaw = 0.0F);
53 virtual void SetTwistSpeed(Vector2 linear, float yaw = 0.0F);
59 virtual void SetTwistSpeed(Vector3 linear, float yaw = 0.0F,
60 float pitch = 0.0F, float roll = 0.0F);
61
62 virtual void SetVelocity(Polar velocity);
63
67 virtual Polar GetVelocity();
71 virtual float GetAngularVelocity();
72
74 Roboid *roboid = nullptr;
75
76protected:
78 unsigned int motorCount = 0;
80 // Placement *placement = nullptr;
81 Motor **motors = nullptr;
82};
83
84} // namespace RoboidControl
85} // namespace Passer
86using namespace Passer::RoboidControl;
A Motor is a Thing which can move parts of the Roboid.
Definition Motor.h:12
The Propulsion module for a Roboid is used to move the Roboid in space.
Definition Propulsion.h:18
virtual float GetAngularVelocity()
Retrieve the current angular velocity of the roboid.
Definition Propulsion.cpp:42
Roboid * roboid
The roboid of this propulsion system.
Definition Propulsion.h:74
void Update(float currentTimeMs)
Update the propulsion state of the Roboid.
Definition Propulsion.cpp:21
virtual void SetTwistSpeed(float forward, float yaw=0.0F)
Get the Placement of a specific Motor.
Definition Propulsion.cpp:31
Motor ** motors
The Placement of the motors used for Propulsion.
Definition Propulsion.h:81
virtual Polar GetVelocity()
Retrieve the current velocity of the roboid.
Definition Propulsion.cpp:40
Motor * GetMotor(unsigned int motorIx)
Get a specific motor.
Definition Propulsion.cpp:13
unsigned int motorCount
The number of motors used for Propulsion.
Definition Propulsion.h:78
Propulsion()
Default Constructor for Propulsion.
Definition Propulsion.cpp:6
virtual void SetVelocity(Polar velocity)
Definition Propulsion.cpp:38
unsigned int GetMotorCount()
Get the number of motors in this roboid.
Definition Propulsion.cpp:11
A Roboid is used to control autonomous robots.
Definition Roboid.h:14
Definition Accelerometer.h:7
Definition AbsoluteEncoder.h:5