RoboidControl
Loading...
Searching...
No Matches
d:/PlatformIO/RoboidControl/Roboid.h
Go to the documentation of this file.
1#pragma once
2
4#include "Perception.h"
5#include "Propulsion.h"
6#include "ServoMotor.h"
7
8namespace Passer {
9namespace RoboidControl {
10
11class NetworkSync;
12
14class Roboid {
15public:
17 Roboid();
22
24
25 Roboid(ServoMotor *actuationRoot);
26
30 void Update(float currentTimeMs);
31
36 ServoMotor *actuationRoot = nullptr;
37
40
46 virtual Vector3 GetPosition();
47 Vector2 GetPosition2D();
53 virtual Quaternion GetOrientation();
54 float GetOrientation2D();
55
63 virtual void SetPosition(Vector3 worldPosition);
69 virtual void SetOrientation(Quaternion worldOrientation);
70 void SetOrientation2D(float angle);
71
72private:
77 Vector3 worldPosition = Vector3::zero;
82 // Quaternion worldOrientation = Quaternion::identity;
83
84 AngleAxis worldAngleAxis = AngleAxis();
85
86 unsigned long lastUpdateTimeMs = 0;
87};
88
89} // namespace RoboidControl
90} // namespace Passer
91
92using namespace Passer::RoboidControl;
Interface for synchronizaing state between clients across a network.
Definition NetworkSync.h:12
Module to which keeps track of objects around the roboid.
Definition Perception.h:17
The Propulsion module for a Roboid is used to move the Roboid in space.
Definition Propulsion.h:18
A Roboid is used to control autonomous robots.
Definition Roboid.h:14
void SetOrientation2D(float angle)
Definition Roboid.cpp:126
Vector2 GetPosition2D()
Definition Roboid.cpp:74
virtual Vector3 GetPosition()
Retrieve the current position of the roboid.
Definition Roboid.cpp:73
ServoMotor * actuationRoot
Definition Roboid.h:36
virtual void SetPosition(Vector3 worldPosition)
Update the current position of the roboid.
Definition Roboid.cpp:98
virtual Quaternion GetOrientation()
Retrieve the current orientation of the roboid.
Definition Roboid.cpp:78
NetworkSync * networkSync
The reference to the module to synchronize states across a network.
Definition Roboid.h:39
virtual void SetOrientation(Quaternion worldOrientation)
Update the current orientation of the roboid.
Definition Roboid.cpp:114
Propulsion * propulsion
The Propulsion module of this Roboid.
Definition Roboid.h:35
float GetOrientation2D()
Definition Roboid.cpp:85
void Update(float currentTimeMs)
Update the state of the Roboid.
Definition Roboid.cpp:47
Roboid()
Default constructor for a Roboid.
Definition Roboid.cpp:11
Perception * perception
The Perception module of this Roboid.
Definition Roboid.h:33
Definition Accelerometer.h:7
Definition AbsoluteEncoder.h:5