RapyutaSimulationPlugins
|
Base Robot vehicle movement class which is used as part of ARobotVehicle. More...
#include <RobotVehicleMovementComponent.h>
Public Member Functions | |
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 | Initialize () |
Initialize noise and odometry. More... | |
virtual void | InitData () |
Call #InitOdom, Calculate MinDistanceToFloor, and. More... | |
void | SetMovingPlatform (AActor *platform) |
bool | IsOnMovingPlatform () |
void | RemoveMovingPlatform () |
Public Attributes | |
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... | |
Protected Member Functions | |
virtual bool | IsSupportedForNetworking () const override |
virtual void | TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override |
Call UpdateMovement, and UpdateComponentVelocity. More... | |
virtual void | UpdateMovement (float InDeltaTime) |
Move actor by using SafeMoveUpdatedComponent and SlideAlongSurface. More... | |
Protected Attributes | |
float | LogLastHit = 0.f |
internal property used to log throttle. More... | |
Private Attributes | |
AActor * | MovingPlatform = nullptr |
The platform below the robot, e.g. elevator. More... | |
FVector | LastPlatformLocation = FVector::ZeroVector |
FQuat | LastPlatformRotation = FQuat::Identity |
TArray< USceneComponent * > | ContactPoints |
List all scene components on the pawn. that have the tag "ContactPoint". This is used to adapt the robot pose based on the. More... | |
Base Robot vehicle movement class which is used as part of ARobotVehicle.
Robot moves based on the Velocity(member of UMovementComponent) and AngularVelocity without considering physics.
If Robot bumped into something, try to slide along it.
If bAdaptToSurfaceBelow is true, robot will follow the pawn movement under the robot which has been defined as the
MovingPlatform (e.g. elevators), it will also adapt its pose to the floor surface configuration (e.g. slopes)
Publish odometry from world origin or initial pose.
UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
void URobotVehicleMovementComponent::InitAIMovementComp | ( | ) |
Init AIMovementComp, which drives the robot kinematically using UE AI Navigation.
|
virtual |
Call #InitOdom, Calculate MinDistanceToFloor, and.
Add all actors in PawnOwner which has tag "ContactPoints" to ContactPoints
|
virtual |
Initialize noise and odometry.
Reimplemented in UDifferentialDriveComponentBase.
bool URobotVehicleMovementComponent::IsOnMovingPlatform | ( | ) |
|
inlineoverrideprotectedvirtual |
void URobotVehicleMovementComponent::RemoveMovingPlatform | ( | ) |
void URobotVehicleMovementComponent::SetMovingPlatform | ( | AActor * | platform | ) |
|
overridevirtual |
Assign a #USceneComponent as #UpdatedComponent.
InNewUpdatedComponent |
|
overrideprotectedvirtual |
Call UpdateMovement, and UpdateComponentVelocity.
DeltaTime | |
TickType | |
ThisTickFunction |
Reimplemented in URRKinematicTricycleDriveComponent, and UDifferentialDriveComponentBase.
|
protectedvirtual |
Move actor by using SafeMoveUpdatedComponent and SlideAlongSurface.
Calculate DesiredMovement and DesiredRotation from deltatime, UpdatedComponent and AngularVelocity.
If bAdaptToSurfaceBelow is true, robot will follow the pawn movement under the robot with tag "ContactPoints".
Please check the .cpp file for detailed implementation to follow platform.
InDeltaTime |
Reimplemented in UDifferentialDriveComponentBase, UDifferentialDriveComponent, and URRDifferentialDriveComponent.
TObjectPtr<URRFloatingMovementComponent> URobotVehicleMovementComponent::AIMovementComp = nullptr |
FVector URobotVehicleMovementComponent::AngularVelocity = FVector::ZeroVector |
[deg/s] AngularVelocity control input for [UpdatedComponent]
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Velocity)
bool URobotVehicleMovementComponent::bAdaptToSurfaceBelow = true |
to activate/deactivate floor checks to stick the robot on its surface below
|
private |
List all scene components on the pawn. that have the tag "ContactPoint". This is used to adapt the robot pose based on the.
floor surface configuration.
FVector URobotVehicleMovementComponent::DesiredMovement = FVector::ZeroVector |
Desired position calculated from deltatime and UpdatedComponent::ComponentVelocity.
FQuat URobotVehicleMovementComponent::DesiredRotation = FQuat::Identity |
Desired orientation calculated from deltatime and AngularVelocity.
float URobotVehicleMovementComponent::FallingSpeed = 100.f |
[cm/s] How much the robot falls if no floor beneath ( FallingSpeed * DeltaTime )
int8 URobotVehicleMovementComponent::InversionFactor = 1 |
|
private |
|
private |
|
protected |
internal property used to log throttle.
float URobotVehicleMovementComponent::MinDistanceToFloor = 0.f |
[cm] Z distance between the robot root location and the floor, used when less than 3 contact points are defined
|
private |
The platform below the robot, e.g. elevator.
URRBaseOdomComponent* URobotVehicleMovementComponent::OdomComponent = nullptr |
Odometry source.
ARRBaseRobot* URobotVehicleMovementComponent::OwnerVehicle = nullptr |
float URobotVehicleMovementComponent::RayOffsetDown = 20.f |
Ray end Z offset.
Rays go from ContactPoint+RayOffsetUp to ContactPoint-RayOffsetDown
float URobotVehicleMovementComponent::RayOffsetUp = 10.f |
Ray start Z offset. Value must be > possible penetration of objects in contact point, in one tick.