Helios++
Helios software for LiDAR simulations
GroundVehiclePlatform.h
1 #pragma once
2 
3 #include "SimplePhysicsPlatform.h"
4 
5 #define _USE_MATH_DEFINES
6 #include "math.h"
7 
12 
13 private:
14  // *** ATTRIBUTES *** //
15  // ******************** //
19  double mEngineForceMax = 0.2;
23  double mEngineForceCurrent = 0;
27  double mEngineForceTarget = 0;
31  double mComplexTurnThreshold_rad = M_PI / 5;
41  int mTurnMode = 0;
45  glm::dvec3 mTempWaypoint;
46 
47 public:
48  // *** CONSTRUCTION / DESTRUCTION *** //
49  // ************************************ //
54  // Disable gravity:
55  mCfg_g_accel = glm::dvec3(0, 0, 0);
56  }
57  std::shared_ptr<Platform> clone() override;
58  void _clone(std::shared_ptr<Platform> p) override;
59 
60  // *** M E T H O D S *** //
61  // *********************** //
65  void doControlStep(int simFrequency_hz) override;
70  void setDestination(glm::dvec3 dest) override;
74  void prepareSimulation(int simFrequency_hz) override;
75 };
Class representing a ground vehicle platform.
Definition: GroundVehiclePlatform.h:11
double mEngineForceCurrent
Current force of vehicle engine.
Definition: GroundVehiclePlatform.h:23
int mTurnMode
Turn mode specification.
Definition: GroundVehiclePlatform.h:41
void prepareSimulation(int simFrequency_hz) override
Definition: GroundVehiclePlatform.cpp:119
double mEngineForceMax
Max force for vehicle engine.
Definition: GroundVehiclePlatform.h:19
void doControlStep(int simFrequency_hz) override
Definition: GroundVehiclePlatform.cpp:32
GroundVehiclePlatform()
Default constructor for ground vehicle platform.
Definition: GroundVehiclePlatform.h:53
double mComplexTurnThreshold_rad
Turning threshold in radians.
Definition: GroundVehiclePlatform.h:31
void setDestination(glm::dvec3 dest) override
Definition: GroundVehiclePlatform.cpp:114
double mEngineForceTarget
Target force for vehicle engine.
Definition: GroundVehiclePlatform.h:27
glm::dvec3 mTempWaypoint
Temporary way point to assist ground vehicle movement.
Definition: GroundVehiclePlatform.h:45
Class representing a simple phyiscs platform.
Definition: SimplePhysicsPlatform.h:8
glm::dvec3 mCfg_g_accel
Gravity acceleration vector.
Definition: SimplePhysicsPlatform.h:19