Helios++
Helios software for LiDAR simulations
MovingPlatform.h
1 #pragma once
2 
3 #include "Platform.h"
4 
8 class MovingPlatform : public Platform {
9 
10 private:
11  // *** ATTRIBUTES *** //
12  // ******************** //
16  glm::dvec3 velocity = glm::dvec3(0, 0, 0);
17 
18 public:
19  // *** CONSTRUCTION / DESTRUCTION *** //
20  // ************************************ //
24  MovingPlatform() = default;
25  std::shared_ptr<Platform> clone() override;
26  void _clone(std::shared_ptr<Platform> p) override;
27 
28  // *** M E T H O D S *** //
29  // *********************** //
33  void applySettings(
34  std::shared_ptr<PlatformSettings> settings,
35  bool manual
36  ) override;
40  void doSimStep(int simFrequency_hz) override;
44  void initLegManual() override;
50  void initLegManualIterative(); // To be used when initLegManual fails
54  bool waypointReached() override;
55 
59  glm::dvec3 getVelocity() override {
60  return velocity;
61  }
66  void setVelocity(glm::dvec3 v) {
67  this->velocity = v;
68  }
72  bool canMove() override {return true;}
73 };
Class representing a platform asset.
Definition: Platform.h:21
bool waypointReached() override
Definition: MovingPlatform.cpp:105
MovingPlatform()=default
Moving platform default constructor.
void initLegManual() override
Definition: MovingPlatform.cpp:49
glm::dvec3 getVelocity() override
Definition: MovingPlatform.h:59
void initLegManualIterative()
Method to assist manual leg initialization for moving platform when it fails.
Definition: MovingPlatform.cpp:78
void setVelocity(glm::dvec3 v)
Set velocity vector for moving platform.
Definition: MovingPlatform.h:66
void doSimStep(int simFrequency_hz) override
Definition: MovingPlatform.cpp:43
void applySettings(std::shared_ptr< PlatformSettings > settings, bool manual) override
Definition: MovingPlatform.cpp:28
bool canMove() override
Definition: MovingPlatform.h:72
Class representing a moving platform.
Definition: MovingPlatform.h:8
glm::dvec3 velocity
Moving platform velocity vector.
Definition: MovingPlatform.h:16