Added initial actuation support
This commit is contained in:
parent
b954e2a302
commit
5ecbbaf463
@ -11,6 +11,8 @@ Roboid::Roboid(Perception *perception, Propulsion *propulsion) {
|
|||||||
propulsion->roboid = this;
|
propulsion->roboid = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Roboid::Roboid(ServoMotor **actuation) : actuation(actuation) {}
|
||||||
|
|
||||||
void Roboid::Update(float currentTimeMs) {
|
void Roboid::Update(float currentTimeMs) {
|
||||||
if (perception != nullptr)
|
if (perception != nullptr)
|
||||||
perception->Update(currentTimeMs);
|
perception->Update(currentTimeMs);
|
||||||
|
7
Roboid.h
7
Roboid.h
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Perception.h"
|
#include "Perception.h"
|
||||||
#include "Propulsion.h"
|
#include "Propulsion.h"
|
||||||
#include "Servo.h"
|
#include "ServoMotor.h"
|
||||||
|
|
||||||
namespace Passer {
|
namespace Passer {
|
||||||
namespace RoboidControl {
|
namespace RoboidControl {
|
||||||
@ -19,7 +19,9 @@ public:
|
|||||||
/// @param propulsion The Propulsion implementation to use for this Roboid
|
/// @param propulsion The Propulsion implementation to use for this Roboid
|
||||||
Roboid(Perception *perception, Propulsion *propulsion = nullptr);
|
Roboid(Perception *perception, Propulsion *propulsion = nullptr);
|
||||||
|
|
||||||
Roboid(Perception *perception, Servo **actuation);
|
Roboid(Perception *perception, ServoMotor **actuation);
|
||||||
|
|
||||||
|
Roboid(ServoMotor **actuation);
|
||||||
|
|
||||||
/// @brief Update the state of the Roboid
|
/// @brief Update the state of the Roboid
|
||||||
/// @param currentTimeMs The time in milliseconds when calling this
|
/// @param currentTimeMs The time in milliseconds when calling this
|
||||||
@ -30,6 +32,7 @@ public:
|
|||||||
Perception *perception = nullptr;
|
Perception *perception = nullptr;
|
||||||
/// @brief The Propulsion module of this Roboid
|
/// @brief The Propulsion module of this Roboid
|
||||||
Propulsion *propulsion = nullptr;
|
Propulsion *propulsion = nullptr;
|
||||||
|
ServoMotor **actuation = nullptr;
|
||||||
|
|
||||||
/// @brief The reference to the module to synchronize states across a network
|
/// @brief The reference to the module to synchronize states across a network
|
||||||
NetworkSync *networkSync = nullptr;
|
NetworkSync *networkSync = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user