Go to the documentation of this file.
15 #include "ChaosVehicleWheel.h"
17 #include "CoreMinimal.h"
19 #include "Misc/Paths.h"
21 #include "Templates/SharedPointer.h"
35 #include "RREntityStructs.generated.h"
320 SpringStiff = InStiffness;
334 : JointName(InJointName), SpringStiff(InStiffness), Damping(InDamping)
356 Category =
"Spring-Damper",
358 meta = (ClampMin =
"0.0", ClampMax =
"1000000000.0", UIMin =
"0.0", UIMax =
"1000000000.0"))
360 float SpringStiff = 0.f;
367 Category =
"Spring-Damper",
369 meta = (ClampMin =
"0.0", ClampMax =
"1000000000.0", UIMin =
"0.0", UIMax =
"1000000000.0"))
371 float LimitSpringStiff = 0.f;
380 Category =
"Spring-Damper",
382 meta = (ClampMin =
"0.0", ClampMax =
"500.0", UIMin =
"0.0", UIMax =
"500.0"))
391 Category =
"Spring-Damper",
393 meta = (ClampMin =
"0.0", ClampMax =
"500.0", UIMin =
"0.0", UIMax =
"500.0"))
395 float LimitDamping = 0.f;
402 Category =
"Spring-Damper",
404 meta = (ClampMin =
"0.0", ClampMax =
"1000000000.0", UIMin =
"0.0", UIMax =
"1000000000.0"))
406 float Friction = 0.f;
413 Category =
"Spring-Damper",
415 meta = (ClampMin =
"0.0", ClampMax =
"1000000000.0", UIMin =
"0.0", UIMax =
"1000000000.0"))
417 float SpringRef = 0.f;
424 Category =
"Spring-Damper",
426 meta = (ClampMin =
"0.0", ClampMax =
"10000000.0", UIMin =
"0.0", UIMax =
"10000000.0"))
428 float MaxForceLimit = 100000000.f;
439 float MaxVelocity = 1000000.f;
450 float KVelocity = 0.f;
491 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- SpringStiff %f LimitSpringStiff %f"), SpringStiff, LimitSpringStiff);
493 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Damping %f LimitDamping %f"), Damping, LimitDamping);
495 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Friction %f SpringRef %f"), Friction, SpringRef);
497 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- MaxForceLimit %f MaxVelocity %f"), MaxForceLimit, MaxVelocity);
598 FVector Location = FVector::ZeroVector;
609 FQuat Rotation = FQuat::Identity;
620 bool bIsTransformRelative =
true;
628 return FTransform(Rotation, Location);
658 float MimicMultiplier = 1.0f;
667 float MimicOffset = 0.0f;
674 FVector Axis = FVector::ZeroVector;
681 FVector AxisInParentFrame = FVector::ZeroVector;
683 const FVector&
GetAxis(
bool bIsLocal =
false)
const
687 return bIsLocal ? Axis : AxisInParentFrame;
700 float LowerLimit = 0.f;
711 float UpperLimit = 0.f;
726 return Name.Equals(JointProp.
Name);
734 return Name.Equals(String);
812 return (UpperLimit > UE_TWO_PI) ? ACM_Free : ACM_Limited;
850 FVector
GetJointAxis(
bool bIsGlobal =
false,
const FQuat& InLinkQuat = FQuat::Identity)
const
856 return bIsGlobal ? InLinkQuat.RotateVector(Axis) : Axis;
888 return FMath::IsNearlyEqual(FMath::Abs(InAxis.X), 1.f, 1.e-3f);
920 return FMath::IsNearlyEqual(FMath::Abs(InAxis.Z), 1.f, 1.e-3f);
952 return FMath::IsNearlyEqual(FMath::Abs(InAxis.Y), 1.f, 1.e-3f);
956 void GetTwistSwing(
bool& bOutTwist,
bool& bOutSwing1,
bool& bOutSwing2)
const
960 bOutTwist = IsTwisting(AxisInParentFrame);
962 bOutSwing1 = IsSwing1(AxisInParentFrame);
964 bOutSwing2 = IsSwing2(AxisInParentFrame);
968 void GetLinearXYZ(
bool& bOutLinearX,
bool& bOutLinearY,
bool& bOutLinearZ)
const
972 bOutLinearX = FMath::IsNearlyEqual(FMath::Abs(AxisInParentFrame.X), 1.f, 1.e-3f);
974 bOutLinearY = FMath::IsNearlyEqual(FMath::Abs(AxisInParentFrame.Y), 1.f, 1.e-3f);
976 bOutLinearZ = FMath::IsNearlyEqual(FMath::Abs(AxisInParentFrame.Z), 1.f, 1.e-3f);
986 return (LowerLimit <= UpperLimit) ? (InJointPos >= LowerLimit) && (InJointPos <= UpperLimit) :
false;
996 : (InJointVelocity != 0.f);
1004 UE_LOG_WITH_INFO(LogTemp,
1008 TEXT(
"Joint Name: %s - Type %s"),
1014 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Location: %s"), *Location.ToString());
1016 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Rotation: %s - %s"), *Rotation.ToString(), *FRotator(Rotation).ToString());
1018 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- ParentLinkName: %s"), *ParentLinkName);
1020 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- ChildLinkName: %s"), *ChildLinkName);
1022 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Axis: %s"), *Axis.ToString());
1024 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- MimicJointName: %s"), *MimicJointName);
1026 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- MimicMultiplier: %f"), MimicMultiplier);
1028 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- MimicOffset: %f"), MimicOffset);
1030 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- LowerLimit: %f"), LowerLimit);
1032 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- UpperLimit: %f"), UpperLimit);
1064 double Position = 0;
1073 double LinearVel = 0;
1082 double AngularVel = 0;
1090 return FString::Printf(
1092 TEXT(
"Pos: %lf[rad or m] LinearVel: %lf[m/s] AngularVel: %lf[rad/s]"), Position, LinearVel, AngularVel);
1102 return FMath::IsNearlyEqual(Position, Other.
Position, KINDA_SMALL_NUMBER) &&
1104 FMath::IsNearlyEqual(LinearVel, Other.
LinearVel, KINDA_SMALL_NUMBER) &&
1106 FMath::IsNearlyEqual(AngularVel, Other.
AngularVel, KINDA_SMALL_NUMBER);
1116 return (
false == (*
this == Other));
1163 FVector Location = FVector::ZeroVector;
1170 FQuat Rotation = FQuat::Identity;
1252 FVector Size = FVector::ZeroVector;
1261 FVector WorldScale = FVector::OneVector;
1288 FVector Location = FVector::ZeroVector;
1295 FQuat Rotation = FQuat::Identity;
1301 return FTransform(Rotation, Location);
1352 FString TopicName = TEXT(
"sensor_data");
1363 FString FrameId = TEXT(
"sensor_frame");
1374 float PublicationFrequencyHz = 0.f;
1382 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- TopicName: %s"), *TopicName);
1384 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- FrameId: %s"), *FrameId);
1386 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- PublicationFrequencyHz: %f"), PublicationFrequencyHz);
1429 int32 NHorSamplesPerScan = 360;
1440 int32 NVerSamplesPerScan = 360;
1451 float HMinAngle = 0.f;
1460 float HMaxAngle = 0.f;
1469 float HResolution = 0.f;
1478 float VMinAngle = 0.f;
1487 float VMaxAngle = 0.f;
1496 float VResolution = 0.f;
1509 float MinRange = 0.f;
1518 float MaxRange = 0.f;
1527 float RangeResolution = 0.f;
1545 double NoiseMean = 0;
1552 double NoiseStdDev = 0;
1568 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Scan horizontal"));
1570 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ NHorSamplesPerScan: %d"), NHorSamplesPerScan);
1572 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ HMinAngle: %f"), HMinAngle);
1574 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ HMaxAngle: %f"), HMaxAngle);
1576 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ HResolution: %f"), HResolution);
1580 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Scan vertical"));
1582 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ NVerSamplesPerScan: %d"), NVerSamplesPerScan);
1584 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ VMinAngle: %f"), VMinAngle);
1586 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ VMaxAngle: %f"), VMaxAngle);
1588 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ VResolution: %f"), VResolution);
1592 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Range"));
1594 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ MinRange: %f"), MinRange);
1596 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ MinRange: %f"), MaxRange);
1598 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ Resolution: %f"), RangeResolution);
1602 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Noise"));
1604 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ Type: %s"), *NoiseTypeName);
1606 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ Mean: %f"), NoiseMean);
1608 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"\t+ StdDev: %f"), NoiseStdDev);
1667 UE_LOG_WITH_INFO(LogTemp,
1671 TEXT(
"Sensor: %s %s"),
1677 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Link: %s"), *LinkName);
1737 int8 LinkIndex = INDEX_NONE;
1744 int8 ParentLinkIndex = INDEX_NONE;
1759 FVector Location = FVector::ZeroVector;
1768 FQuat Rotation = FQuat::Identity;
1774 return FTransform(Rotation, Location);
1804 return VisualList.IsValidIndex(InVisualIndex) ? VisualList[InVisualIndex].GetTransformOffset() : FTransform::Identity;
1812 return GetRelativeTransformToParent() * GetVisualOffset(InVisualIndex);
1827 return Name.Equals(LinkProp.
Name);
1835 return Name.Equals(String);
1852 UE_LOG_WITH_INFO(LogTemp, Warning, TEXT(
"Link Name: %s -> ParentFrameName: %s"), *Name, *ParentFrameName);
1854 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Location: %s"), *Location.ToString());
1856 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Rotation: %s - %s"), *Rotation.ToString(), *FRotator(Rotation).ToString());
1860 for (
const auto& visual : VisualList)
1864 UE_LOG_WITH_INFO(LogTemp, Warning, TEXT(
"Visual: %s"), *visual.Name);
1866 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Link: %s"), *visual.LinkName);
1868 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- MeshName: %s"), *visual.MeshName);
1872 LogTemp, Display, TEXT(
"- Size: %s - WorldScale: %s"), *visual.Size.ToString(), *visual.WorldScale.ToString());
1874 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Location: %s"), *visual.Location.ToString());
1878 LogTemp, Display, TEXT(
"- Rotation: %s - %s"), *visual.Rotation.ToString(), *FRotator(visual.Rotation).ToString());
1880 visual.MaterialInfo.PrintSelf();
1886 for (
const auto& collision : CollisionList)
1890 UE_LOG_WITH_INFO(LogTemp, Warning, TEXT(
"Collision: %s"), *collision.Name);
1892 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Link: %s"), *collision.LinkName);
1894 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- MeshName: %s"), *collision.MeshName);
1896 UE_LOG_WITH_INFO(LogTemp,
1900 TEXT(
"- Size: %s - WorldScale: %s"),
1902 *collision.Size.ToString(),
1904 *collision.WorldScale.ToString());
1906 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"- Location: %s"), *collision.Location.ToString());
1908 UE_LOG_WITH_INFO(LogTemp,
1912 TEXT(
"- Rotation: %s - %s"),
1914 *collision.Rotation.ToString(),
1916 *FRotator(collision.Rotation).ToString());
1922 for (
const auto& sensor : SensorList)
1991 EAxleType AxleType = EAxleType::Undefined;
2006 FVector Offset = FVector::ZeroVector;
2017 float WheelRadius = 0.f;
2028 float WheelWidth = 0.f;
2037 float CorneringStiffness = 1000.f;
2046 float FrictionForceMultiplier = 2.f;
2057 float SideSlipModifier = 1.f;
2068 float SlipThreshold = 20.f;
2079 float SkidThreshold = 20.f;
2088 bool bAffectedBySteering =
false;
2097 bool bAffectedByBrake =
true;
2106 bool bAffectedByHandbrake =
false;
2117 bool bAffectedByEngine =
false;
2128 bool bABSEnabled =
false;
2139 bool bTractionControlEnabled =
false;
2150 ETorqueCombineMethod ExternalTorqueCombineMethod = ETorqueCombineMethod::None;
2170 FVector SuspensionAxis = FVector(0.f, 0.f, -1.f);
2181 FVector SuspensionForceOffset = FVector::ZeroVector;
2194 float SuspensionMaxRaise = 10.f;
2207 float SuspensionMaxDrop = 10.f;
2218 float SuspensionDampingRatio = 0.5f;
2231 int8 SuspensionSmoothing = 0;
2248 float WheelLoadRatio = 0.5f;
2259 float SpringRate = 250.0f;
2270 float SpringPreload = 50.f;
2281 float RollbarScaling = 0.15f;
2292 ESweepShape SweepShape = ESweepShape::Raycast;
2303 ESweepType SweepType = ESweepType::SimpleSweep;
2314 float MaxSteerAngleDeg = 50.f;
2325 float MaxBrakeTorque = 1500.f;
2340 float MaxHandBrakeTorque = 3000.f;
2348 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"WheelName: %s Radius %f[cm] Width %f[cm]"), *WheelName, WheelRadius, WheelWidth);
2555 int32 meshesNum = 0;
2561 meshesNum += linkProp.VisualList.Num();
2573 meshesNum += modelInfo.GetVisualsNum();
2786 if (linkProp.Name == jointProp.ChildLinkName)
2790 linkProp.Location = jointProp.Location;
2828 #if RAPYUTA_SIM_DEBUG
2832 LogTemp, Error, TEXT(
"Rem joint from parent [%s] %s"), *InLinkName, *InJointProp.GetTransform().ToString());
2850 {
return (InLinkProp.
Name == InLinkName); });
2878 {
return (InWheelProp.
WheelName == InLinkName); });
2934 if (linkProp.Name == InLinkName)
2968 if (jointProp.Name == InJointName)
3002 if (jointProp.ChildLinkName == InChildLinkName)
3038 if (linkProp.LinkIndex == InLinkIndex)
3076 if (linkProp.
Name == jointProp.ChildLinkName)
3132 int8 linkIndexCurrent = InLinkIndex;
3134 TArray<FRRRobotJointProperty> parentLinks;
3138 while (linkIndexCurrent != INDEX_NONE)
3146 parentLinks.Insert(jointProp, 0);
3154 FTransform resultTransform = FTransform::Identity;
3158 for (
const auto& jointProp : parentLinks)
3162 FTransform jointTransform = jointProp.bIsTransformRelative ? jointProp.GetTransform() : FTransform::Identity;
3164 resultTransform.SetLocation(resultTransform.GetLocation() +
3166 resultTransform.GetRotation().RotateVector(jointTransform.GetLocation()));
3168 resultTransform.SetRotation(resultTransform.GetRotation() * jointTransform.GetRotation());
3170 resultTransform.SetScale3D(resultTransform.GetScale3D() * jointTransform.GetScale3D());
3180 return resultTransform;
3234 return resultTransform;
3258 if (InLinkIndex <= 0)
3262 return FTransform::Identity;
3272 if (linkProp.LinkIndex == InLinkIndex)
3282 return FTransform::Identity;
3304 int8 linkIndexCurrent = InLinkIndex;
3310 while (linkIndexCurrent != INDEX_NONE)
3318 if (linkProp.LinkIndex == linkIndexCurrent)
3322 resultTransform = linkProp.GetRelativeTransformToParent() * resultTransform;
3324 linkIndexCurrent = linkProp.ParentLinkIndex;
3338 return resultTransform;
3441 if (wheelProp.WheelName == InWheelName)
3483 LogTemp, Log, TEXT(
"%s ModelDescType has not been set!"), *FString::Join(
ModelNameList, TEXT(
",")));
3533 UE_LOG_WITH_INFO(LogTemp, Log, TEXT(
"%s DescriptionFilePath EMPTY!"), *FString::Join(
ModelNameList, TEXT(
",")));
3551 UE_LOG_WITH_INFO(LogTemp, Log, TEXT(
"%s BaseFolderPath EMPTY!"), *FString::Join(
ModelNameList, TEXT(
",")));
3567 UE_LOG_WITH_INFO(LogTemp, Log, TEXT(
"%s LinkPropList EMPTY!"), *FString::Join(
ModelNameList, TEXT(
",")));
3585 LogTemp, Log, TEXT(
"[%s] This should be a single model only!"), *FString::Join(
ModelNameList, TEXT(
",")));
3597 bool bBaseLinkFound =
false;
3607 bBaseLinkFound =
true;
3615 if (
false == bBaseLinkFound)
3623 UE_LOG_WITH_INFO(LogTemp, Log, TEXT(
"BaseLinkName [%s] is not a link name!"), *
BaseLinkName);
3637 bool bAllArtLinksFound =
true;
3643 bool bLinkFound =
false;
3649 if (artLinkName == linkProp.Name)
3661 if (
false == bLinkFound)
3665 bAllArtLinksFound =
false;
3671 UE_LOG_WITH_INFO(LogTemp, Log, TEXT(
"Articulated link [%s] is not a link name!"), *artLinkName);
3681 if (
false == bAllArtLinksFound)
3695 bool bAllEELinksFound =
true;
3701 bool bEELinkFound =
false;
3707 if (eeName == linkProp.Name)
3711 bEELinkFound =
true;
3719 if (
false == bEELinkFound)
3723 bAllEELinksFound =
false;
3729 UE_LOG_WITH_INFO(LogTemp, Log, TEXT(
"EndEffector [%s] is not a link name!"), *eeName);
3739 if (
false == bAllEELinksFound)
3753 bool bAllWheelsFound =
true;
3759 bool bWheelFound =
false;
3765 if (linkProp.Name == wheelProp.WheelName)
3777 if (
false == bWheelFound)
3781 bAllWheelsFound =
false;
3787 UE_LOG_WITH_INFO(LogTemp, Log, TEXT(
"Wheel [%s] is not a link name!"), *wheelProp.WheelName);
3797 if (
false == bAllWheelsFound)
3815 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"WorldName: %s"), *
WorldName);
3819 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"bHasWorldJoint: %d"),
bHasWorldJoint);
3821 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"ModelNameList: %s"), *FString::Join(
ModelNameList, TEXT(
",")));
3823 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"BaseFolderPath: %s"), *FPaths::ConvertRelativePathToFull(
BaseFolderPath));
3827 LogTemp, Display, TEXT(
"DescriptionFilePath: %s"), *FPaths::ConvertRelativePathToFull(
DescriptionFilePath));
3829 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"ParentFrameName: %s"), *
ParentFrameName);
3831 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"RelativeTransform: %s"), *
RelativeTransform.ToString());
3833 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"BaseLinkName: %s"), *
BaseLinkName);
3839 linkProp.PrintSelf();
3847 jointProp.PrintSelf();
3851 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"ArticulatedLinksNames: %s"), *FString::Join(
ArticulatedLinksNames, TEXT(
",")));
3853 UE_LOG_WITH_INFO(LogTemp, Display, TEXT(
"EndEffectorNames: %s"), *FString::Join(
EndEffectorNames, TEXT(
",")));
3859 wheelProp.PrintSelf();
3873 UE_LOG_WITH_INFO(LogTemp, Warning, TEXT(
"SUBMODEL"));
3875 modelInfo.PrintSelf();
3939 struct RAPYUTASIMULATIONPLUGINS_API
FRREntityModelInfo :
public TSharedFromThis<FRREntityModelInfo, ESPMode::ThreadSafe>
4347 FORCEINLINE
bool HasWheel(
const FString& InWheelName)
const
4361 return (Data == OtherModelInfo.
Data);
4365 FORCEINLINE
bool IsValid(
bool bIsLogged =
false)
const
4369 return Data.
IsValid(bIsLogged);
4399 static constexpr
const int8 ELEMENT_INDEX_NONE = -1;
4417 FString meshName(InMeshName);
4419 if (meshName.RemoveFromStart(TEXT(
"package://")) || meshName.RemoveFromStart(TEXT(
"model://")))
4423 return FPaths::ConvertRelativePathToFull(InRobotModelsFolderFullPath, meshName);
FTransform GetLinkVisualOffsetToBase(int8 InLinkIndex) const
Get the visual offset transform of a link to base link its LinkIndex.
Definition: RREntityStructs.h:3300
FString BaseFolderPath
Path to the base package folder, from which meshes' CAD file paths are defined as relative to.
Definition: RREntityStructs.h:2590
The FRRRobotJointProperty struct.
Definition: RREntityStructs.h:524
FRRRobotWheelProperty(FString InWheelName)
Definition: RREntityStructs.h:1965
ERREntityMeshComponentType
Definition: RREntityStructs.h:271
FRRSensorLidarInfo LidarInfo
TODO: To avoid extra memory cost, this should be actually a TUniquePtr, which is only instantiated up...
Definition: RREntityStructs.h:1659
bool IsSingleCAD() const
Definition: RREntityStructs.h:2473
static FORCEINLINE FString GetEnumValueAsString(const FString &InTypeName, TEnum InEnumValue, const TCHAR *InModuleName=nullptr)
Definition: RRTypeUtils.h:118
FTransform GetLinkRelTransformToBase(int8 InLinkIndex) const
Get the relative transform of a link to base link its LinkIndex.
Definition: RREntityStructs.h:3254
const FORCEINLINE TArray< FString > & GetArticulatedLinksNames() const
Definition: RREntityStructs.h:4315
TArray< FRRRobotWheelProperty > WheelPropList
Definition: RREntityStructs.h:3431
void GetLinearXYZ(bool &bOutLinearX, bool &bOutLinearY, bool &bOutLinearZ) const
Definition: RREntityStructs.h:968
FRREntityModelInfo(FRREntityModelData &&InEntityModelData)
Definition: RREntityStructs.h:3951
FORCEINLINE FTransform GetLinkRelativeTransform(int8 InLinkIndex) const
Definition: RREntityStructs.h:4251
ERREntityGeometryType
Definition: RREntityStructs.h:129
bool IsSDF() const
Definition: RREntityStructs.h:2457
bool IsSwing2(const FVector &InAxis) const
Twist(X), Swing1(Z), Swing2(Y)
Definition: RREntityStructs.h:948
void PrintSelf() const
Definition: RREntityStructs.h:1848
#define EMPTY_STR
Definition: RRGeneralUtils.h:43
FVector GetJointAxis(bool bIsGlobal=false, const FQuat &InLinkQuat=FQuat::Identity) const
Get the Joint Axis object.
Definition: RREntityStructs.h:850
@ MOVING
Received command and in middle of processing.
FORCEINLINE int32 GetVisualsNum() const
Definition: RREntityStructs.h:4039
FORCEINLINE FRRRobotLinkProperty GetBaseLinkProp() const
Definition: RREntityStructs.h:4171
ERRJointAxisRotation
Definition: RREntityStructs.h:250
FRRMaterialProperty MaterialInfo
Definition: RREntityStructs.h:1310
FRREntityModelInfo(const FRREntityModelData &InEntityModelData)
Definition: RREntityStructs.h:3945
FTransform GetLinkRelativeTransform(int8 InLinkIndex) const
Get the relative transform of a link to its parent by its LinkIndex.
Definition: RREntityStructs.h:3198
bool IsValidJointPosition(float InJointPos) const
Definition: RREntityStructs.h:982
FORCEINLINE bool IsPlainManipulatorModel() const
Definition: RREntityStructs.h:4075
FORCEINLINE FTransform GetLinkRelTransformToBase(int8 InLinkIndex) const
Definition: RREntityStructs.h:4261
FRRRobotJointDynamicProperties DynamicParams
Definition: RREntityStructs.h:720
FRREntityModelData(TArray< FString > &&InModelNameList)
Definition: RREntityStructs.h:2426
bool IsObjectModel() const
Definition: RREntityStructs.h:2705
FORCEINLINE FRRRobotJointProperty GetJointProp(const FString &InJointName) const
Definition: RREntityStructs.h:4191
FORCEINLINE FRRRobotLinkProperty GetLinkProp(const FString &InLinkName) const
Definition: RREntityStructs.h:4181
const FORCEINLINE FString & GetBaseFolderPath() const
Definition: RREntityStructs.h:3971
bool IsTwisting(const FVector &InAxis) const
Twist(X), Swing1(Z), Swing2(Y)
Definition: RREntityStructs.h:884
virtual void ClearData()
Definition: RREntityStructs.h:4453
Definition: RREntityStructs.h:300
FRREntityModelData(const TArray< FString > &InModelNameList)
Definition: RREntityStructs.h:2420
bool IsPlainWheeledVehicleModel() const
Definition: RREntityStructs.h:2675
bool operator==(const FRREntityModelData &OtherModelData)
Definition: RREntityStructs.h:3457
TArray< FString > EndEffectorNames
Definition: RREntityStructs.h:3420
Sensor lidar info.
Definition: RREntityStructs.h:1409
FORCEINLINE FRRMaterialProperty GetBodyMaterialInfo() const
Definition: RREntityStructs.h:4293
ELinearConstraintMotion GetLinearConstraintMotion() const
Definition: RREntityStructs.h:746
FORCEINLINE void PrintSelf() const
Definition: RREntityStructs.h:4373
Definition: RREntityStructs.h:1694
static FORCEINLINE FString GetJointTypeName(const ERRRobotJointType InJointType)
Definition: RREntityStructs.h:572
@ IDLE
Being built up (loading the meshses, building the structure, etc.)
bool operator==(const FRRRobotJointValue &Other) const
Definition: RREntityStructs.h:1098
FString GetModelDescTypeName() const
Definition: RREntityStructs.h:2481
const FORCEINLINE FString GetModelName() const
Definition: RREntityStructs.h:3991
Definition: RREntityStructs.h:1143
static FORCEINLINE int8 GetEnumValueFromString(const FString &InTypeName, const FString &InEnumStringValue, const TCHAR *InModuleName=nullptr)
Definition: RRTypeUtils.h:184
void PrintSelf() const
Definition: RREntityStructs.h:1000
TArray< FString > ArticulatedLinksNames
Definition: RREntityStructs.h:3409
TArray< FString > ModelNameList
World model: [ModelNameList] >= 1.
Definition: RREntityStructs.h:2526
FRRRobotLinkProperty()
Definition: RREntityStructs.h:1700
FString WheelName
Definition: RREntityStructs.h:1978
void SetUEComponentEnabled(const ERRUEComponentType InTypeMask)
Definition: RREntityStructs.h:2659
Struct, inheriting from #FTableRowBase, storing entry data for #UDataTable.
Definition: RREntityStructs.h:3898
FRRRobotJointDynamicProperties(float InStiffness, float InDamping, float InP, float InI, float InD)
Definition: RREntityStructs.h:316
FRREntityModelData Data
Definition: RREntityStructs.h:3927
ERRLidarSensorType
Definition: RREntityStructs.h:177
FORCEINLINE FTransform GetLinkVisualOffset(int8 InLinkIndex) const
Definition: RREntityStructs.h:4231
FRREntityModelTableRow(const FRREntityModelData &InEntityModelData)
Definition: RREntityStructs.h:3904
const FORCEINLINE FRRRobotLinkProperty FindLinkProp(int8 InLinkIndex) const
Definition: RREntityStructs.h:4211
FString DescriptionFilePath
Robot Model Description File (URDF/SDF)
Definition: RREntityStructs.h:2601
Definition: RREntityStructs.h:1621
bool bIsTransformRelative
Whether Rotation & Location are absolute or relative.
Definition: RREntityStructs.h:620
int32 GetVisualsNum() const
Definition: RREntityStructs.h:2549
FORCEINLINE bool IsUEComponentEnabled(const uint8 InTypeMask) const
Definition: RREntityStructs.h:4059
const FORCEINLINE FString & GetWorldName() const
Definition: RREntityStructs.h:4001
virtual void PrintSelf() const
Definition: RREntityStructs.h:1378
FString Name
Definition: RREntityStructs.h:1232
FORCEINLINE FTransform GetLinkVisualOffsetToBase(int8 InLinkIndex) const
Definition: RREntityStructs.h:4271
virtual void PrintSelf() const override
Definition: RREntityStructs.h:1556
bool IsWorldModel() const
Definition: RREntityStructs.h:2498
FORCEINLINE int32 & GetCreatedInstancesNum()
Definition: RREntityStructs.h:4021
virtual ~FRRSensorBaseInfo()
Definition: RREntityStructs.h:1339
TArray< FRRSensorProperty > SensorList
Definition: RREntityStructs.h:1846
const FORCEINLINE FString & GetDescriptionFilePath() const
Definition: RREntityStructs.h:3981
virtual FRREntityModelInfo LoadModelInfoFromFile(const FString &Path)
Definition: RREntityStructs.h:4445
FORCEINLINE FRRMaterialProperty GetVisualMaterialInfo() const
Definition: RREntityStructs.h:4303
TArray< URRRobotNode * > Children
Definition: RREntityStructs.h:2381
bool IsRobotModel() const
Definition: RREntityStructs.h:2695
bool bHasWorldJoint
Definition: RREntityStructs.h:2513
Definition: RRObjectCommon.h:516
TArray< FRREntityGeometryInfo > VisualList
Relative visual offset to the link itself(URDF) or parent frame(SDF)
Definition: RREntityStructs.h:1798
double AngularVel
[rad/s]
Definition: RREntityStructs.h:1082
Core UE struct housing entity (robot, object) model data, wrapped by FRREntityModelInfo & FRREntityMo...
Definition: RREntityStructs.h:2414
Definition: RREntityStructs.h:1223
static FORCEINLINE ERRRobotJointType GetERRRobotJointTypeValueFromString(const FString &InEnumStringValue)
Definition: RREntityStructs.h:562
FRRRobotWheelProperty()
Definition: RREntityStructs.h:1959
FTransform RelativeTransform
Definition: RREntityStructs.h:2622
FString ChildLinkName
Definition: RREntityStructs.h:644
FORCEINLINE int32 GetCreatedInstancesNum() const
Definition: RREntityStructs.h:4011
FRRMaterialProperty GetBodyMaterialInfo() const
Definition: RREntityStructs.h:3382
FTransform GetVisualOffset(int32 InVisualIndex=0) const
Definition: RREntityStructs.h:1800
virtual bool LoadModelInfoFromXML(const FString &InXMLString, FRREntityModelInfo &OutRobotModelInfo)
Definition: RREntityStructs.h:4437
bool operator==(const FString &String)
Definition: RREntityStructs.h:730
void SetUEComponentEnabled(const int32 InTypeMask)
Definition: RREntityStructs.h:2651
FORCEINLINE bool IsRobotModel() const
Definition: RREntityStructs.h:4091
@ TOTAL
Raw single CAD (FBX, COLLADA, etc.)
FRRRobotJointProperty JointProp
Definition: RREntityStructs.h:2395
static FString GetRealPathFromMeshName(const FString &InMeshName, const FString &InRobotModelsFolderFullPath)
Definition: RREntityStructs.h:4407
int32 CreatedInstancesNum
Definition: RREntityStructs.h:2608
FRRRobotLinkInertia Inertia
Definition: RREntityStructs.h:1783
FRRRobotJointDynamicProperties(const FString &InJointName)
Definition: RREntityStructs.h:310
FORCEINLINE bool IsValid(bool bIsLogged=false) const
Definition: RREntityStructs.h:4365
bool IsValidJointVelocity(float InJointVelocity) const
Definition: RREntityStructs.h:990
void PrintSelf() const
Definition: RRObjectCommon.h:589
FRREntityModelData()
Definition: RREntityStructs.h:2432
const FORCEINLINE FString & GetBaseLinkName() const
Definition: RREntityStructs.h:4111
bool operator==(const FRRRobotJointProperty &JointProp)
Definition: RREntityStructs.h:722
FString WorldName
Definition: RREntityStructs.h:2496
FRRMaterialProperty GetVisualMaterialInfo() const
Definition: RREntityStructs.h:3392
FORCEINLINE TArray< FRRRobotLinkProperty > & GetLinkPropList()
Definition: RREntityStructs.h:4127
FORCEINLINE void RemoveLinkJointProp(const FString &InLinkName)
Definition: RREntityStructs.h:4161
FRRRobotJointProperty FindJointPropByLinkIndex(int8 InLinkIndex) const
Get the property of a joint of which the child link name matchs the link property fetched by its Link...
Definition: RREntityStructs.h:3066
bool HasDriveComponents() const
Definition: RREntityStructs.h:2683
Joint value struct, mainly to directly store input values from ROS cmds, thus units are in SI to avoi...
Definition: RREntityStructs.h:1053
FTransform GetLinkAbsoluteTransform(int8 InLinkIndex) const
Get the absolute transform of a link (in owner robot's frame) by its LinkIndex.
Definition: RREntityStructs.h:3128
FRREntityModelTableRow()
Definition: RREntityStructs.h:3916
float MaxVelocity
[rad/s or m/s]
Definition: RREntityStructs.h:439
const FORCEINLINE TArray< FRREntityModelData > & GetChildModelsData() const
Definition: RREntityStructs.h:4151
bool IsURDF() const
Definition: RREntityStructs.h:2449
FString JointName
Definition: RREntityStructs.h:345
FString BaseLinkName
Definition: RREntityStructs.h:2722
const FORCEINLINE TArray< FRRRobotJointProperty > & GetJointPropList() const
Definition: RREntityStructs.h:4135
bool operator==(const FRRRobotLinkProperty &LinkProp)
Definition: RREntityStructs.h:1823
bool IsSwing1(const FVector &InAxis) const
Twist(X), Swing1(Z), Swing2(Y)
Definition: RREntityStructs.h:916
EAngularConstraintMotion GetAngularConstraintMotion() const
Definition: RREntityStructs.h:790
FString Name
Definition: RREntityStructs.h:549
const FORCEINLINE FRRRobotJointProperty FindJointPropByLinkIndex(int8 InLinkIndex) const
Definition: RREntityStructs.h:4221
ENUM_CLASS_FLAGS(ERRUEComponentType)
TArray< FRREntityModelData > ChildModelsData
Struct recursion is NOT yet supported for UPROPERTY.
Definition: RREntityStructs.h:2744
TArray< FRRRobotLinkProperty > LinkPropList
Definition: RREntityStructs.h:2729
bool IsValid(bool bIsLogged=false) const
Definition: RREntityStructs.h:3467
FORCEINLINE bool IsUEComponentEnabled(const ERRUEComponentType InTypeMask) const
Definition: RREntityStructs.h:4067
bool IsPlainManipulatorModel() const
Definition: RREntityStructs.h:2667
FRRRobotLinkProperty(FString InName)
Definition: RREntityStructs.h:1706
FString NoiseTypeName
Definition: RREntityStructs.h:1538
FRREntityModelInfo()
Definition: RREntityStructs.h:3957
ERRShapeType
Shape types.
Definition: RRObjectCommon.h:137
FString ParentFrameName
Definition: RREntityStructs.h:2615
FString SensorName
Definition: RREntityStructs.h:1639
FRRMaterialProperty WholeBodyMaterialInfo
Definition: RREntityStructs.h:3380
FTransform GetLinkVisualOffset(int8 InLinkIndex) const
Get visual offset transform of a link by its LinkIndex.
Definition: RREntityStructs.h:3104
FORCEINLINE bool operator==(const FRREntityModelInfo &OtherModelInfo)
Definition: RREntityStructs.h:4357
virtual ~FRREntityDescriptionParser()
Definition: RREntityStructs.h:4401
Plain struct wrapping robot model data (FRREntityModelData), being thread-safe accessible through TSh...
Definition: RREntityStructs.h:3939
bool operator!=(const FRRRobotJointValue &Other) const
Definition: RREntityStructs.h:1112
bool HasWheel(const FString &InWheelName) const
Definition: RREntityStructs.h:3433
bool operator==(const FString &String)
Definition: RREntityStructs.h:1831
bool IsUEComponentEnabled(const int32 InTypeMask) const
Definition: RREntityStructs.h:2635
FORCEINLINE bool IsObjectModel() const
Definition: RREntityStructs.h:4099
void GetTwistSwing(bool &bOutTwist, bool &bOutSwing1, bool &bOutSwing2) const
Definition: RREntityStructs.h:956
Definition: RREntityStructs.h:2363
TArray< FRREntityGeometryInfo > CollisionList
Definition: RREntityStructs.h:1821
ERRRobotStatus
Definition: RREntityStructs.h:102
FRRRobotJointDynamicProperties()
Definition: RREntityStructs.h:304
Wheel property for the robot, used to store configurations for runtime #UChaosVehicleWheel setup.
Definition: RREntityStructs.h:1953
FRRRobotLinkProperty FindLinkProp(int8 InLinkIndex) const
Get the property of a link by its LinkIndex.
Definition: RREntityStructs.h:3030
void PrintSelf() const
Definition: RREntityStructs.h:2344
void UpdateLinksLocationFromJoints()
http://wiki.ros.org/urdf/XML/joint
Definition: RREntityStructs.h:2774
FORCEINLINE bool HasWorldJoint() const
Definition: RREntityStructs.h:4031
FRRRobotJointProperty(FString InName)
Definition: RREntityStructs.h:536
FORCEINLINE FRREntityGeometryInfo GetVisualInfo() const
Definition: RREntityStructs.h:4281
void PrintSelf() const
Definition: RREntityStructs.h:487
FString MimicJointName
Definition: RREntityStructs.h:651
const FORCEINLINE TArray< FRRRobotWheelProperty > & GetWheelPropList() const
Definition: RREntityStructs.h:4339
FString LinkName
Definition: RREntityStructs.h:1281
ERRRobotJointStatus
Definition: RREntityStructs.h:229
void PrintSelf() const
Definition: RREntityStructs.h:1663
TArray< FRRRobotJointProperty > JointPropList
Definition: RREntityStructs.h:2736
FTransform GetTransform() const
Definition: RREntityStructs.h:624
FString MeshName
Definition: RREntityStructs.h:1239
ERREntityDescriptionType
Definition: RREntityStructs.h:69
int32 UEComponentTypeFlags
UE Component types.
Definition: RREntityStructs.h:2633
FString GetModelName() const
Definition: RREntityStructs.h:2528
FRuntimeFloatCurve LateralSlipGraph
Definition: RREntityStructs.h:2159
FRRRobotLinkProperty GetBaseLinkProp() const
Get the property of base link of which the name is denoted by BaseLinkName.
Definition: RREntityStructs.h:2892
FString ToString() const
Definition: RREntityStructs.h:1086
bool IsUEComponentEnabled(const ERRUEComponentType InTypeMask) const
Definition: RREntityStructs.h:2643
const FORCEINLINE TArray< FString > & GetEndEffectorNames() const
Definition: RREntityStructs.h:4327
FRREntityModelData Data
Robot model data.
Definition: RREntityStructs.h:3967
FORCEINLINE FTransform GetLinkAbsoluteTransform(int8 InLinkIndex) const
Definition: RREntityStructs.h:4241
int8 ParentLinkIndex
Definition: RREntityStructs.h:1744
FTransform GetRelativeTransformToParent() const
Definition: RREntityStructs.h:1770
FTransform GetTransformOffset() const
Definition: RREntityStructs.h:1297
FVector TotalSize
Meshes are async loaded, & so their sizes.
Definition: RREntityStructs.h:2545
double Position
[rad] for REVOLUTE joint, [m] for Prismatic Joint
Definition: RREntityStructs.h:1064
FRRRobotJointProperty()
Definition: RREntityStructs.h:530
FRRRobotJointProperty GetJointPropFromChildLinkName(const FString &InChildLinkName) const
Get the property of the first joint having its child link name as InChildLinkName.
Definition: RREntityStructs.h:2994
FRRRobotJointProperty GetJointProp(const FString &InJointName) const
Get the property of a joint by name read from URDF/SDF or CAD like FBX/COLLADA.
Definition: RREntityStructs.h:2960
const FVector & GetAxis(bool bIsLocal=false) const
Definition: RREntityStructs.h:683
FRRRobotLinkProperty GetLinkProp(const FString &InLinkName) const
Get the property of a link by name read from URDF/SDF or CAD like FBX/COLLADA.
Definition: RREntityStructs.h:2926
FRREntityGeometryInfo GetVisualInfo() const
Get model visual info.
Definition: RREntityStructs.h:3350
ERRRobotJointType
Definition: RREntityStructs.h:198
FString ParentFrameName
Only available in SDF.
Definition: RREntityStructs.h:1728
FString LinkName
Definition: RREntityStructs.h:1632
bool IsUEDataTable() const
Definition: RREntityStructs.h:2465
FRREntityModelTableRow(FRREntityModelData &&InEntityModelData)
Definition: RREntityStructs.h:3910
ERRUEComponentType
Definition: RREntityStructs.h:46
This class will co-parent with [IFastXmlCallback], which is not a USTRUCT.
Definition: RREntityStructs.h:4393
bool IsValid() const
Definition: RREntityStructs.h:738
void PrintSelf() const
Definition: RREntityStructs.h:3811
double LinearVel
[m/s]
Definition: RREntityStructs.h:1073
FRRRobotJointDynamicProperties(const FString &InJointName, float InStiffness, float InDamping)
Definition: RREntityStructs.h:332
const FORCEINLINE TArray< FRRRobotLinkProperty > & GetLinkPropList() const
Definition: RREntityStructs.h:4119
FString Name
Definition: RREntityStructs.h:1717
FORCEINLINE bool HasWheel(const FString &InWheelName) const
Definition: RREntityStructs.h:4347
void RemoveLinkJointProp(const FString &InLinkName)
Remove all link properties of InLinkName and its corresponding joint properties having their #ParentL...
Definition: RREntityStructs.h:2812
ERRSensorType
Definition: RREntityStructs.h:152
FRRRobotLinkProperty LinkProp
Definition: RREntityStructs.h:2388
FString ParentLinkName
Definition: RREntityStructs.h:637
FORCEINLINE TArray< FRRRobotJointProperty > & GetJointPropList()
Definition: RREntityStructs.h:4143
FORCEINLINE bool IsPlainWheeledVehicleModel() const
Definition: RREntityStructs.h:4083
FORCEINLINE FRRRobotJointProperty GetJointPropFromChildLinkName(const FString &InChildLinkName) const
Definition: RREntityStructs.h:4201
@ CREATING
Invalid status, eg not loaded successfully.
Sensor base info which includes essential base attributes such as Topic name, frame id,...
Definition: RREntityStructs.h:1333
@ ORDER_PROCESSING
Idling, ready for command order.
FString WholeBodyStaticMeshName
Definition: RREntityStructs.h:3369
FTransform GetVisualRelativeTransformToParent(int32 InVisualIndex=0) const
Definition: RREntityStructs.h:1808
ERREntityDescriptionType ModelDescType
Robot Model Description Type (URDF/SDF)
Definition: RREntityStructs.h:2447
FORCEINLINE int32 GetUEComponentTypeFlags() const
UE Component types.
Definition: RREntityStructs.h:4051