RapyutaSimulationPlugins
Public Member Functions | Protected Member Functions | List of all members
URRKinematicJointComponent Class Reference

Kinematic Joint component. Uses K2_SetWorldTransform to move joint. More...

#include <RRKinematicJointComponent.h>

Inheritance diagram for URRKinematicJointComponent:
Inheritance graph
[legend]
Collaboration diagram for URRKinematicJointComponent:
Collaboration graph
[legend]

Public Member Functions

 URRKinematicJointComponent ()
 
virtual void InitializeComponent () override
 Initialize JointToChildLink and ParentLinkToJoint. More...
 
virtual void SetVelocityTarget (const FVector &InLinearVelocity, const FVector &InAngularVelocity) override
 Set velocity target. More...
 
virtual void SetPose (const FVector &InPosition, const FRotator &InOrientation) override
 Super::SetPose + UpdatePose. More...
 
virtual void SetPoseTarget (const FVector &InPosition, const FRotator &InOrientation) override
 Set the Pose Target. Set LinearVelocity and AngularVelocity. More...
 
virtual void UpdatePose ()
 Update joints and ChildLink pose by K2_SetWorldTransform with PositionTarget and OrientationTarget. More...
 
virtual void Teleport (const FVector &InPosition, const FRotator &InOrientation) override
 Teleport robot to given pose. Just call SetPose. More...
 
virtual void MoveToInitPose ()
 
- Public Member Functions inherited from URRJointComponent
 URRJointComponent ()
 
virtual bool IsValid ()
 
virtual void TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
 Call #UpdatePose after update PositionTarget and OrientationTarget with LinearVelocity and AngularVelocity. More...
 
virtual void SetVelocity (const FVector &InLinearVelocity, const FVector &InAngularVelocity)
 Directly set velocity. More...
 
virtual void SetSingleLinearVelocityTarget (const float Input)
 Utility wrapper of SetVelocityTarget to provide 1 DoF target orientation. More...
 
virtual void SetSingleAngularVelocityTarget (const float Input)
 Utility wrapper of SetVelocityTarget to provide 1 DoF target position. More...
 
virtual void SetVelocityTargetWithDelegates (const FVector &InLinearVelocity, const FVector &InAngularVelocity, const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InLinearTolerance=-1.0, const float InAngularTolerance=-1.0, const float InTimeOut=-1.0)
 Set the Velocity Target With Delegates object. More...
 
virtual void SetSingleLinearVelocityTargetWithDelegates (const float Input, const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InLinearTolerance=-1.0, const float InTimeOut=-1.0)
 Utility wrapper of SetVelocityTargetWithDelegates to provide 1 DoF targetlinear velocity. More...
 
virtual void SetSingleAngularVelocityTargetWithDelegates (const float Input, const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InAngularTolerance=-1.0, const float InTimeOut=-1.0)
 Utility wrapper of SetVelocityTargetWithDelegates to provide 1 DoF target angular velocity. More...
 
virtual void SetVelocityWithArray (const TArray< float > &InVelocity)
 Set the Velocity With TArray. More...
 
virtual void SetVelocityTargetWithArray (const TArray< float > &InVelocity)
 Set the Velocity Target. More...
 
virtual void SetVelocityTargetWithArrayWithDelegates (const TArray< float > &InVelocity, const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InLinearTolerance=-1.0, const float InAngularTolerance=-1.0, const float InTimeOut=-1.0)
 Set the Velocity Target With Array With Delegates object. More...
 
virtual bool HasReachedVelocityTarget (const float InLinearTolerance=-1.f, const float InAngularTolerance=-1.f)
 Check Pose reach the target pose. More...
 
virtual void SetSinglePositionTarget (const float Input)
 Utility wrapper of SetPoseTarget to provide 1 DoF target orientation. More...
 
virtual void SetSingleOrientationTarget (const float Input)
 Utility wrapper of SetPoseTarget to provide 1 DoF target position. More...
 
virtual void SetPoseTargetWithDelegates (const FVector &InPosition, const FRotator &InOrientation, const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InPositionTolerance=-1.0, const float InOrientationTolerance=-1.0, const float InTimeOut=-1.0)
 Set Pose Target. More...
 
virtual void SetSinglePositionTargetWithDelegates (const float Input, const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InPositionTolerance=-1.0, const float InTimeOut=-1.0)
 Utility wrapper of SetPoseTargetWithDelegates to provide 1 DoF target position. More...
 
virtual void SetSingleOrientationTargetWithDelegates (const float Input, const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InOrientationTolerance=-1.0, const float InTimeOut=-1.0)
 Utility wrapper of SetPoseTargetWithDelegates to provide 1 DoF target orientation. More...
 
virtual bool HasReachedPoseTarget (const float InPositionTolerance=-1.f, const float InOrientationTolerance=-1.f)
 Check Pose reach the target pose. More...
 
virtual void SetPoseWithArray (const TArray< float > &InPose)
 Directly set pose. More...
 
virtual void SetPoseTargetWithArray (const TArray< float > &InPose)
 Set Pose Target. More...
 
virtual void SetPoseTargetWithArrayWithDelegates (const TArray< float > &InPose, const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InPositionTolerance=-1.0, const float InOrientationTolerance=-1.0, const float InTimeOut=-1.0)
 Set Pose Target. More...
 
FTransform GetJointToChildLink ()
 
FTransform GetParentLinkToJoint ()
 

Protected Member Functions

virtual void UpdateState (const float DeltaTime) override
 
virtual void UpdateControl (const float DeltaTime) override
 
- Protected Member Functions inherited from URRJointComponent
virtual void PoseFromArray (const TArray< float > &InPose, FVector &OutPosition, FRotator &OutOrientation)
 
virtual void VelocityFromArray (const TArray< float > &InVelocity, FVector &OutLinearVelocity, FVector &OutAngularVelocity)
 
virtual void SetDelegates (const FJointCallback &InOnControlSuccessDelegate, const FJointCallback &InOnControlFailDelegate, const float InPositionTolerance=-1.0, const float InOrientationTolerance=-1.0, const float InLinearTolerance=-1.0, const float InAngularTolerance=-1.0, const float InTimeOut=-1.0f)
 Set Delegates which will be unbounded when move is completed or timeouthappen. More...
 
virtual void ResetControl ()
 

Additional Inherited Members

- Public Attributes inherited from URRJointComponent
FVector LinearVelocity = FVector::ZeroVector
 
FVector AngularVelocity = FVector::ZeroVector
 
FVector LinearVelocityTarget = FVector::ZeroVector
 
FVector AngularVelocityTarget = FVector::ZeroVector
 
FVector PositionTarget = FVector::ZeroVector
 
FRotator OrientationTarget = FRotator::ZeroRotator
 
FVector Position = FVector::ZeroVector
 
FRotator Orientation = FRotator::ZeroRotator
 
float PositionTolerance = 1.f
 [cm] tolerance for control More...
 
float OrientationTolerance = 1.f
 [degree] tolerance for control More...
 
float LinearVelocityTolerance = 10.f
 [cm/s] tolerance for control More...
 
float AngularVelocityTolerance = 10.f
 [degree/s] tolerance for control More...
 
UStaticMeshComponent * ParentLink
 
UStaticMeshComponent * ChildLink
 
ERRJointControlType ControlType = ERRJointControlType::POSITION
 
uint8 LinearDOF = 0
 Linear Degrees Of Freedom. More...
 
uint8 RotationalDOF = 1
 Rotational Degrees Of Freedom. More...
 
FVector PositionMax = FVector(1000, 1000, 1000)
 Pose Limitations[cm]. More...
 
FVector PositionMin = FVector(-1000, -1000, -1000)
 Pose Limitations[cm]. More...
 
FRotator OrientationMax = FRotator(180.f)
 Orientation Limitations[deg]. More...
 
FRotator OrientationMin = FRotator(-180, -180, -180)
 Orientation Limitations[deg]. More...
 
FVector LinearVelMax = FVector(1000, 1000, 1000)
 Linear Velocity Limitations[cm/s]. More...
 
FVector AngularVelMax = FVector(180.f)
 Angular Velocity Limitations[deg/s]. More...
 
bool bLimitRoll = true
 
bool bLimitPitch = true
 
bool bLimitYaw = true
 
FVector InitialPosition = FVector::ZeroVector
 
FRotator InitialOrientation = FRotator::ZeroRotator
 
- Protected Attributes inherited from URRJointComponent
FTransform JointToChildLink = FTransform::Identity
 
FTransform ParentLinkToJoint = FTransform::Identity
 
bool bMovingToTargetPose = false
 true if joint is moving to target pose More...
 
bool bMovingToTargetVelocity = false
 true if joint is moving to target velocity More...
 
FJointCallback OnControlSuccessDelegate
 Delegate which is called when joint reach target vel/pose. More...
 
FJointCallback OnControlFailDelegate
 Delegate which is called whenjoint failed to reach target vel/pose. More...
 
float ControlStartTime = 0.f
 time when target pose/vel are set. More...
 
float ControlTimeout = -1.0f
 timeout. If joint can't reach target in this duration, OnControlFailDelegate should be called. More...
 

Detailed Description

Kinematic Joint component. Uses K2_SetWorldTransform to move joint.

Expects Joint(this) is child component of ParentLink and ChildLink is child component of Joint(this). Use initial pose

relations among parent link, joint and child link to calculate joint movement.

#Controltype:

See also
K2_SetWorldTransform

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))

Constructor & Destructor Documentation

◆ URRKinematicJointComponent()

URRKinematicJointComponent::URRKinematicJointComponent ( )

Member Function Documentation

◆ InitializeComponent()

virtual void URRKinematicJointComponent::InitializeComponent ( )
overridevirtual

Initialize JointToChildLink and ParentLinkToJoint.

Reimplemented from URRJointComponent.

◆ MoveToInitPose()

virtual void URRKinematicJointComponent::MoveToInitPose ( )
virtual

◆ SetPose()

virtual void URRKinematicJointComponent::SetPose ( const FVector &  InPosition,
const FRotator &  InOrientation 
)
overridevirtual

Super::SetPose + UpdatePose.

Reimplemented from URRJointComponent.

◆ SetPoseTarget()

virtual void URRKinematicJointComponent::SetPoseTarget ( const FVector &  InPosition,
const FRotator &  InOrientation 
)
overridevirtual

Set the Pose Target. Set LinearVelocity and AngularVelocity.

Velocity become Max, Min or Zero velocity.

Parameters
InPosition
InOrientation

Reimplemented from URRJointComponent.

◆ SetVelocityTarget()

virtual void URRKinematicJointComponent::SetVelocityTarget ( const FVector &  InLinearVelocity,
const FVector &  InAngularVelocity 
)
overridevirtual

Set velocity target.

Velocity become same value as VelocityTarget with Kinematic Mode.

Parameters
InLinearVelocity
InAngularVelocity

Reimplemented from URRJointComponent.

◆ Teleport()

virtual void URRKinematicJointComponent::Teleport ( const FVector &  InPosition,
const FRotator &  InOrientation 
)
overridevirtual

Teleport robot to given pose. Just call SetPose.

Parameters
InPosition
InOrientation

Reimplemented from URRJointComponent.

◆ UpdateControl()

virtual void URRKinematicJointComponent::UpdateControl ( const float  DeltaTime)
overrideprotectedvirtual

UFUNCTION()

Reimplemented from URRJointComponent.

◆ UpdatePose()

virtual void URRKinematicJointComponent::UpdatePose ( )
virtual

Update joints and ChildLink pose by K2_SetWorldTransform with PositionTarget and OrientationTarget.

See also
K2_SetWorldTransform

◆ UpdateState()

virtual void URRKinematicJointComponent::UpdateState ( const float  DeltaTime)
overrideprotectedvirtual

UFUNCTION()

Reimplemented from URRJointComponent.


The documentation for this class was generated from the following file: