RapyutaSimulationPlugins
DifferentialDriveComponent.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 
16 
17 #include "CoreMinimal.h"
18 
20 
21 #include "PhysicsEngine/PhysicsConstraintComponent.h"
22 
23 
24 
25 #include <random>
26 
27 
28 
29 #include "DifferentialDriveComponent.generated.h"
30 
31 
32 
60 class RAPYUTASIMULATIONPLUGINS_API UDifferentialDriveComponent : public UDifferentialDriveComponentBase
61 
62 {
63 
64 
65 
66 public:
67 
84  virtual void UpdateMovement(float DeltaTime) override;
85 
86 
87 
105  void SetWheels(UPhysicsConstraintComponent* InWheelLeft, UPhysicsConstraintComponent* InWheelRight);
106 
107 
108 
119  virtual float GetWheelVelocity(const EDiffDriveWheel WheelIndex) override;
120 
121 
122 
123 
128  UPhysicsConstraintComponent* WheelLeft = nullptr;
129 
130 
131 
132 
137  UPhysicsConstraintComponent* WheelRight = nullptr;
138 
139 };
140 
UDifferentialDriveComponentBase
Differential Drive component base class.
Definition: DifferentialDriveComponentBase.h:73
UDifferentialDriveComponent
Differential Drive component class.
Definition: DifferentialDriveComponent.h:60
UDifferentialDriveComponentBase::UpdateMovement
virtual void UpdateMovement(float DeltaTime) override
Calculate wheel velocity from Velocity(member of UMovementComponent) and AngularVelocity,...
EDiffDriveWheel
EDiffDriveWheel
Wheel type of differential drive.
Definition: DifferentialDriveComponentBase.h:48
UDifferentialDriveComponentBase::GetWheelVelocity
virtual float GetWheelVelocity(const EDiffDriveWheel WheelIndex)
Get the Wheel Velocity [cm/s].
DifferentialDriveComponentBase.h
Differential Drive component base class.