RapyutaSimulationPlugins
|
Differential Drive component class. More...
#include <DifferentialDriveComponent.h>
Public Member Functions | |
virtual void | UpdateMovement (float DeltaTime) override |
Calculate wheel velocity from Velocity(member of UMovementComponent) and AngularVelocity, and set by calling SetAngularVelocityTarget. More... | |
void | SetWheels (UPhysicsConstraintComponent *InWheelLeft, UPhysicsConstraintComponent *InWheelRight) |
Set left and right wheels. More... | |
virtual float | GetWheelVelocity (const EDiffDriveWheel WheelIndex) override |
Get the Wheel Velocity [cm/s]. More... | |
Public Member Functions inherited from UDifferentialDriveComponentBase | |
virtual void | TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override |
Call UpdateOdom in addition to update movement. More... | |
virtual void | UpdateOdom (float DeltaTime) |
Calculate odometry from Velocity and AngularVelocity. More... | |
virtual void | Initialize () override |
Call Super::Initialize() and SetPerimeter. More... | |
void | SetPerimeter () |
SetPerimeter from WheelRadius * 2.f * M_PI. More... | |
Public Member Functions inherited from URobotVehicleMovementComponent | |
void | InitAIMovementComp () |
Init AIMovementComp, which drives the robot kinematically using UE AI Navigation. More... | |
virtual void | SetUpdatedComponent (USceneComponent *InNewUpdatedComponent) override |
Assign a #USceneComponent as #UpdatedComponent. More... | |
virtual void | InitData () |
Call #InitOdom, Calculate MinDistanceToFloor, and. More... | |
void | SetMovingPlatform (AActor *platform) |
bool | IsOnMovingPlatform () |
void | RemoveMovingPlatform () |
Public Attributes | |
UPhysicsConstraintComponent * | WheelLeft = nullptr |
UPhysicsConstraintComponent * | WheelRight = nullptr |
Public Attributes inherited from UDifferentialDriveComponentBase | |
float | WheelRadius = 1.f |
[cm] More... | |
float | WheelSeparationHalf = 1.f |
[cm] More... | |
float | MaxForce = 1000.f |
Public Attributes inherited from URobotVehicleMovementComponent | |
ARRBaseRobot * | OwnerVehicle = nullptr |
TObjectPtr< URRFloatingMovementComponent > | AIMovementComp = nullptr |
FVector | AngularVelocity = FVector::ZeroVector |
[deg/s] AngularVelocity control input for [UpdatedComponent] More... | |
FVector | DesiredMovement = FVector::ZeroVector |
Desired position calculated from deltatime and UpdatedComponent::ComponentVelocity. More... | |
FQuat | DesiredRotation = FQuat::Identity |
Desired orientation calculated from deltatime and AngularVelocity. More... | |
float | RayOffsetUp = 10.f |
Ray start Z offset. Value must be > possible penetration of objects in contact point, in one tick. More... | |
float | RayOffsetDown = 20.f |
Ray end Z offset. More... | |
bool | bAdaptToSurfaceBelow = true |
to activate/deactivate floor checks to stick the robot on its surface below More... | |
int8 | InversionFactor = 1 |
float | MinDistanceToFloor = 0.f |
[cm] Z distance between the robot root location and the floor, used when less than 3 contact points are defined More... | |
float | FallingSpeed = 100.f |
[cm/s] How much the robot falls if no floor beneath ( FallingSpeed * DeltaTime ) More... | |
URRBaseOdomComponent * | OdomComponent = nullptr |
Odometry source. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from URobotVehicleMovementComponent | |
virtual bool | IsSupportedForNetworking () const override |
Protected Attributes inherited from UDifferentialDriveComponentBase | |
float | WheelPerimeter = 6.28f |
[cm] More... | |
float | PoseEncoderX = 0.f |
[cm] More... | |
float | PoseEncoderY = 0.f |
[cm] More... | |
float | PoseEncoderThetaRad = 0.f |
[rad] More... | |
Protected Attributes inherited from URobotVehicleMovementComponent | |
float | LogLastHit = 0.f |
internal property used to log throttle. More... | |
Differential Drive component class.
Simulate differential drive by using 2 UPhysicsConstraintComponent.
Calculate wheel rotation from given Velocity(member of UMovementComponent) and AngularVelocity and set by calling SetAngularVelocityTarget
Publish odometry from Velocity and AngularVelocity.
UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
|
overridevirtual |
Get the Wheel Velocity [cm/s].
index | index of wheels |
Reimplemented from UDifferentialDriveComponentBase.
void UDifferentialDriveComponent::SetWheels | ( | UPhysicsConstraintComponent * | InWheelLeft, |
UPhysicsConstraintComponent * | InWheelRight | ||
) |
|
overridevirtual |
Calculate wheel velocity from Velocity(member of UMovementComponent) and AngularVelocity, and set by calling SetAngularVelocityTarget.
SetAngularDriveParams as well.
DeltaTime |
Reimplemented from UDifferentialDriveComponentBase.
UPhysicsConstraintComponent* UDifferentialDriveComponent::WheelLeft = nullptr |
UPhysicsConstraintComponent* UDifferentialDriveComponent::WheelRight = nullptr |