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 // /**
56 // * @see Platform::prepareSimulation
57 // */
58 // void prepareSimulation(int simFrequency_hz) override;
62  glm::dvec3 getVelocity() override {
63  return velocity;
64  }
69  void setVelocity(glm::dvec3 v) {
70  this->velocity = v;
71  }
75  bool canMove() const override {return true;}
76 };
Class representing a moving platform.
Definition: MovingPlatform.h:8
void initLegManual() override
Definition: MovingPlatform.cpp:54
bool canMove() const override
Definition: MovingPlatform.h:75
MovingPlatform()=default
Moving platform default constructor.
bool waypointReached() override
Definition: MovingPlatform.cpp:110
void doSimStep(int simFrequency_hz) override
Definition: MovingPlatform.cpp:43
void setVelocity(glm::dvec3 v)
Set velocity vector for moving platform.
Definition: MovingPlatform.h:69
void initLegManualIterative()
Method to assist manual leg initialization for moving platform when it fails.
Definition: MovingPlatform.cpp:83
glm::dvec3 getVelocity() override
Definition: MovingPlatform.h:62
glm::dvec3 velocity
Moving platform velocity vector.
Definition: MovingPlatform.h:16
void applySettings(std::shared_ptr< PlatformSettings > settings, bool manual) override
Definition: MovingPlatform.cpp:28
Class representing a platform asset.
Definition: Platform.h:21