RapyutaSimulationPlugins
RREntityStructs.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 // UE
14 
15 #include "ChaosVehicleWheel.h"
16 
17 #include "CoreMinimal.h"
18 
19 #include "Misc/Paths.h"
20 
21 #include "Templates/SharedPointer.h"
22 
23 
24 
25 // RapyutaSimulationPlugins
26 
27 #include "Core/RRCoreUtils.h"
28 
29 #include "Core/RRMathUtils.h"
30 
31 #include "Core/RRTypeUtils.h"
32 
33 
34 
35 #include "RREntityStructs.generated.h"
36 
37 // (NOTE) To avoid cyclic inclusion, except for utils, please DO NOT include any other component header files here!
38 
39 
40 
41 
46 enum class ERRUEComponentType : uint8
47 
48 {
49 
50  NONE = 0x00,
51 
52  DIFF_DRIVE = 0x01,
53 
54  WHEEL_DRIVE = 0x02,
55 
56  ARTICULATION_DRIVE = 0x04
57 
58 };
59 
61 
62 
63 
64 
69 enum class ERREntityDescriptionType : uint8
70 
71 {
72 
73  NONE,
74 
75  URDF,
76 
77  SDF,
78 
80 
81  SINGLE_CAD,
82 
83  TOTAL
84 
85 };
86 
87 
88 
102 enum class ERRRobotStatus : uint8
103 
104 {
105 
106  INVALID,
107 
108  CREATING,
109 
110  IDLE,
111 
113 
114  MOVING,
115 
116  ERROR,
117 
118  TOTAL
119 
120 };
121 
122 
123 
124 
129 enum class ERREntityGeometryType : uint8
130 
131 {
132 
133  NONE = 0x00,
134 
135  VISUAL = 0x01,
136 
137  COLLISION = 0x02,
138 
139  INERTIA = 0x04
140 
141 };
142 
144 
145 
146 
147 
152 enum class ERRSensorType : uint8
153 
154 {
155 
156  NONE,
157 
158  CAMERA,
159 
160  LIDAR,
161 
162  DEPTH,
163 
164  IMU,
165 
166  TOTAL
167 
168 };
169 
170 
171 
172 
177 enum class ERRLidarSensorType : uint8
178 
179 {
180 
181  NONE,
182 
183  TWO_D,
184 
185  THREE_D,
186 
187  TOTAL
188 
189 };
190 
191 
192 
193 
198 enum class ERRRobotJointType : uint8
199 
200 {
201 
202  NONE,
203 
204  FIXED,
205 
206  FLOATING,
207 
208  PRISMATIC,
209 
210  REVOLUTE,
211 
212  BALL,
213 
214  PLANAR,
215 
216  CONTINUOUS,
217 
218  TOTAL
219 
220 };
221 
222 
223 
224 
229 enum class ERRRobotJointStatus : uint8
230 
231 {
232 
233  INVALID,
234 
235  IDLE,
236 
237  MOVING,
238 
239  TOTAL
240 
241 };
242 
243 
244 
245 
250 enum class ERRJointAxisRotation : uint8
251 
252 {
253 
254  NONE = 0x00,
255 
256  X = 0x01,
257 
258  Y = 0x02,
259 
260  Z = 0x04
261 
262 };
263 
264 
265 
266 
271 enum class ERREntityMeshComponentType : uint8
272 
273 {
274 
275  NONE,
276 
277  STATIC_MESH,
278 
280 
282 
283  DYNAMIC_MESH,
284 
285  TOTAL
286 
287 };
288 
289 
290 
291 // -----------------------------------------------------------------------------------------------
292 
293 // [FRRRobotJointDynamicProperties] --
294 
295 
300 struct RAPYUTASIMULATIONPLUGINS_API FRRRobotJointDynamicProperties
301 
302 {
303 
305 
306  {
307 
308  }
309 
310  FRRRobotJointDynamicProperties(const FString& InJointName) : JointName(InJointName)
311 
312  {
313 
314  }
315 
316  FRRRobotJointDynamicProperties(float InStiffness, float InDamping, float InP, float InI, float InD)
317 
318  {
319 
320  SpringStiff = InStiffness;
321 
322  Damping = InDamping;
323 
324  P = InP;
325 
326  I = InI;
327 
328  D = InD;
329 
330  }
331 
332  FRRRobotJointDynamicProperties(const FString& InJointName, float InStiffness, float InDamping)
333 
334  : JointName(InJointName), SpringStiff(InStiffness), Damping(InDamping)
335 
336  {
337 
338  }
339 
340 
345  FString JointName;
346 
347  // For Spring-Damper Control Mode --
348 
350 
351 
356  Category = "Spring-Damper",
357 
358  meta = (ClampMin = "0.0", ClampMax = "1000000000.0", UIMin = "0.0", UIMax = "1000000000.0"))
359 
360  float SpringStiff = 0.f;
361 
362 
367  Category = "Spring-Damper",
368 
369  meta = (ClampMin = "0.0", ClampMax = "1000000000.0", UIMin = "0.0", UIMax = "1000000000.0"))
370 
371  float LimitSpringStiff = 0.f;
372 
374 
375 
380  Category = "Spring-Damper",
381 
382  meta = (ClampMin = "0.0", ClampMax = "500.0", UIMin = "0.0", UIMax = "500.0"))
383 
384  float Damping = 0.f;
385 
386 
391  Category = "Spring-Damper",
392 
393  meta = (ClampMin = "0.0", ClampMax = "500.0", UIMin = "0.0", UIMax = "500.0"))
394 
395  float LimitDamping = 0.f;
396 
397 
402  Category = "Spring-Damper",
403 
404  meta = (ClampMin = "0.0", ClampMax = "1000000000.0", UIMin = "0.0", UIMax = "1000000000.0"))
405 
406  float Friction = 0.f;
407 
408 
413  Category = "Spring-Damper",
414 
415  meta = (ClampMin = "0.0", ClampMax = "1000000000.0", UIMin = "0.0", UIMax = "1000000000.0"))
416 
417  float SpringRef = 0.f;
418 
419 
424  Category = "Spring-Damper",
425 
426  meta = (ClampMin = "0.0", ClampMax = "10000000.0", UIMin = "0.0", UIMax = "10000000.0"))
427 
428  float MaxForceLimit = 100000000.f;
429 
430 
431 
433 
434 
439  float MaxVelocity = 1000000.f;
440 
441 
442 
444 
445 
450  float KVelocity = 0.f;
451 
452 
453 
455 
456 
461  float P = 0.1f;
462 
463 
464 
466 
467 
472  float I = 0.5f;
473 
474 
475 
477 
478 
483  float D = 0.01f;
484 
485 
486 
487  void PrintSelf() const
488 
489  {
490 
491  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- SpringStiff %f LimitSpringStiff %f"), SpringStiff, LimitSpringStiff);
492 
493  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Damping %f LimitDamping %f"), Damping, LimitDamping);
494 
495  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Friction %f SpringRef %f"), Friction, SpringRef);
496 
497  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- MaxForceLimit %f MaxVelocity %f"), MaxForceLimit, MaxVelocity);
498 
499  }
500 
501 };
502 
503 // [ROBOT JOINT] --
504 
505 //
506 
524 struct RAPYUTASIMULATIONPLUGINS_API FRRRobotJointProperty
525 
526 {
527 
528 public:
529 
531 
532  {
533 
534  }
535 
536  FRRRobotJointProperty(FString InName) : Name(MoveTemp(InName))
537 
538  {
539 
540  }
541 
542 
543 
544 
549  FString Name;
550 
551 
552 
553 
559 
560 
561 
562  FORCEINLINE static ERRRobotJointType GetERRRobotJointTypeValueFromString(const FString& InEnumStringValue)
563 
564  {
565 
566  return static_cast<ERRRobotJointType>(URRTypeUtils::GetEnumValueFromString(TEXT("ERRRobotJointType"), InEnumStringValue));
567 
568  }
569 
570 
571 
572  FORCEINLINE static FString GetJointTypeName(const ERRRobotJointType InJointType)
573 
574  {
575 
576  return URRTypeUtils::GetEnumValueAsString(TEXT("ERRRobotJointType"), InJointType);
577 
578  }
579 
580 
581 
582 
588 
589 
590 
592 
593 
598  FVector Location = FVector::ZeroVector;
599 
600 
601 
603 
604 
609  FQuat Rotation = FQuat::Identity;
610 
611 
612 
614 
615 
620  bool bIsTransformRelative = true;
621 
622 
623 
624  FTransform GetTransform() const
625 
626  {
627 
628  return FTransform(Rotation, Location);
629 
630  }
631 
632 
637  FString ParentLinkName;
638 
639 
644  FString ChildLinkName;
645 
646 
651  FString MimicJointName;
652 
653 
658  float MimicMultiplier = 1.0f;
659 
661 
662 
667  float MimicOffset = 0.0f;
668 
669 
674  FVector Axis = FVector::ZeroVector;
675 
676 
681  FVector AxisInParentFrame = FVector::ZeroVector;
682 
683  const FVector& GetAxis(bool bIsLocal = false) const
684 
685  {
686 
687  return bIsLocal ? Axis : AxisInParentFrame;
688 
689  }
690 
691 
692 
694 
695 
700  float LowerLimit = 0.f;
701 
702 
703 
705 
706 
711  float UpperLimit = 0.f;
712 
713 
714 
715 
721 
722  bool operator==(const FRRRobotJointProperty& JointProp)
723 
724  {
725 
726  return Name.Equals(JointProp.Name);
727 
728  }
729 
730  bool operator==(const FString& String)
731 
732  {
733 
734  return Name.Equals(String);
735 
736  }
737 
738  bool IsValid() const
739 
740  {
741 
742  return (false == Name.IsEmpty()) && (ERRRobotJointType::NONE != Type);
743 
744  }
745 
746  ELinearConstraintMotion GetLinearConstraintMotion() const
747 
748  {
749 
750  switch (Type)
751 
752  {
753 
755 
757 
759 
761 
763 
764  return LCM_Locked;
765 
766 
767 
769 
770  return LCM_Limited;
771 
772 
773 
775 
777 
778  return LCM_Free;
779 
780 
781 
782  default:
783 
784  return LCM_Locked;
785 
786  }
787 
788  }
789 
790  EAngularConstraintMotion GetAngularConstraintMotion() const
791 
792  {
793 
794  switch (Type)
795 
796  {
797 
799 
801 
803 
804  return ACM_Locked;
805 
806 
807 
809 
810  {
811 
812  return (UpperLimit > UE_TWO_PI) ? ACM_Free : ACM_Limited;
813 
814  }
815 
816 
817 
819 
821 
823 
825 
826  return ACM_Free;
827 
828  default:
829 
830  return ACM_Locked;
831 
832  }
833 
834  }
835 
836 
837 
850  FVector GetJointAxis(bool bIsGlobal = false, const FQuat& InLinkQuat = FQuat::Identity) const
851 
852  {
853 
854  // https://github.com/ros-visualization/rviz/blob/noetic-devel/src/rviz/robot/robot_joint.cpp#L425
855 
856  return bIsGlobal ? InLinkQuat.RotateVector(Axis) : Axis;
857 
858  }
859 
860 
861 
884  bool IsTwisting(const FVector& InAxis) const
885 
886  {
887 
888  return FMath::IsNearlyEqual(FMath::Abs(InAxis.X), 1.f, 1.e-3f);
889 
890  }
891 
892 
893 
916  bool IsSwing1(const FVector& InAxis) const
917 
918  {
919 
920  return FMath::IsNearlyEqual(FMath::Abs(InAxis.Z), 1.f, 1.e-3f);
921 
922  }
923 
924 
925 
948  bool IsSwing2(const FVector& InAxis) const
949 
950  {
951 
952  return FMath::IsNearlyEqual(FMath::Abs(InAxis.Y), 1.f, 1.e-3f);
953 
954  }
955 
956  void GetTwistSwing(bool& bOutTwist, bool& bOutSwing1, bool& bOutSwing2) const
957 
958  {
959 
960  bOutTwist = IsTwisting(AxisInParentFrame);
961 
962  bOutSwing1 = IsSwing1(AxisInParentFrame);
963 
964  bOutSwing2 = IsSwing2(AxisInParentFrame);
965 
966  }
967 
968  void GetLinearXYZ(bool& bOutLinearX, bool& bOutLinearY, bool& bOutLinearZ) const
969 
970  {
971 
972  bOutLinearX = FMath::IsNearlyEqual(FMath::Abs(AxisInParentFrame.X), 1.f, 1.e-3f);
973 
974  bOutLinearY = FMath::IsNearlyEqual(FMath::Abs(AxisInParentFrame.Y), 1.f, 1.e-3f);
975 
976  bOutLinearZ = FMath::IsNearlyEqual(FMath::Abs(AxisInParentFrame.Z), 1.f, 1.e-3f);
977 
978  }
979 
980 
981 
982  bool IsValidJointPosition(float InJointPos) const
983 
984  {
985 
986  return (LowerLimit <= UpperLimit) ? (InJointPos >= LowerLimit) && (InJointPos <= UpperLimit) : false;
987 
988  }
989 
990  bool IsValidJointVelocity(float InJointVelocity) const
991 
992  {
993 
994  return (DynamicParams.MaxVelocity > 0.f) ? (FMath::Abs(InJointVelocity) <= DynamicParams.MaxVelocity)
995 
996  : (InJointVelocity != 0.f);
997 
998  }
999 
1000  void PrintSelf() const
1001 
1002  {
1003 
1004  UE_LOG_WITH_INFO(LogTemp,
1005 
1006  Warning,
1007 
1008  TEXT("Joint Name: %s - Type %s"),
1009 
1010  *Name,
1011 
1012  *URRTypeUtils::GetEnumValueAsString(TEXT("ERRRobotJointType"), Type));
1013 
1014  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Location: %s"), *Location.ToString());
1015 
1016  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Rotation: %s - %s"), *Rotation.ToString(), *FRotator(Rotation).ToString());
1017 
1018  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- ParentLinkName: %s"), *ParentLinkName);
1019 
1020  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- ChildLinkName: %s"), *ChildLinkName);
1021 
1022  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Axis: %s"), *Axis.ToString());
1023 
1024  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- MimicJointName: %s"), *MimicJointName);
1025 
1026  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- MimicMultiplier: %f"), MimicMultiplier);
1027 
1028  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- MimicOffset: %f"), MimicOffset);
1029 
1030  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- LowerLimit: %f"), LowerLimit);
1031 
1032  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- UpperLimit: %f"), UpperLimit);
1033 
1034  DynamicParams.PrintSelf();
1035 
1036  }
1037 
1038 };
1039 
1040 
1041 
1053 struct RAPYUTASIMULATIONPLUGINS_API FRRRobotJointValue
1054 
1055 {
1056 
1058 
1059 
1064  double Position = 0;
1065 
1067 
1068 
1073  double LinearVel = 0;
1074 
1076 
1077 
1082  double AngularVel = 0;
1083 
1084 
1085 
1086  FString ToString() const
1087 
1088  {
1089 
1090  return FString::Printf(
1091 
1092  TEXT("Pos: %lf[rad or m] LinearVel: %lf[m/s] AngularVel: %lf[rad/s]"), Position, LinearVel, AngularVel);
1093 
1094  }
1095 
1096 
1097 
1098  bool operator==(const FRRRobotJointValue& Other) const
1099 
1100  {
1101 
1102  return FMath::IsNearlyEqual(Position, Other.Position, KINDA_SMALL_NUMBER) &&
1103 
1104  FMath::IsNearlyEqual(LinearVel, Other.LinearVel, KINDA_SMALL_NUMBER) &&
1105 
1106  FMath::IsNearlyEqual(AngularVel, Other.AngularVel, KINDA_SMALL_NUMBER);
1107 
1108  }
1109 
1110 
1111 
1112  bool operator!=(const FRRRobotJointValue& Other) const
1113 
1114  {
1115 
1116  return (false == (*this == Other));
1117 
1118  }
1119 
1120 };
1121 
1122 
1123 
1124 // [ROBOT LINK] --
1125 
1126 //
1127 
1128 // Note: Nested struct does not support USTRUCT(), and so forth also could not affort UPROPERTY members
1129 
1130 // A structure representing a SDF/URDF Link
1131 
1132 // http://sdformat.org/spec?ver=1.6&elem=link
1133 
1134 // http://wiki.ros.org/urdf/XML/link
1135 
1136 
1137 
1138 
1143 struct RAPYUTASIMULATIONPLUGINS_API FRRRobotLinkInertia
1144 
1145 {
1146 
1148 
1149 
1154  float Mass = 0.f;
1155 
1157 
1158 
1163  FVector Location = FVector::ZeroVector;
1164 
1165 
1170  FQuat Rotation = FQuat::Identity;
1171 
1172 
1177  float Ixx = 0.f;
1178 
1179 
1184  float Ixy = 0.f;
1185 
1186 
1191  float Ixz = 0.f;
1192 
1193 
1198  float Iyy = 0.f;
1199 
1200 
1205  float Iyz = 0.f;
1206 
1207 
1212  float Izz = 0.f;
1213 
1214 };
1215 
1216 
1217 
1218 
1223 struct RAPYUTASIMULATIONPLUGINS_API FRREntityGeometryInfo
1224 
1225 {
1226 
1227 
1232  FString Name;
1233 
1234 
1239  FString MeshName;
1240 
1241 
1242 
1244 
1246 
1247 
1252  FVector Size = FVector::ZeroVector;
1253 
1254 
1255 
1256 
1261  FVector WorldScale = FVector::OneVector;
1262 
1263 
1264 
1266 
1267 
1273 
1274 
1275 
1276 
1281  FString LinkName;
1282 
1283 
1288  FVector Location = FVector::ZeroVector;
1289 
1290 
1295  FQuat Rotation = FQuat::Identity;
1296 
1297  FTransform GetTransformOffset() const
1298 
1299  {
1300 
1301  return FTransform(Rotation, Location);
1302 
1303  }
1304 
1305 
1311 
1312 };
1313 
1314 
1315 
1333 struct RAPYUTASIMULATIONPLUGINS_API FRRSensorBaseInfo
1334 
1335 {
1336 
1337 
1338 
1340 
1341  {
1342 
1343  }
1344 
1346 
1347 
1352  FString TopicName = TEXT("sensor_data");
1353 
1354 
1355 
1357 
1358 
1363  FString FrameId = TEXT("sensor_frame");
1364 
1365 
1366 
1368 
1369 
1374  float PublicationFrequencyHz = 0.f;
1375 
1376 
1377 
1378  virtual void PrintSelf() const
1379 
1380  {
1381 
1382  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- TopicName: %s"), *TopicName);
1383 
1384  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- FrameId: %s"), *FrameId);
1385 
1386  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- PublicationFrequencyHz: %f"), PublicationFrequencyHz);
1387 
1388  }
1389 
1390 };
1391 
1392 
1393 
1409 struct RAPYUTASIMULATIONPLUGINS_API FRRSensorLidarInfo : public FRRSensorBaseInfo
1410 
1411 {
1412 
1413 
1419 
1420 
1421 
1423 
1424 
1429  int32 NHorSamplesPerScan = 360;
1430 
1431 
1432 
1434 
1435 
1440  int32 NVerSamplesPerScan = 360;
1441 
1442 
1443 
1445 
1446 
1451  float HMinAngle = 0.f;
1452 
1454 
1455 
1460  float HMaxAngle = 0.f;
1461 
1463 
1464 
1469  float HResolution = 0.f;
1470 
1472 
1473 
1478  float VMinAngle = 0.f;
1479 
1481 
1482 
1487  float VMaxAngle = 0.f;
1488 
1490 
1491 
1496  float VResolution = 0.f;
1497 
1498 
1499 
1500  // Range
1501 
1503 
1504 
1509  float MinRange = 0.f;
1510 
1512 
1513 
1518  float MaxRange = 0.f;
1519 
1521 
1522 
1527  float RangeResolution = 0.f;
1528 
1529 
1530 
1531  // Noise
1532 
1533 
1538  FString NoiseTypeName;
1539 
1540 
1545  double NoiseMean = 0;
1546 
1547 
1552  double NoiseStdDev = 0;
1553 
1554 
1555 
1556  virtual void PrintSelf() const override
1557 
1558  {
1559 
1560  Super::PrintSelf();
1561 
1562  UE_LOG_WITH_INFO(
1563 
1564  LogTemp, Display, TEXT("- LidarType: %s"), *URRTypeUtils::GetEnumValueAsString(TEXT("ERRLidarSensorType"), LidarType));
1565 
1566 
1567 
1568  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Scan horizontal"));
1569 
1570  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ NHorSamplesPerScan: %d"), NHorSamplesPerScan);
1571 
1572  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ HMinAngle: %f"), HMinAngle);
1573 
1574  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ HMaxAngle: %f"), HMaxAngle);
1575 
1576  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ HResolution: %f"), HResolution);
1577 
1578 
1579 
1580  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Scan vertical"));
1581 
1582  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ NVerSamplesPerScan: %d"), NVerSamplesPerScan);
1583 
1584  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ VMinAngle: %f"), VMinAngle);
1585 
1586  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ VMaxAngle: %f"), VMaxAngle);
1587 
1588  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ VResolution: %f"), VResolution);
1589 
1590 
1591 
1592  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Range"));
1593 
1594  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ MinRange: %f"), MinRange);
1595 
1596  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ MinRange: %f"), MaxRange);
1597 
1598  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ Resolution: %f"), RangeResolution);
1599 
1600 
1601 
1602  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Noise"));
1603 
1604  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ Type: %s"), *NoiseTypeName);
1605 
1606  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ Mean: %f"), NoiseMean);
1607 
1608  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("\t+ StdDev: %f"), NoiseStdDev);
1609 
1610  }
1611 
1612 };
1613 
1614 
1615 
1616 
1621 struct RAPYUTASIMULATIONPLUGINS_API FRRSensorProperty
1622 
1623 {
1624 
1625 
1626 
1627 
1632  FString LinkName;
1633 
1634 
1639  FString SensorName;
1640 
1641 
1647 
1648 
1649 
1651 
1653 
1654 
1660 
1661 
1662 
1663  void PrintSelf() const
1664 
1665  {
1666 
1667  UE_LOG_WITH_INFO(LogTemp,
1668 
1669  Warning,
1670 
1671  TEXT("Sensor: %s %s"),
1672 
1673  *URRTypeUtils::GetEnumValueAsString(TEXT("ERRSensorType"), SensorType),
1674 
1675  *SensorName);
1676 
1677  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Link: %s"), *LinkName);
1678 
1679 
1680 
1681  LidarInfo.PrintSelf();
1682 
1683  }
1684 
1685 };
1686 
1687 
1688 
1689 
1694 struct RAPYUTASIMULATIONPLUGINS_API FRRRobotLinkProperty
1695 
1696 {
1697 
1698 public:
1699 
1701 
1702  {
1703 
1704  }
1705 
1706  FRRRobotLinkProperty(FString InName) : Name(MoveTemp(InName))
1707 
1708  {
1709 
1710  }
1711 
1712 
1717  FString Name;
1718 
1719 
1720 
1722 
1723 
1729 
1730 
1731 
1732 
1737  int8 LinkIndex = INDEX_NONE;
1738 
1739 
1744  int8 ParentLinkIndex = INDEX_NONE;
1745 
1746 
1747 
1749 
1751 
1753 
1754 
1759  FVector Location = FVector::ZeroVector;
1760 
1761 
1762 
1763 
1768  FQuat Rotation = FQuat::Identity;
1769 
1770  FTransform GetRelativeTransformToParent() const
1771 
1772  {
1773 
1774  return FTransform(Rotation, Location);
1775 
1776  }
1777 
1778 
1784 
1785 
1786 
1788 
1790 
1792 
1793 
1798  TArray<FRREntityGeometryInfo> VisualList;
1799 
1800  FTransform GetVisualOffset(int32 InVisualIndex = 0) const
1801 
1802  {
1803 
1804  return VisualList.IsValidIndex(InVisualIndex) ? VisualList[InVisualIndex].GetTransformOffset() : FTransform::Identity;
1805 
1806  }
1807 
1808  FTransform GetVisualRelativeTransformToParent(int32 InVisualIndex = 0) const
1809 
1810  {
1811 
1812  return GetRelativeTransformToParent() * GetVisualOffset(InVisualIndex);
1813 
1814  }
1815 
1816 
1821  TArray<FRREntityGeometryInfo> CollisionList;
1822 
1823  bool operator==(const FRRRobotLinkProperty& LinkProp)
1824 
1825  {
1826 
1827  return Name.Equals(LinkProp.Name);
1828 
1829  }
1830 
1831  bool operator==(const FString& String)
1832 
1833  {
1834 
1835  return Name.Equals(String);
1836 
1837  }
1838 
1839  // Sensor
1840 
1841 
1846  TArray<FRRSensorProperty> SensorList;
1847 
1848  void PrintSelf() const
1849 
1850  {
1851 
1852  UE_LOG_WITH_INFO(LogTemp, Warning, TEXT("Link Name: %s -> ParentFrameName: %s"), *Name, *ParentFrameName);
1853 
1854  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Location: %s"), *Location.ToString());
1855 
1856  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Rotation: %s - %s"), *Rotation.ToString(), *FRotator(Rotation).ToString());
1857 
1858  // Visuals
1859 
1860  for (const auto& visual : VisualList)
1861 
1862  {
1863 
1864  UE_LOG_WITH_INFO(LogTemp, Warning, TEXT("Visual: %s"), *visual.Name);
1865 
1866  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Link: %s"), *visual.LinkName);
1867 
1868  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- MeshName: %s"), *visual.MeshName);
1869 
1870  UE_LOG_WITH_INFO(
1871 
1872  LogTemp, Display, TEXT("- Size: %s - WorldScale: %s"), *visual.Size.ToString(), *visual.WorldScale.ToString());
1873 
1874  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Location: %s"), *visual.Location.ToString());
1875 
1876  UE_LOG_WITH_INFO(
1877 
1878  LogTemp, Display, TEXT("- Rotation: %s - %s"), *visual.Rotation.ToString(), *FRotator(visual.Rotation).ToString());
1879 
1880  visual.MaterialInfo.PrintSelf();
1881 
1882  }
1883 
1884  // Collisions
1885 
1886  for (const auto& collision : CollisionList)
1887 
1888  {
1889 
1890  UE_LOG_WITH_INFO(LogTemp, Warning, TEXT("Collision: %s"), *collision.Name);
1891 
1892  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Link: %s"), *collision.LinkName);
1893 
1894  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- MeshName: %s"), *collision.MeshName);
1895 
1896  UE_LOG_WITH_INFO(LogTemp,
1897 
1898  Display,
1899 
1900  TEXT("- Size: %s - WorldScale: %s"),
1901 
1902  *collision.Size.ToString(),
1903 
1904  *collision.WorldScale.ToString());
1905 
1906  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("- Location: %s"), *collision.Location.ToString());
1907 
1908  UE_LOG_WITH_INFO(LogTemp,
1909 
1910  Display,
1911 
1912  TEXT("- Rotation: %s - %s"),
1913 
1914  *collision.Rotation.ToString(),
1915 
1916  *FRotator(collision.Rotation).ToString());
1917 
1918  }
1919 
1920  // Sensors
1921 
1922  for (const auto& sensor : SensorList)
1923 
1924  {
1925 
1926  sensor.PrintSelf();
1927 
1928  }
1929 
1930  }
1931 
1932 };
1933 
1934 
1935 
1936 // Ref: UChaosVehicleWheel
1937 
1938 
1939 
1953 struct RAPYUTASIMULATIONPLUGINS_API FRRRobotWheelProperty
1954 
1955 {
1956 
1957 public:
1958 
1960 
1961  {
1962 
1963  }
1964 
1965  FRRRobotWheelProperty(FString InWheelName) : WheelName(MoveTemp(InWheelName))
1966 
1967  {
1968 
1969  }
1970 
1971 
1972 
1973 
1978  FString WheelName;
1979 
1980 
1981 
1983 
1985 
1986 
1991  EAxleType AxleType = EAxleType::Undefined;
1992 
1993 
1994 
1996 
1998 
2000 
2001 
2006  FVector Offset = FVector::ZeroVector;
2007 
2008 
2009 
2011 
2012 
2017  float WheelRadius = 0.f;
2018 
2019 
2020 
2022 
2023 
2028  float WheelWidth = 0.f;
2029 
2030 
2031 
2032 
2037  float CorneringStiffness = 1000.f;
2038 
2039 
2040 
2041 
2046  float FrictionForceMultiplier = 2.f;
2047 
2048 
2049 
2051 
2052 
2057  float SideSlipModifier = 1.f;
2058 
2059 
2060 
2062 
2063 
2068  float SlipThreshold = 20.f;
2069 
2070 
2071 
2073 
2074 
2079  float SkidThreshold = 20.f;
2080 
2081 
2082 
2083 
2088  bool bAffectedBySteering = false;
2089 
2090 
2091 
2092 
2097  bool bAffectedByBrake = true;
2098 
2099 
2100 
2101 
2106  bool bAffectedByHandbrake = false;
2107 
2108 
2109 
2111 
2112 
2117  bool bAffectedByEngine = false;
2118 
2119 
2120 
2122 
2123 
2128  bool bABSEnabled = false;
2129 
2130 
2131 
2133 
2134 
2139  bool bTractionControlEnabled = false;
2140 
2141 
2142 
2144 
2145 
2150  ETorqueCombineMethod ExternalTorqueCombineMethod = ETorqueCombineMethod::None;
2151 
2152 
2153 
2154 
2159  FRuntimeFloatCurve LateralSlipGraph;
2160 
2161 
2162 
2164 
2165 
2170  FVector SuspensionAxis = FVector(0.f, 0.f, -1.f);
2171 
2172 
2173 
2175 
2176 
2181  FVector SuspensionForceOffset = FVector::ZeroVector;
2182 
2183 
2184 
2186 
2188 
2189 
2194  float SuspensionMaxRaise = 10.f;
2195 
2196 
2197 
2199 
2201 
2202 
2207  float SuspensionMaxDrop = 10.f;
2208 
2209 
2210 
2218  float SuspensionDampingRatio = 0.5f;
2219 
2220 
2221 
2223 
2225 
2226 
2231  int8 SuspensionSmoothing = 0;
2232 
2233 
2234 
2236 
2238 
2240 
2242 
2243 
2248  float WheelLoadRatio = 0.5f;
2249 
2250 
2251 
2253 
2254 
2259  float SpringRate = 250.0f;
2260 
2261 
2262 
2264 
2265 
2270  float SpringPreload = 50.f;
2271 
2272 
2273 
2275 
2276 
2281  float RollbarScaling = 0.15f;
2282 
2283 
2284 
2286 
2287 
2292  ESweepShape SweepShape = ESweepShape::Raycast;
2293 
2294 
2295 
2297 
2298 
2303  ESweepType SweepType = ESweepType::SimpleSweep;
2304 
2305 
2306 
2308 
2309 
2314  float MaxSteerAngleDeg = 50.f;
2315 
2316 
2317 
2319 
2320 
2325  float MaxBrakeTorque = 1500.f;
2326 
2327 
2328 
2330 
2332 
2334 
2335 
2340  float MaxHandBrakeTorque = 3000.f;
2341 
2342 
2343 
2344  void PrintSelf() const
2345 
2346  {
2347 
2348  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("WheelName: %s Radius %f[cm] Width %f[cm]"), *WheelName, WheelRadius, WheelWidth);
2349 
2350  }
2351 
2352 };
2353 
2354 
2355 
2356 // Node to represent the Robot virtually as a tree
2357 
2358 
2363 class RAPYUTASIMULATIONPLUGINS_API URRRobotNode : public UObject
2364 
2365 {
2366 
2367 public:
2368 
2369 
2374  URRRobotNode* Parent = nullptr;
2375 
2376 
2381  TArray<URRRobotNode*> Children;
2382 
2383 
2389 
2390 
2396 
2397 };
2398 
2399 
2400 
2401 // [ENTITY MODEL] --
2402 
2415 
2416 {
2417 
2418 public:
2419 
2420  FRREntityModelData(const TArray<FString>& InModelNameList) : ModelNameList(InModelNameList)
2421 
2422  {
2423 
2424  }
2425 
2426  FRREntityModelData(TArray<FString>&& InModelNameList) : ModelNameList(MoveTemp(InModelNameList))
2427 
2428  {
2429 
2430  }
2431 
2433 
2434  {
2435 
2436  }
2437 
2438 
2439 
2441 
2442 
2448 
2449  bool IsURDF() const
2450 
2451  {
2452 
2454 
2455  }
2456 
2457  bool IsSDF() const
2458 
2459  {
2460 
2462 
2463  }
2464 
2465  bool IsUEDataTable() const
2466 
2467  {
2468 
2470 
2471  }
2472 
2473  bool IsSingleCAD() const
2474 
2475  {
2476 
2478 
2479  }
2480 
2481  FString GetModelDescTypeName() const
2482 
2483  {
2484 
2485  return URRTypeUtils::GetEnumValueAsString(TEXT("ERREntityDescriptionType"), ModelDescType);
2486 
2487  }
2488 
2489 
2490 
2491 
2496  FString WorldName;
2497 
2498  bool IsWorldModel() const
2499 
2500  {
2501 
2502  return (false == WorldName.IsEmpty());
2503 
2504  }
2505 
2506 
2507 
2508 
2513  bool bHasWorldJoint = false;
2514 
2515 
2516 
2518 
2520 
2521 
2526  TArray<FString> ModelNameList;
2527 
2528  FString GetModelName() const
2529 
2530  {
2531 
2532  return IsWorldModel() ? WorldName : ((ModelNameList.Num() > 0) ? ModelNameList[0] : EMPTY_STR);
2533 
2534  }
2535 
2536 
2537 
2539 
2540 
2545  FVector TotalSize = FVector::ZeroVector;
2546 
2547 
2548 
2549  int32 GetVisualsNum() const
2550 
2551  {
2552 
2553  // Parent visuals
2554 
2555  int32 meshesNum = 0;
2556 
2557  for (const auto& linkProp : LinkPropList)
2558 
2559  {
2560 
2561  meshesNum += linkProp.VisualList.Num();
2562 
2563  }
2564 
2565 
2566 
2567  // Child visuals
2568 
2569  for (const auto& modelInfo : ChildModelsData)
2570 
2571  {
2572 
2573  meshesNum += modelInfo.GetVisualsNum();
2574 
2575  }
2576 
2577  return meshesNum;
2578 
2579  }
2580 
2581 
2582 
2584 
2585 
2591 
2592 
2593 
2595 
2596 
2602 
2603 
2609 
2610 
2616 
2617 
2622  FTransform RelativeTransform = FTransform::Identity;
2623 
2624 
2625 
2627 
2628 
2634 
2635  bool IsUEComponentEnabled(const int32 InTypeMask) const
2636 
2637  {
2638 
2639  return (UEComponentTypeFlags & InTypeMask);
2640 
2641  }
2642 
2643  bool IsUEComponentEnabled(const ERRUEComponentType InTypeMask) const
2644 
2645  {
2646 
2647  return IsUEComponentEnabled(static_cast<int32>(InTypeMask));
2648 
2649  }
2650 
2651  void SetUEComponentEnabled(const int32 InTypeMask)
2652 
2653  {
2654 
2655  UEComponentTypeFlags |= InTypeMask;
2656 
2657  }
2658 
2660 
2661  {
2662 
2663  SetUEComponentEnabled(static_cast<int32>(InTypeMask));
2664 
2665  }
2666 
2668 
2669  {
2670 
2672 
2673  }
2674 
2676 
2677  {
2678 
2680 
2681  }
2682 
2683  bool HasDriveComponents() const
2684 
2685  {
2686 
2688 
2690 
2691  }
2692 
2693 
2694 
2695  bool IsRobotModel() const
2696 
2697  {
2698 
2699  return (JointPropList.Num() > 0) || HasDriveComponents();
2700 
2701  }
2702 
2703 
2704 
2705  bool IsObjectModel() const
2706 
2707  {
2708 
2709  return (false == IsRobotModel());
2710 
2711  }
2712 
2713 
2714 
2715  // Link/Joint list
2716 
2717 
2722  FString BaseLinkName;
2723 
2724 
2729  TArray<FRRRobotLinkProperty> LinkPropList;
2730 
2731 
2736  TArray<FRRRobotJointProperty> JointPropList;
2737 
2738 
2739 
2741 
2742  // UPROPERTY(EditAnywhere)
2743 
2744  TArray<FRREntityModelData> ChildModelsData;
2745 
2746 
2747 
2775 
2776  {
2777 
2778  for (const auto& jointProp : JointPropList)
2779 
2780  {
2781 
2782  for (auto& linkProp : LinkPropList)
2783 
2784  {
2785 
2786  if (linkProp.Name == jointProp.ChildLinkName)
2787 
2788  {
2789 
2790  linkProp.Location = jointProp.Location;
2791 
2792  break;
2793 
2794  }
2795 
2796  }
2797 
2798  }
2799 
2800  }
2801 
2802 
2803 
2812  void RemoveLinkJointProp(const FString& InLinkName)
2813 
2814  {
2815 
2816  // 1- Rem joint prop having [ParentLinkName] as [InLinkName]
2817 
2818  JointPropList.RemoveAll(
2819 
2820  [this, InLinkName](const FRRRobotJointProperty& InJointProp)
2821 
2822  {
2823 
2824  if (InJointProp.ParentLinkName == InLinkName)
2825 
2826  {
2827 
2828 #if RAPYUTA_SIM_DEBUG
2829 
2830  UE_LOG_WITH_INFO(
2831 
2832  LogTemp, Error, TEXT("Rem joint from parent [%s] %s"), *InLinkName, *InJointProp.GetTransform().ToString());
2833 
2834 #endif
2835 
2836  return true;
2837 
2838  }
2839 
2840  return false;
2841 
2842  });
2843 
2844 
2845 
2846  // 2- Rem link prop
2847 
2848  LinkPropList.RemoveAll([this, InLinkName](const FRRRobotLinkProperty& InLinkProp)
2849 
2850  { return (InLinkProp.Name == InLinkName); });
2851 
2852 
2853 
2854  // 2.1 - BaseLinkName
2855 
2856  if (InLinkName == BaseLinkName)
2857 
2858  {
2859 
2860  BaseLinkName = TEXT("");
2861 
2862  }
2863 
2864 
2865 
2866  // 2.2 - ArticulatedLinks/EndEffectors
2867 
2868  ArticulatedLinksNames.RemoveSwap(InLinkName);
2869 
2870  EndEffectorNames.RemoveSwap(InLinkName);
2871 
2872 
2873 
2874  // 2.3 - Wheels
2875 
2876  WheelPropList.RemoveAll([this, InLinkName](const FRRRobotWheelProperty& InWheelProp)
2877 
2878  { return (InWheelProp.WheelName == InLinkName); });
2879 
2880  }
2881 
2882 
2883 
2893 
2894  {
2895 
2896  for (const auto& linkProp : LinkPropList)
2897 
2898  {
2899 
2900  if (linkProp.Name == BaseLinkName)
2901 
2902  {
2903 
2904  return linkProp;
2905 
2906  }
2907 
2908  }
2909 
2910  return FRRRobotLinkProperty();
2911 
2912  }
2913 
2914 
2915 
2926  FRRRobotLinkProperty GetLinkProp(const FString& InLinkName) const
2927 
2928  {
2929 
2930  for (const auto& linkProp : LinkPropList)
2931 
2932  {
2933 
2934  if (linkProp.Name == InLinkName)
2935 
2936  {
2937 
2938  return linkProp;
2939 
2940  }
2941 
2942  }
2943 
2944  return FRRRobotLinkProperty();
2945 
2946  }
2947 
2948 
2949 
2960  FRRRobotJointProperty GetJointProp(const FString& InJointName) const
2961 
2962  {
2963 
2964  for (const auto& jointProp : JointPropList)
2965 
2966  {
2967 
2968  if (jointProp.Name == InJointName)
2969 
2970  {
2971 
2972  return jointProp;
2973 
2974  }
2975 
2976  }
2977 
2978  return FRRRobotJointProperty();
2979 
2980  }
2981 
2982 
2983 
2994  FRRRobotJointProperty GetJointPropFromChildLinkName(const FString& InChildLinkName) const
2995 
2996  {
2997 
2998  for (const auto& jointProp : JointPropList)
2999 
3000  {
3001 
3002  if (jointProp.ChildLinkName == InChildLinkName)
3003 
3004  {
3005 
3006  return jointProp;
3007 
3008  }
3009 
3010  }
3011 
3012  return FRRRobotJointProperty();
3013 
3014  }
3015 
3016 
3017 
3030  FRRRobotLinkProperty FindLinkProp(int8 InLinkIndex) const
3031 
3032  {
3033 
3034  for (const auto& linkProp : LinkPropList)
3035 
3036  {
3037 
3038  if (linkProp.LinkIndex == InLinkIndex)
3039 
3040  {
3041 
3042  return linkProp;
3043 
3044  }
3045 
3046  }
3047 
3048  return FRRRobotLinkProperty();
3049 
3050  }
3051 
3052 
3053 
3067 
3068  {
3069 
3070  const FRRRobotLinkProperty linkProp = FindLinkProp(InLinkIndex);
3071 
3072  for (const auto& jointProp : JointPropList)
3073 
3074  {
3075 
3076  if (linkProp.Name == jointProp.ChildLinkName)
3077 
3078  {
3079 
3080  return jointProp;
3081 
3082  }
3083 
3084  }
3085 
3086  return FRRRobotJointProperty();
3087 
3088  }
3089 
3090 
3091 
3104  FTransform GetLinkVisualOffset(int8 InLinkIndex) const
3105 
3106  {
3107 
3108  const FRRRobotLinkProperty& linkProp = FindLinkProp(InLinkIndex);
3109 
3110  return linkProp.GetVisualOffset();
3111 
3112  }
3113 
3114 
3115 
3128  FTransform GetLinkAbsoluteTransform(int8 InLinkIndex) const
3129 
3130  {
3131 
3132  int8 linkIndexCurrent = InLinkIndex;
3133 
3134  TArray<FRRRobotJointProperty> parentLinks;
3135 
3136 
3137 
3138  while (linkIndexCurrent != INDEX_NONE)
3139 
3140  {
3141 
3142  const FRRRobotLinkProperty linkProp = FindLinkProp(linkIndexCurrent);
3143 
3144  const FRRRobotJointProperty jointProp = FindJointPropByLinkIndex(linkIndexCurrent);
3145 
3146  parentLinks.Insert(jointProp, 0);
3147 
3148  linkIndexCurrent = linkProp.ParentLinkIndex;
3149 
3150  }
3151 
3152 
3153 
3154  FTransform resultTransform = FTransform::Identity;
3155 
3156 
3157 
3158  for (const auto& jointProp : parentLinks)
3159 
3160  {
3161 
3162  FTransform jointTransform = jointProp.bIsTransformRelative ? jointProp.GetTransform() : FTransform::Identity;
3163 
3164  resultTransform.SetLocation(resultTransform.GetLocation() +
3165 
3166  resultTransform.GetRotation().RotateVector(jointTransform.GetLocation()));
3167 
3168  resultTransform.SetRotation(resultTransform.GetRotation() * jointTransform.GetRotation());
3169 
3170  resultTransform.SetScale3D(resultTransform.GetScale3D() * jointTransform.GetScale3D());
3171 
3172  }
3173 
3174 
3175 
3176  resultTransform *= GetLinkVisualOffset(InLinkIndex);
3177 
3178 
3179 
3180  return resultTransform;
3181 
3182  }
3183 
3184 
3185 
3198  FTransform GetLinkRelativeTransform(int8 InLinkIndex) const
3199 
3200  {
3201 
3202  const FRRRobotJointProperty jointProp = FindJointPropByLinkIndex(InLinkIndex);
3203 
3204 
3205 
3206  if (jointProp.bIsTransformRelative)
3207 
3208  {
3209 
3210  return jointProp.GetTransform();
3211 
3212  }
3213 
3214  else
3215 
3216  {
3217 
3218  const FRRRobotLinkProperty linkProp = FindLinkProp(InLinkIndex);
3219 
3220  FTransform resultTransform = linkProp.GetVisualOffset();
3221 
3222 
3223 
3224  if (linkProp.ParentLinkIndex != INDEX_NONE)
3225 
3226  {
3227 
3228  resultTransform = GetLinkAbsoluteTransform(linkProp.ParentLinkIndex).Inverse() * resultTransform;
3229 
3230  }
3231 
3232 
3233 
3234  return resultTransform;
3235 
3236  }
3237 
3238  }
3239 
3240 
3241 
3254  FTransform GetLinkRelTransformToBase(int8 InLinkIndex) const
3255 
3256  {
3257 
3258  if (InLinkIndex <= 0)
3259 
3260  {
3261 
3262  return FTransform::Identity;
3263 
3264  }
3265 
3266 
3267 
3268  for (const auto& linkProp : LinkPropList)
3269 
3270  {
3271 
3272  if (linkProp.LinkIndex == InLinkIndex)
3273 
3274  {
3275 
3276  return GetLinkRelTransformToBase(linkProp.ParentLinkIndex) * linkProp.GetRelativeTransformToParent();
3277 
3278  }
3279 
3280  }
3281 
3282  return FTransform::Identity;
3283 
3284  }
3285 
3286 
3287 
3300  FTransform GetLinkVisualOffsetToBase(int8 InLinkIndex) const
3301 
3302  {
3303 
3304  int8 linkIndexCurrent = InLinkIndex;
3305 
3306  FTransform resultTransform = GetLinkVisualOffset(InLinkIndex);
3307 
3308 
3309 
3310  while (linkIndexCurrent != INDEX_NONE)
3311 
3312  {
3313 
3314  for (const auto& linkProp : LinkPropList)
3315 
3316  {
3317 
3318  if (linkProp.LinkIndex == linkIndexCurrent)
3319 
3320  {
3321 
3322  resultTransform = linkProp.GetRelativeTransformToParent() * resultTransform;
3323 
3324  linkIndexCurrent = linkProp.ParentLinkIndex;
3325 
3326 
3327 
3328  break;
3329 
3330  }
3331 
3332  }
3333 
3334  }
3335 
3336 
3337 
3338  return resultTransform;
3339 
3340  }
3341 
3342 
3343 
3351 
3352  {
3353 
3354  return ((LinkPropList.Num() > 0) && (LinkPropList[0].VisualList.Num() > 0)) ? LinkPropList[0].VisualList[0]
3355 
3357 
3358  }
3359 
3360 
3361 
3362  // UE-StaticMesh
3363 
3364 
3370 
3371 
3372 
3373  // Material
3374 
3375 
3381 
3383 
3384  {
3385 
3386  return WholeBodyMaterialInfo;
3387 
3388  }
3389 
3390 
3391 
3393 
3394  {
3395 
3396  return GetVisualInfo().MaterialInfo;
3397 
3398  }
3399 
3400 
3401 
3402  // Articulated link names
3403 
3404 
3409  TArray<FString> ArticulatedLinksNames;
3410 
3411 
3412 
3413  // Endtip
3414 
3415 
3420  TArray<FString> EndEffectorNames;
3421 
3422 
3423 
3424  // Wheels properties
3425 
3426 
3431  TArray<FRRRobotWheelProperty> WheelPropList;
3432 
3433  bool HasWheel(const FString& InWheelName) const
3434 
3435  {
3436 
3437  for (const auto& wheelProp : WheelPropList)
3438 
3439  {
3440 
3441  if (wheelProp.WheelName == InWheelName)
3442 
3443  {
3444 
3445  return true;
3446 
3447  }
3448 
3449  }
3450 
3451  return false;
3452 
3453  }
3454 
3455 
3456 
3457  bool operator==(const FRREntityModelData& OtherModelData)
3458 
3459  {
3460 
3461  return (ModelDescType == OtherModelData.ModelDescType) && (ModelNameList == OtherModelData.ModelNameList) &&
3462 
3463  DescriptionFilePath.Equals(OtherModelData.DescriptionFilePath, ESearchCase::CaseSensitive);
3464 
3465  }
3466 
3467  bool IsValid(bool bIsLogged = false) const
3468 
3469  {
3470 
3471  // NOTE: Joints num could be zero for a single-link object
3472 
3474 
3475  {
3476 
3477  if (bIsLogged)
3478 
3479  {
3480 
3481  UE_LOG_WITH_INFO(
3482 
3483  LogTemp, Log, TEXT("%s ModelDescType has not been set!"), *FString::Join(ModelNameList, TEXT(",")));
3484 
3485  }
3486 
3487  return false;
3488 
3489  }
3490 
3491  else if (0 == ModelNameList.Num())
3492 
3493  {
3494 
3495  // Either a world or entity model
3496 
3497  if (bIsLogged)
3498 
3499  {
3500 
3501  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("%s ModelNameList EMPTY!"), *DescriptionFilePath);
3502 
3503  }
3504 
3505  return false;
3506 
3507  }
3508 
3509  else if (ModelNameList[0].IsEmpty())
3510 
3511  {
3512 
3513  if (bIsLogged)
3514 
3515  {
3516 
3517  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("%s ModelName EMPTY!"), *DescriptionFilePath);
3518 
3519  }
3520 
3521  return false;
3522 
3523  }
3524 
3525  else if (DescriptionFilePath.IsEmpty())
3526 
3527  {
3528 
3529  if (bIsLogged)
3530 
3531  {
3532 
3533  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("%s DescriptionFilePath EMPTY!"), *FString::Join(ModelNameList, TEXT(",")));
3534 
3535  }
3536 
3537  return false;
3538 
3539  }
3540 
3542 
3543  BaseFolderPath.IsEmpty())
3544 
3545  {
3546 
3547  if (bIsLogged)
3548 
3549  {
3550 
3551  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("%s BaseFolderPath EMPTY!"), *FString::Join(ModelNameList, TEXT(",")));
3552 
3553  }
3554 
3555  return false;
3556 
3557  }
3558 
3559  else if ((false == IsSingleCAD()) && (false == IsWorldModel()) && (0 == LinkPropList.Num()))
3560 
3561  {
3562 
3563  if (bIsLogged)
3564 
3565  {
3566 
3567  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("%s LinkPropList EMPTY!"), *FString::Join(ModelNameList, TEXT(",")));
3568 
3569  }
3570 
3571  return false;
3572 
3573  }
3574 
3575  else if ((0 == ChildModelsData.Num()) && (ModelNameList.Num() > 1))
3576 
3577  {
3578 
3579  if (bIsLogged)
3580 
3581  {
3582 
3583  UE_LOG_WITH_INFO(
3584 
3585  LogTemp, Log, TEXT("[%s] This should be a single model only!"), *FString::Join(ModelNameList, TEXT(",")));
3586 
3587  }
3588 
3589  return false;
3590 
3591  }
3592 
3593  else if (false == BaseLinkName.IsEmpty())
3594 
3595  {
3596 
3597  bool bBaseLinkFound = false;
3598 
3599  for (const auto& linkProp : LinkPropList)
3600 
3601  {
3602 
3603  if (BaseLinkName == linkProp.Name)
3604 
3605  {
3606 
3607  bBaseLinkFound = true;
3608 
3609  break;
3610 
3611  }
3612 
3613  }
3614 
3615  if (false == bBaseLinkFound)
3616 
3617  {
3618 
3619  if (bIsLogged)
3620 
3621  {
3622 
3623  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("BaseLinkName [%s] is not a link name!"), *BaseLinkName);
3624 
3625  }
3626 
3627  return false;
3628 
3629  }
3630 
3631  }
3632 
3633  else if (ArticulatedLinksNames.Num() > 0)
3634 
3635  {
3636 
3637  bool bAllArtLinksFound = true;
3638 
3639  for (const auto& artLinkName : ArticulatedLinksNames)
3640 
3641  {
3642 
3643  bool bLinkFound = false;
3644 
3645  for (const auto& linkProp : LinkPropList)
3646 
3647  {
3648 
3649  if (artLinkName == linkProp.Name)
3650 
3651  {
3652 
3653  bLinkFound = true;
3654 
3655  break;
3656 
3657  }
3658 
3659  }
3660 
3661  if (false == bLinkFound)
3662 
3663  {
3664 
3665  bAllArtLinksFound = false;
3666 
3667  if (bIsLogged)
3668 
3669  {
3670 
3671  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("Articulated link [%s] is not a link name!"), *artLinkName);
3672 
3673  }
3674 
3675  break;
3676 
3677  }
3678 
3679  }
3680 
3681  if (false == bAllArtLinksFound)
3682 
3683  {
3684 
3685  return false;
3686 
3687  }
3688 
3689  }
3690 
3691  else if (EndEffectorNames.Num() > 0)
3692 
3693  {
3694 
3695  bool bAllEELinksFound = true;
3696 
3697  for (const auto& eeName : EndEffectorNames)
3698 
3699  {
3700 
3701  bool bEELinkFound = false;
3702 
3703  for (const auto& linkProp : LinkPropList)
3704 
3705  {
3706 
3707  if (eeName == linkProp.Name)
3708 
3709  {
3710 
3711  bEELinkFound = true;
3712 
3713  break;
3714 
3715  }
3716 
3717  }
3718 
3719  if (false == bEELinkFound)
3720 
3721  {
3722 
3723  bAllEELinksFound = false;
3724 
3725  if (bIsLogged)
3726 
3727  {
3728 
3729  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("EndEffector [%s] is not a link name!"), *eeName);
3730 
3731  }
3732 
3733  break;
3734 
3735  }
3736 
3737  }
3738 
3739  if (false == bAllEELinksFound)
3740 
3741  {
3742 
3743  return false;
3744 
3745  }
3746 
3747  }
3748 
3749  else if (WheelPropList.Num() > 0)
3750 
3751  {
3752 
3753  bool bAllWheelsFound = true;
3754 
3755  for (const auto& wheelProp : WheelPropList)
3756 
3757  {
3758 
3759  bool bWheelFound = false;
3760 
3761  for (const auto& linkProp : LinkPropList)
3762 
3763  {
3764 
3765  if (linkProp.Name == wheelProp.WheelName)
3766 
3767  {
3768 
3769  bWheelFound = true;
3770 
3771  break;
3772 
3773  }
3774 
3775  }
3776 
3777  if (false == bWheelFound)
3778 
3779  {
3780 
3781  bAllWheelsFound = false;
3782 
3783  if (bIsLogged)
3784 
3785  {
3786 
3787  UE_LOG_WITH_INFO(LogTemp, Log, TEXT("Wheel [%s] is not a link name!"), *wheelProp.WheelName);
3788 
3789  }
3790 
3791  break;
3792 
3793  }
3794 
3795  }
3796 
3797  if (false == bAllWheelsFound)
3798 
3799  {
3800 
3801  return false;
3802 
3803  }
3804 
3805  }
3806 
3807  return true;
3808 
3809  }
3810 
3811  void PrintSelf() const
3812 
3813  {
3814 
3815  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("WorldName: %s"), *WorldName);
3816 
3817  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("UEComponentTypeFlags: %d"), UEComponentTypeFlags);
3818 
3819  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("bHasWorldJoint: %d"), bHasWorldJoint);
3820 
3821  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("ModelNameList: %s"), *FString::Join(ModelNameList, TEXT(",")));
3822 
3823  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("BaseFolderPath: %s"), *FPaths::ConvertRelativePathToFull(BaseFolderPath));
3824 
3825  UE_LOG_WITH_INFO(
3826 
3827  LogTemp, Display, TEXT("DescriptionFilePath: %s"), *FPaths::ConvertRelativePathToFull(DescriptionFilePath));
3828 
3829  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("ParentFrameName: %s"), *ParentFrameName);
3830 
3831  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("RelativeTransform: %s"), *RelativeTransform.ToString());
3832 
3833  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("BaseLinkName: %s"), *BaseLinkName);
3834 
3835  for (const auto& linkProp : LinkPropList)
3836 
3837  {
3838 
3839  linkProp.PrintSelf();
3840 
3841  }
3842 
3843  for (const auto& jointProp : JointPropList)
3844 
3845  {
3846 
3847  jointProp.PrintSelf();
3848 
3849  }
3850 
3851  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("ArticulatedLinksNames: %s"), *FString::Join(ArticulatedLinksNames, TEXT(",")));
3852 
3853  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("EndEffectorNames: %s"), *FString::Join(EndEffectorNames, TEXT(",")));
3854 
3855  for (const auto& wheelProp : WheelPropList)
3856 
3857  {
3858 
3859  wheelProp.PrintSelf();
3860 
3861  }
3862 
3863  UE_LOG_WITH_INFO(LogTemp, Display, TEXT("WholeBodyStaticMeshName: %s"), *WholeBodyStaticMeshName);
3864 
3866 
3867 
3868 
3869  for (const auto& modelInfo : ChildModelsData)
3870 
3871  {
3872 
3873  UE_LOG_WITH_INFO(LogTemp, Warning, TEXT("SUBMODEL"));
3874 
3875  modelInfo.PrintSelf();
3876 
3877  }
3878 
3879  }
3880 
3881 }; // END FRREntityModelData
3882 
3883 
3884 
3898 struct RAPYUTASIMULATIONPLUGINS_API FRREntityModelTableRow : public FTableRowBase
3899 
3900 {
3901 
3902 public:
3903 
3904  FRREntityModelTableRow(const FRREntityModelData& InEntityModelData) : Data(InEntityModelData)
3905 
3906  {
3907 
3908  }
3909 
3910  FRREntityModelTableRow(FRREntityModelData&& InEntityModelData) : Data(MoveTemp(InEntityModelData))
3911 
3912  {
3913 
3914  }
3915 
3917 
3918  {
3919 
3920  }
3921 
3922 
3928 
3929 };
3930 
3931 
3932 
3939 struct RAPYUTASIMULATIONPLUGINS_API FRREntityModelInfo : public TSharedFromThis<FRREntityModelInfo, ESPMode::ThreadSafe>
3940 
3941 {
3942 
3943 public:
3944 
3945  FRREntityModelInfo(const FRREntityModelData& InEntityModelData) : Data(InEntityModelData)
3946 
3947  {
3948 
3949  }
3950 
3951  FRREntityModelInfo(FRREntityModelData&& InEntityModelData) : Data(MoveTemp(InEntityModelData))
3952 
3953  {
3954 
3955  }
3956 
3958 
3959  {
3960 
3961  }
3962 
3963 
3964 
3966 
3968 
3969 
3970 
3971  FORCEINLINE const FString& GetBaseFolderPath() const
3972 
3973  {
3974 
3975  return Data.BaseFolderPath;
3976 
3977  }
3978 
3979 
3980 
3981  FORCEINLINE const FString& GetDescriptionFilePath() const
3982 
3983  {
3984 
3985  return Data.DescriptionFilePath;
3986 
3987  }
3988 
3989 
3990 
3991  FORCEINLINE const FString GetModelName() const
3992 
3993  {
3994 
3995  return Data.GetModelName();
3996 
3997  }
3998 
3999 
4000 
4001  FORCEINLINE const FString& GetWorldName() const
4002 
4003  {
4004 
4005  return Data.WorldName;
4006 
4007  }
4008 
4009 
4010 
4011  FORCEINLINE int32 GetCreatedInstancesNum() const
4012 
4013  {
4014 
4015  return Data.CreatedInstancesNum;
4016 
4017  }
4018 
4019 
4020 
4021  FORCEINLINE int32& GetCreatedInstancesNum()
4022 
4023  {
4024 
4025  return Data.CreatedInstancesNum;
4026 
4027  }
4028 
4029 
4030 
4031  FORCEINLINE bool HasWorldJoint() const
4032 
4033  {
4034 
4035  return Data.bHasWorldJoint;
4036 
4037  }
4038 
4039  FORCEINLINE int32 GetVisualsNum() const
4040 
4041  {
4042 
4043  return Data.GetVisualsNum();
4044 
4045  }
4046 
4047 
4048 
4050 
4051  FORCEINLINE int32 GetUEComponentTypeFlags() const
4052 
4053  {
4054 
4055  return Data.UEComponentTypeFlags;
4056 
4057  }
4058 
4059  FORCEINLINE bool IsUEComponentEnabled(const uint8 InTypeMask) const
4060 
4061  {
4062 
4063  return Data.IsUEComponentEnabled(InTypeMask);
4064 
4065  }
4066 
4067  FORCEINLINE bool IsUEComponentEnabled(const ERRUEComponentType InTypeMask) const
4068 
4069  {
4070 
4071  return Data.IsUEComponentEnabled(InTypeMask);
4072 
4073  }
4074 
4075  FORCEINLINE bool IsPlainManipulatorModel() const
4076 
4077  {
4078 
4079  return Data.IsPlainManipulatorModel();
4080 
4081  }
4082 
4083  FORCEINLINE bool IsPlainWheeledVehicleModel() const
4084 
4085  {
4086 
4087  return Data.IsPlainWheeledVehicleModel();
4088 
4089  }
4090 
4091  FORCEINLINE bool IsRobotModel() const
4092 
4093  {
4094 
4095  return Data.IsRobotModel();
4096 
4097  }
4098 
4099  FORCEINLINE bool IsObjectModel() const
4100 
4101  {
4102 
4103  return Data.IsObjectModel();
4104 
4105  }
4106 
4107 
4108 
4109  // Link/Joint list
4110 
4111  FORCEINLINE const FString& GetBaseLinkName() const
4112 
4113  {
4114 
4115  return Data.BaseLinkName;
4116 
4117  }
4118 
4119  FORCEINLINE const TArray<FRRRobotLinkProperty>& GetLinkPropList() const
4120 
4121  {
4122 
4123  return Data.LinkPropList;
4124 
4125  }
4126 
4127  FORCEINLINE TArray<FRRRobotLinkProperty>& GetLinkPropList()
4128 
4129  {
4130 
4131  return Data.LinkPropList;
4132 
4133  }
4134 
4135  FORCEINLINE const TArray<FRRRobotJointProperty>& GetJointPropList() const
4136 
4137  {
4138 
4139  return Data.JointPropList;
4140 
4141  }
4142 
4143  FORCEINLINE TArray<FRRRobotJointProperty>& GetJointPropList()
4144 
4145  {
4146 
4147  return Data.JointPropList;
4148 
4149  }
4150 
4151  FORCEINLINE const TArray<FRREntityModelData>& GetChildModelsData() const
4152 
4153  {
4154 
4155  return Data.ChildModelsData;
4156 
4157  }
4158 
4159 
4160 
4161  FORCEINLINE void RemoveLinkJointProp(const FString& InLinkName)
4162 
4163  {
4164 
4165  Data.RemoveLinkJointProp(InLinkName);
4166 
4167  }
4168 
4169 
4170 
4172 
4173  {
4174 
4175  return Data.GetBaseLinkProp();
4176 
4177  }
4178 
4179 
4180 
4181  FORCEINLINE FRRRobotLinkProperty GetLinkProp(const FString& InLinkName) const
4182 
4183  {
4184 
4185  return Data.GetLinkProp(InLinkName);
4186 
4187  }
4188 
4189 
4190 
4191  FORCEINLINE FRRRobotJointProperty GetJointProp(const FString& InJointName) const
4192 
4193  {
4194 
4195  return Data.GetJointProp(InJointName);
4196 
4197  }
4198 
4199 
4200 
4201  FORCEINLINE FRRRobotJointProperty GetJointPropFromChildLinkName(const FString& InChildLinkName) const
4202 
4203  {
4204 
4205  return Data.GetJointPropFromChildLinkName(InChildLinkName);
4206 
4207  }
4208 
4209 
4210 
4211  FORCEINLINE const FRRRobotLinkProperty FindLinkProp(int8 InLinkIndex) const
4212 
4213  {
4214 
4215  return Data.FindLinkProp(InLinkIndex);
4216 
4217  }
4218 
4219 
4220 
4221  FORCEINLINE const FRRRobotJointProperty FindJointPropByLinkIndex(int8 InLinkIndex) const
4222 
4223  {
4224 
4225  return Data.FindJointPropByLinkIndex(InLinkIndex);
4226 
4227  }
4228 
4229 
4230 
4231  FORCEINLINE FTransform GetLinkVisualOffset(int8 InLinkIndex) const
4232 
4233  {
4234 
4235  return Data.GetLinkVisualOffset(InLinkIndex);
4236 
4237  }
4238 
4239 
4240 
4241  FORCEINLINE FTransform GetLinkAbsoluteTransform(int8 InLinkIndex) const
4242 
4243  {
4244 
4245  return Data.GetLinkAbsoluteTransform(InLinkIndex);
4246 
4247  }
4248 
4249 
4250 
4251  FORCEINLINE FTransform GetLinkRelativeTransform(int8 InLinkIndex) const
4252 
4253  {
4254 
4255  return Data.GetLinkRelativeTransform(InLinkIndex);
4256 
4257  }
4258 
4259 
4260 
4261  FORCEINLINE FTransform GetLinkRelTransformToBase(int8 InLinkIndex) const
4262 
4263  {
4264 
4265  return Data.GetLinkRelTransformToBase(InLinkIndex);
4266 
4267  }
4268 
4269 
4270 
4271  FORCEINLINE FTransform GetLinkVisualOffsetToBase(int8 InLinkIndex) const
4272 
4273  {
4274 
4275  return Data.GetLinkVisualOffsetToBase(InLinkIndex);
4276 
4277  }
4278 
4279 
4280 
4282 
4283  {
4284 
4285  return Data.GetVisualInfo();
4286 
4287  }
4288 
4289 
4290 
4291  // Material
4292 
4294 
4295  {
4296 
4297  return Data.GetBodyMaterialInfo();
4298 
4299  }
4300 
4301 
4302 
4304 
4305  {
4306 
4307  return Data.GetVisualMaterialInfo();
4308 
4309  }
4310 
4311 
4312 
4313  // Articulated link names
4314 
4315  FORCEINLINE const TArray<FString>& GetArticulatedLinksNames() const
4316 
4317  {
4318 
4319  return Data.ArticulatedLinksNames;
4320 
4321  }
4322 
4323 
4324 
4325  // Endtip
4326 
4327  FORCEINLINE const TArray<FString>& GetEndEffectorNames() const
4328 
4329  {
4330 
4331  return Data.EndEffectorNames;
4332 
4333  }
4334 
4335 
4336 
4337  // Wheels properties
4338 
4339  FORCEINLINE const TArray<FRRRobotWheelProperty>& GetWheelPropList() const
4340 
4341  {
4342 
4343  return Data.WheelPropList;
4344 
4345  }
4346 
4347  FORCEINLINE bool HasWheel(const FString& InWheelName) const
4348 
4349  {
4350 
4351  return Data.HasWheel(InWheelName);
4352 
4353  }
4354 
4355 
4356 
4357  FORCEINLINE bool operator==(const FRREntityModelInfo& OtherModelInfo)
4358 
4359  {
4360 
4361  return (Data == OtherModelInfo.Data);
4362 
4363  }
4364 
4365  FORCEINLINE bool IsValid(bool bIsLogged = false) const
4366 
4367  {
4368 
4369  return Data.IsValid(bIsLogged);
4370 
4371  }
4372 
4373  FORCEINLINE void PrintSelf() const
4374 
4375  {
4376 
4377  Data.PrintSelf();
4378 
4379  }
4380 
4381 };
4382 
4383 
4384 
4393 class RAPYUTASIMULATIONPLUGINS_API FRREntityDescriptionParser
4394 
4395 {
4396 
4397 public:
4398 
4399  static constexpr const int8 ELEMENT_INDEX_NONE = -1;
4400 
4402 
4403  {
4404 
4405  }
4406 
4407  static FString GetRealPathFromMeshName(const FString& InMeshName, const FString& InRobotModelsFolderFullPath)
4408 
4409  {
4410 
4411  // Example of Mesh name in:
4412 
4413  // - URDF: [package://pr2/meshes/shoulder_v0/shoulder_pan.dae]
4414 
4415  // - SDF: [model://pr2/meshes/shoulder_v0/shoulder_pan.dae]
4416 
4417  FString meshName(InMeshName);
4418 
4419  if (meshName.RemoveFromStart(TEXT("package://")) || meshName.RemoveFromStart(TEXT("model://")))
4420 
4421  {
4422 
4423  return FPaths::ConvertRelativePathToFull(InRobotModelsFolderFullPath, meshName);
4424 
4425  }
4426 
4427  else
4428 
4429  {
4430 
4431  return InMeshName;
4432 
4433  }
4434 
4435  }
4436 
4437  virtual bool LoadModelInfoFromXML(const FString& InXMLString, FRREntityModelInfo& OutRobotModelInfo)
4438 
4439  {
4440 
4441  return true;
4442 
4443  }
4444 
4445  virtual FRREntityModelInfo LoadModelInfoFromFile(const FString& Path)
4446 
4447  {
4448 
4449  return FRREntityModelInfo();
4450 
4451  }
4452 
4453  virtual void ClearData()
4454 
4455  {
4456 
4457  }
4458 
4459 };
4460 
FRREntityModelData::GetLinkVisualOffsetToBase
FTransform GetLinkVisualOffsetToBase(int8 InLinkIndex) const
Get the visual offset transform of a link to base link its LinkIndex.
Definition: RREntityStructs.h:3300
ERRRobotStatus::ERROR
@ ERROR
On the move.
ERRRobotJointType::PRISMATIC
@ PRISMATIC
FRREntityModelData::BaseFolderPath
FString BaseFolderPath
Path to the base package folder, from which meshes' CAD file paths are defined as relative to.
Definition: RREntityStructs.h:2590
FRRRobotJointProperty
The FRRRobotJointProperty struct.
Definition: RREntityStructs.h:524
FRRRobotWheelProperty::FRRRobotWheelProperty
FRRRobotWheelProperty(FString InWheelName)
Definition: RREntityStructs.h:1965
ERREntityMeshComponentType
ERREntityMeshComponentType
Definition: RREntityStructs.h:271
FRRSensorProperty::LidarInfo
FRRSensorLidarInfo LidarInfo
TODO: To avoid extra memory cost, this should be actually a TUniquePtr, which is only instantiated up...
Definition: RREntityStructs.h:1659
FRREntityModelData::IsSingleCAD
bool IsSingleCAD() const
Definition: RREntityStructs.h:2473
URRTypeUtils::GetEnumValueAsString
static FORCEINLINE FString GetEnumValueAsString(const FString &InTypeName, TEnum InEnumValue, const TCHAR *InModuleName=nullptr)
Definition: RRTypeUtils.h:118
FRREntityModelData::GetLinkRelTransformToBase
FTransform GetLinkRelTransformToBase(int8 InLinkIndex) const
Get the relative transform of a link to base link its LinkIndex.
Definition: RREntityStructs.h:3254
FRREntityModelInfo::GetArticulatedLinksNames
const FORCEINLINE TArray< FString > & GetArticulatedLinksNames() const
Definition: RREntityStructs.h:4315
FRREntityModelData::WheelPropList
TArray< FRRRobotWheelProperty > WheelPropList
Definition: RREntityStructs.h:3431
FRRRobotJointProperty::GetLinearXYZ
void GetLinearXYZ(bool &bOutLinearX, bool &bOutLinearY, bool &bOutLinearZ) const
Definition: RREntityStructs.h:968
FRREntityModelInfo::FRREntityModelInfo
FRREntityModelInfo(FRREntityModelData &&InEntityModelData)
Definition: RREntityStructs.h:3951
FRREntityModelInfo::GetLinkRelativeTransform
FORCEINLINE FTransform GetLinkRelativeTransform(int8 InLinkIndex) const
Definition: RREntityStructs.h:4251
ERREntityGeometryType
ERREntityGeometryType
Definition: RREntityStructs.h:129
FRREntityModelData::IsSDF
bool IsSDF() const
Definition: RREntityStructs.h:2457
FRRRobotJointProperty::IsSwing2
bool IsSwing2(const FVector &InAxis) const
Twist(X), Swing1(Z), Swing2(Y)
Definition: RREntityStructs.h:948
EMPTY_STR
#define EMPTY_STR
Definition: RRGeneralUtils.h:43
ERREntityDescriptionType::URDF
@ URDF
FRRRobotJointProperty::GetJointAxis
FVector GetJointAxis(bool bIsGlobal=false, const FQuat &InLinkQuat=FQuat::Identity) const
Get the Joint Axis object.
Definition: RREntityStructs.h:850
ERRRobotStatus::MOVING
@ MOVING
Received command and in middle of processing.
FRREntityModelInfo::GetVisualsNum
FORCEINLINE int32 GetVisualsNum() const
Definition: RREntityStructs.h:4039
FRREntityModelInfo::GetBaseLinkProp
FORCEINLINE FRRRobotLinkProperty GetBaseLinkProp() const
Definition: RREntityStructs.h:4171
ERRJointAxisRotation
ERRJointAxisRotation
Definition: RREntityStructs.h:250
FRREntityGeometryInfo::MaterialInfo
FRRMaterialProperty MaterialInfo
Definition: RREntityStructs.h:1310
ERRShapeType::NONE
@ NONE
FRREntityModelInfo::FRREntityModelInfo
FRREntityModelInfo(const FRREntityModelData &InEntityModelData)
Definition: RREntityStructs.h:3945
FRREntityModelData::GetLinkRelativeTransform
FTransform GetLinkRelativeTransform(int8 InLinkIndex) const
Get the relative transform of a link to its parent by its LinkIndex.
Definition: RREntityStructs.h:3198
FRRRobotJointProperty::IsValidJointPosition
bool IsValidJointPosition(float InJointPos) const
Definition: RREntityStructs.h:982
FRREntityModelInfo::IsPlainManipulatorModel
FORCEINLINE bool IsPlainManipulatorModel() const
Definition: RREntityStructs.h:4075
FRREntityModelInfo::GetLinkRelTransformToBase
FORCEINLINE FTransform GetLinkRelTransformToBase(int8 InLinkIndex) const
Definition: RREntityStructs.h:4261
FRRRobotJointProperty::DynamicParams
FRRRobotJointDynamicProperties DynamicParams
Definition: RREntityStructs.h:720
FRREntityModelData::FRREntityModelData
FRREntityModelData(TArray< FString > &&InModelNameList)
Definition: RREntityStructs.h:2426
FRREntityModelData::IsObjectModel
bool IsObjectModel() const
Definition: RREntityStructs.h:2705
FRREntityModelInfo::GetJointProp
FORCEINLINE FRRRobotJointProperty GetJointProp(const FString &InJointName) const
Definition: RREntityStructs.h:4191
FRREntityModelInfo::GetLinkProp
FORCEINLINE FRRRobotLinkProperty GetLinkProp(const FString &InLinkName) const
Definition: RREntityStructs.h:4181
FRREntityModelInfo::GetBaseFolderPath
const FORCEINLINE FString & GetBaseFolderPath() const
Definition: RREntityStructs.h:3971
FRRRobotJointProperty::IsTwisting
bool IsTwisting(const FVector &InAxis) const
Twist(X), Swing1(Z), Swing2(Y)
Definition: RREntityStructs.h:884
ERRJointAxisRotation::Y
@ Y
FRREntityDescriptionParser::ClearData
virtual void ClearData()
Definition: RREntityStructs.h:4453
RRTypeUtils.h
UE type related utils.
FRRRobotJointDynamicProperties
Definition: RREntityStructs.h:300
FRREntityModelData::FRREntityModelData
FRREntityModelData(const TArray< FString > &InModelNameList)
Definition: RREntityStructs.h:2420
FRREntityModelData::IsPlainWheeledVehicleModel
bool IsPlainWheeledVehicleModel() const
Definition: RREntityStructs.h:2675
FRREntityModelData::operator==
bool operator==(const FRREntityModelData &OtherModelData)
Definition: RREntityStructs.h:3457
FRREntityModelData::EndEffectorNames
TArray< FString > EndEffectorNames
Definition: RREntityStructs.h:3420
ERRUEComponentType::WHEEL_DRIVE
@ WHEEL_DRIVE
FRRSensorLidarInfo
Sensor lidar info.
Definition: RREntityStructs.h:1409
ERREntityDescriptionType::SDF
@ SDF
URDF
FRREntityModelInfo::GetBodyMaterialInfo
FORCEINLINE FRRMaterialProperty GetBodyMaterialInfo() const
Definition: RREntityStructs.h:4293
FRRRobotJointProperty::GetLinearConstraintMotion
ELinearConstraintMotion GetLinearConstraintMotion() const
Definition: RREntityStructs.h:746
FRREntityModelInfo::PrintSelf
FORCEINLINE void PrintSelf() const
Definition: RREntityStructs.h:4373
ERRRobotJointType::NONE
@ NONE
FRRRobotJointProperty::GetJointTypeName
static FORCEINLINE FString GetJointTypeName(const ERRRobotJointType InJointType)
Definition: RREntityStructs.h:572
ERREntityMeshComponentType::PROCEDURAL_MESH
@ PROCEDURAL_MESH
ERRRobotStatus::IDLE
@ IDLE
Being built up (loading the meshses, building the structure, etc.)
FRRRobotJointValue::operator==
bool operator==(const FRRRobotJointValue &Other) const
Definition: RREntityStructs.h:1098
FRREntityModelData::GetModelDescTypeName
FString GetModelDescTypeName() const
Definition: RREntityStructs.h:2481
FRREntityModelInfo::GetModelName
const FORCEINLINE FString GetModelName() const
Definition: RREntityStructs.h:3991
URRTypeUtils::GetEnumValueFromString
static FORCEINLINE int8 GetEnumValueFromString(const FString &InTypeName, const FString &InEnumStringValue, const TCHAR *InModuleName=nullptr)
Definition: RRTypeUtils.h:184
FRRRobotJointProperty::PrintSelf
void PrintSelf() const
Definition: RREntityStructs.h:1000
FRREntityModelData::ArticulatedLinksNames
TArray< FString > ArticulatedLinksNames
Definition: RREntityStructs.h:3409
FRREntityModelData::ModelNameList
TArray< FString > ModelNameList
World model: [ModelNameList] >= 1.
Definition: RREntityStructs.h:2526
FRRRobotWheelProperty::WheelName
FString WheelName
Definition: RREntityStructs.h:1978
FRREntityModelData::SetUEComponentEnabled
void SetUEComponentEnabled(const ERRUEComponentType InTypeMask)
Definition: RREntityStructs.h:2659
FRREntityModelTableRow
Struct, inheriting from #FTableRowBase, storing entry data for #UDataTable.
Definition: RREntityStructs.h:3898
ERREntityGeometryType::COLLISION
@ COLLISION
ERRSensorType::LIDAR
@ LIDAR
FRRRobotJointDynamicProperties::FRRRobotJointDynamicProperties
FRRRobotJointDynamicProperties(float InStiffness, float InDamping, float InP, float InI, float InD)
Definition: RREntityStructs.h:316
FRREntityModelTableRow::Data
FRREntityModelData Data
Definition: RREntityStructs.h:3927
ERRLidarSensorType
ERRLidarSensorType
Definition: RREntityStructs.h:177
FRREntityModelInfo::GetLinkVisualOffset
FORCEINLINE FTransform GetLinkVisualOffset(int8 InLinkIndex) const
Definition: RREntityStructs.h:4231
FRREntityModelTableRow::FRREntityModelTableRow
FRREntityModelTableRow(const FRREntityModelData &InEntityModelData)
Definition: RREntityStructs.h:3904
FRREntityModelInfo::FindLinkProp
const FORCEINLINE FRRRobotLinkProperty FindLinkProp(int8 InLinkIndex) const
Definition: RREntityStructs.h:4211
FRREntityModelData::DescriptionFilePath
FString DescriptionFilePath
Robot Model Description File (URDF/SDF)
Definition: RREntityStructs.h:2601
FRRSensorProperty
Definition: RREntityStructs.h:1621
FRRRobotJointProperty::bIsTransformRelative
bool bIsTransformRelative
Whether Rotation & Location are absolute or relative.
Definition: RREntityStructs.h:620
FRREntityModelData::GetVisualsNum
int32 GetVisualsNum() const
Definition: RREntityStructs.h:2549
FRREntityModelInfo::IsUEComponentEnabled
FORCEINLINE bool IsUEComponentEnabled(const uint8 InTypeMask) const
Definition: RREntityStructs.h:4059
FRREntityModelInfo::GetWorldName
const FORCEINLINE FString & GetWorldName() const
Definition: RREntityStructs.h:4001
FRRSensorBaseInfo::PrintSelf
virtual void PrintSelf() const
Definition: RREntityStructs.h:1378
FRREntityGeometryInfo::Name
FString Name
Definition: RREntityStructs.h:1232
ERREntityDescriptionType::SINGLE_CAD
@ SINGLE_CAD
UDataTable
FRREntityModelInfo::GetLinkVisualOffsetToBase
FORCEINLINE FTransform GetLinkVisualOffsetToBase(int8 InLinkIndex) const
Definition: RREntityStructs.h:4271
ERREntityGeometryType::VISUAL
@ VISUAL
FRRSensorLidarInfo::PrintSelf
virtual void PrintSelf() const override
Definition: RREntityStructs.h:1556
FRREntityModelData::IsWorldModel
bool IsWorldModel() const
Definition: RREntityStructs.h:2498
FRREntityModelInfo::GetCreatedInstancesNum
FORCEINLINE int32 & GetCreatedInstancesNum()
Definition: RREntityStructs.h:4021
FRRSensorBaseInfo::~FRRSensorBaseInfo
virtual ~FRRSensorBaseInfo()
Definition: RREntityStructs.h:1339
FRREntityModelInfo::GetDescriptionFilePath
const FORCEINLINE FString & GetDescriptionFilePath() const
Definition: RREntityStructs.h:3981
FRREntityDescriptionParser::LoadModelInfoFromFile
virtual FRREntityModelInfo LoadModelInfoFromFile(const FString &Path)
Definition: RREntityStructs.h:4445
FRREntityModelInfo::GetVisualMaterialInfo
FORCEINLINE FRRMaterialProperty GetVisualMaterialInfo() const
Definition: RREntityStructs.h:4303
ERREntityGeometryType::INERTIA
@ INERTIA
URRRobotNode::Children
TArray< URRRobotNode * > Children
Definition: RREntityStructs.h:2381
ERRRobotJointType::FIXED
@ FIXED
FRREntityModelData::IsRobotModel
bool IsRobotModel() const
Definition: RREntityStructs.h:2695
FRREntityModelData::bHasWorldJoint
bool bHasWorldJoint
Definition: RREntityStructs.h:2513
FRRMaterialProperty
Definition: RRObjectCommon.h:516
FRRRobotJointValue::AngularVel
double AngularVel
[rad/s]
Definition: RREntityStructs.h:1082
ERRLidarSensorType::TWO_D
@ TWO_D
FRREntityModelData
Core UE struct housing entity (robot, object) model data, wrapped by FRREntityModelInfo & FRREntityMo...
Definition: RREntityStructs.h:2414
FRREntityGeometryInfo
Definition: RREntityStructs.h:1223
FRRRobotJointProperty::GetERRRobotJointTypeValueFromString
static FORCEINLINE ERRRobotJointType GetERRRobotJointTypeValueFromString(const FString &InEnumStringValue)
Definition: RREntityStructs.h:562
FRRRobotWheelProperty::FRRRobotWheelProperty
FRRRobotWheelProperty()
Definition: RREntityStructs.h:1959
FRREntityModelData::RelativeTransform
FTransform RelativeTransform
Definition: RREntityStructs.h:2622
FRRRobotJointProperty::ChildLinkName
FString ChildLinkName
Definition: RREntityStructs.h:644
FRREntityModelInfo::GetCreatedInstancesNum
FORCEINLINE int32 GetCreatedInstancesNum() const
Definition: RREntityStructs.h:4011
FRREntityModelData::GetBodyMaterialInfo
FRRMaterialProperty GetBodyMaterialInfo() const
Definition: RREntityStructs.h:3382
FRREntityDescriptionParser::LoadModelInfoFromXML
virtual bool LoadModelInfoFromXML(const FString &InXMLString, FRREntityModelInfo &OutRobotModelInfo)
Definition: RREntityStructs.h:4437
FRRRobotJointProperty::operator==
bool operator==(const FString &String)
Definition: RREntityStructs.h:730
FRREntityModelData::SetUEComponentEnabled
void SetUEComponentEnabled(const int32 InTypeMask)
Definition: RREntityStructs.h:2651
RRMathUtils.h
Math utils.
FRREntityModelInfo::IsRobotModel
FORCEINLINE bool IsRobotModel() const
Definition: RREntityStructs.h:4091
ERREntityDescriptionType::TOTAL
@ TOTAL
Raw single CAD (FBX, COLLADA, etc.)
URRRobotNode::JointProp
FRRRobotJointProperty JointProp
Definition: RREntityStructs.h:2395
FRREntityDescriptionParser::GetRealPathFromMeshName
static FString GetRealPathFromMeshName(const FString &InMeshName, const FString &InRobotModelsFolderFullPath)
Definition: RREntityStructs.h:4407
FRREntityModelData::CreatedInstancesNum
int32 CreatedInstancesNum
Definition: RREntityStructs.h:2608
FRRRobotJointDynamicProperties::FRRRobotJointDynamicProperties
FRRRobotJointDynamicProperties(const FString &InJointName)
Definition: RREntityStructs.h:310
ERRRobotJointType::REVOLUTE
@ REVOLUTE
FRREntityModelInfo::IsValid
FORCEINLINE bool IsValid(bool bIsLogged=false) const
Definition: RREntityStructs.h:4365
FRRRobotJointProperty::IsValidJointVelocity
bool IsValidJointVelocity(float InJointVelocity) const
Definition: RREntityStructs.h:990
FRRMaterialProperty::PrintSelf
void PrintSelf() const
Definition: RRObjectCommon.h:589
FRREntityModelData::FRREntityModelData
FRREntityModelData()
Definition: RREntityStructs.h:2432
FRREntityModelInfo::GetBaseLinkName
const FORCEINLINE FString & GetBaseLinkName() const
Definition: RREntityStructs.h:4111
FRRRobotJointProperty::operator==
bool operator==(const FRRRobotJointProperty &JointProp)
Definition: RREntityStructs.h:722
FRREntityModelData::WorldName
FString WorldName
Definition: RREntityStructs.h:2496
FRREntityModelData::GetVisualMaterialInfo
FRRMaterialProperty GetVisualMaterialInfo() const
Definition: RREntityStructs.h:3392
FRREntityModelInfo::GetLinkPropList
FORCEINLINE TArray< FRRRobotLinkProperty > & GetLinkPropList()
Definition: RREntityStructs.h:4127
FRREntityModelInfo::RemoveLinkJointProp
FORCEINLINE void RemoveLinkJointProp(const FString &InLinkName)
Definition: RREntityStructs.h:4161
FRREntityModelData::FindJointPropByLinkIndex
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
FRREntityModelData::HasDriveComponents
bool HasDriveComponents() const
Definition: RREntityStructs.h:2683
FRRRobotJointValue
Joint value struct, mainly to directly store input values from ROS cmds, thus units are in SI to avoi...
Definition: RREntityStructs.h:1053
FRREntityModelData::GetLinkAbsoluteTransform
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::FRREntityModelTableRow
FRREntityModelTableRow()
Definition: RREntityStructs.h:3916
FRRRobotJointDynamicProperties::MaxVelocity
float MaxVelocity
[rad/s or m/s]
Definition: RREntityStructs.h:439
FRREntityModelInfo::GetChildModelsData
const FORCEINLINE TArray< FRREntityModelData > & GetChildModelsData() const
Definition: RREntityStructs.h:4151
FRREntityModelData::IsURDF
bool IsURDF() const
Definition: RREntityStructs.h:2449
FRRRobotJointDynamicProperties::JointName
FString JointName
Definition: RREntityStructs.h:345
FRREntityModelData::BaseLinkName
FString BaseLinkName
Definition: RREntityStructs.h:2722
FRREntityModelInfo::GetJointPropList
const FORCEINLINE TArray< FRRRobotJointProperty > & GetJointPropList() const
Definition: RREntityStructs.h:4135
FRRRobotJointProperty::IsSwing1
bool IsSwing1(const FVector &InAxis) const
Twist(X), Swing1(Z), Swing2(Y)
Definition: RREntityStructs.h:916
FRRRobotJointProperty::GetAngularConstraintMotion
EAngularConstraintMotion GetAngularConstraintMotion() const
Definition: RREntityStructs.h:790
ERRRobotStatus::INVALID
@ INVALID
FRRRobotJointProperty::Name
FString Name
Definition: RREntityStructs.h:549
ERRRobotJointType::CONTINUOUS
@ CONTINUOUS
FRREntityModelInfo::FindJointPropByLinkIndex
const FORCEINLINE FRRRobotJointProperty FindJointPropByLinkIndex(int8 InLinkIndex) const
Definition: RREntityStructs.h:4221
ENUM_CLASS_FLAGS
ENUM_CLASS_FLAGS(ERRUEComponentType)
FRREntityModelData::ChildModelsData
TArray< FRREntityModelData > ChildModelsData
Struct recursion is NOT yet supported for UPROPERTY.
Definition: RREntityStructs.h:2744
FRREntityModelData::LinkPropList
TArray< FRRRobotLinkProperty > LinkPropList
Definition: RREntityStructs.h:2729
FRREntityModelData::IsValid
bool IsValid(bool bIsLogged=false) const
Definition: RREntityStructs.h:3467
FRREntityModelInfo::IsUEComponentEnabled
FORCEINLINE bool IsUEComponentEnabled(const ERRUEComponentType InTypeMask) const
Definition: RREntityStructs.h:4067
ERRLidarSensorType::THREE_D
@ THREE_D
FRREntityModelData::IsPlainManipulatorModel
bool IsPlainManipulatorModel() const
Definition: RREntityStructs.h:2667
ERRRobotJointType::BALL
@ BALL
FRRSensorLidarInfo::NoiseTypeName
FString NoiseTypeName
Definition: RREntityStructs.h:1538
FRREntityModelInfo::FRREntityModelInfo
FRREntityModelInfo()
Definition: RREntityStructs.h:3957
ERRShapeType
ERRShapeType
Shape types.
Definition: RRObjectCommon.h:137
FRREntityModelData::ParentFrameName
FString ParentFrameName
Definition: RREntityStructs.h:2615
FRRSensorProperty::SensorName
FString SensorName
Definition: RREntityStructs.h:1639
FRREntityModelData::WholeBodyMaterialInfo
FRRMaterialProperty WholeBodyMaterialInfo
Definition: RREntityStructs.h:3380
FRREntityModelData::GetLinkVisualOffset
FTransform GetLinkVisualOffset(int8 InLinkIndex) const
Get visual offset transform of a link by its LinkIndex.
Definition: RREntityStructs.h:3104
FRREntityModelInfo::operator==
FORCEINLINE bool operator==(const FRREntityModelInfo &OtherModelInfo)
Definition: RREntityStructs.h:4357
FRREntityDescriptionParser::~FRREntityDescriptionParser
virtual ~FRREntityDescriptionParser()
Definition: RREntityStructs.h:4401
FRREntityModelInfo
Plain struct wrapping robot model data (FRREntityModelData), being thread-safe accessible through TSh...
Definition: RREntityStructs.h:3939
FRRRobotJointValue::operator!=
bool operator!=(const FRRRobotJointValue &Other) const
Definition: RREntityStructs.h:1112
FRREntityModelData::HasWheel
bool HasWheel(const FString &InWheelName) const
Definition: RREntityStructs.h:3433
FRREntityModelData::IsUEComponentEnabled
bool IsUEComponentEnabled(const int32 InTypeMask) const
Definition: RREntityStructs.h:2635
FRREntityModelInfo::IsObjectModel
FORCEINLINE bool IsObjectModel() const
Definition: RREntityStructs.h:4099
FRRRobotJointProperty::GetTwistSwing
void GetTwistSwing(bool &bOutTwist, bool &bOutSwing1, bool &bOutSwing2) const
Definition: RREntityStructs.h:956
ERREntityMeshComponentType::DYNAMIC_MESH
@ DYNAMIC_MESH
URRRobotNode
Definition: RREntityStructs.h:2363
ERRSensorType::IMU
@ IMU
ERRRobotStatus
ERRRobotStatus
Definition: RREntityStructs.h:102
FRRRobotJointDynamicProperties::FRRRobotJointDynamicProperties
FRRRobotJointDynamicProperties()
Definition: RREntityStructs.h:304
FRRRobotWheelProperty
Wheel property for the robot, used to store configurations for runtime #UChaosVehicleWheel setup.
Definition: RREntityStructs.h:1953
FRREntityModelData::FindLinkProp
FRRRobotLinkProperty FindLinkProp(int8 InLinkIndex) const
Get the property of a link by its LinkIndex.
Definition: RREntityStructs.h:3030
FRRRobotWheelProperty::PrintSelf
void PrintSelf() const
Definition: RREntityStructs.h:2344
FRREntityModelData::UpdateLinksLocationFromJoints
void UpdateLinksLocationFromJoints()
http://wiki.ros.org/urdf/XML/joint
Definition: RREntityStructs.h:2774
ERRSensorType::NONE
@ NONE
FRREntityModelInfo::HasWorldJoint
FORCEINLINE bool HasWorldJoint() const
Definition: RREntityStructs.h:4031
FRRRobotJointProperty::FRRRobotJointProperty
FRRRobotJointProperty(FString InName)
Definition: RREntityStructs.h:536
ERRLidarSensorType::NONE
@ NONE
FRREntityModelInfo::GetVisualInfo
FORCEINLINE FRREntityGeometryInfo GetVisualInfo() const
Definition: RREntityStructs.h:4281
FRRRobotJointDynamicProperties::PrintSelf
void PrintSelf() const
Definition: RREntityStructs.h:487
FRRRobotJointProperty::MimicJointName
FString MimicJointName
Definition: RREntityStructs.h:651
FRREntityModelInfo::GetWheelPropList
const FORCEINLINE TArray< FRRRobotWheelProperty > & GetWheelPropList() const
Definition: RREntityStructs.h:4339
ERRRobotJointStatus::INVALID
@ INVALID
ERRSensorType::CAMERA
@ CAMERA
FRREntityGeometryInfo::LinkName
FString LinkName
Definition: RREntityStructs.h:1281
ERRRobotJointStatus
ERRRobotJointStatus
Definition: RREntityStructs.h:229
FRRSensorProperty::PrintSelf
void PrintSelf() const
Definition: RREntityStructs.h:1663
FRREntityModelData::JointPropList
TArray< FRRRobotJointProperty > JointPropList
Definition: RREntityStructs.h:2736
FRRRobotJointProperty::GetTransform
FTransform GetTransform() const
Definition: RREntityStructs.h:624
FRREntityGeometryInfo::MeshName
FString MeshName
Definition: RREntityStructs.h:1239
ERREntityDescriptionType
ERREntityDescriptionType
Definition: RREntityStructs.h:69
FRREntityModelData::UEComponentTypeFlags
int32 UEComponentTypeFlags
UE Component types.
Definition: RREntityStructs.h:2633
FRREntityModelData::GetModelName
FString GetModelName() const
Definition: RREntityStructs.h:2528
FRRRobotWheelProperty::LateralSlipGraph
FRuntimeFloatCurve LateralSlipGraph
Definition: RREntityStructs.h:2159
ERREntityDescriptionType::UE_DATA_TABLE
@ UE_DATA_TABLE
SDF
FRREntityModelData::GetBaseLinkProp
FRRRobotLinkProperty GetBaseLinkProp() const
Get the property of base link of which the name is denoted by BaseLinkName.
Definition: RREntityStructs.h:2892
FRRRobotJointValue::ToString
FString ToString() const
Definition: RREntityStructs.h:1086
FRREntityModelData::IsUEComponentEnabled
bool IsUEComponentEnabled(const ERRUEComponentType InTypeMask) const
Definition: RREntityStructs.h:2643
FRREntityModelInfo::GetEndEffectorNames
const FORCEINLINE TArray< FString > & GetEndEffectorNames() const
Definition: RREntityStructs.h:4327
FRREntityModelInfo::Data
FRREntityModelData Data
Robot model data.
Definition: RREntityStructs.h:3967
FRREntityModelInfo::GetLinkAbsoluteTransform
FORCEINLINE FTransform GetLinkAbsoluteTransform(int8 InLinkIndex) const
Definition: RREntityStructs.h:4241
FRREntityGeometryInfo::GetTransformOffset
FTransform GetTransformOffset() const
Definition: RREntityStructs.h:1297
FRREntityModelData::TotalSize
FVector TotalSize
Meshes are async loaded, & so their sizes.
Definition: RREntityStructs.h:2545
FRRRobotJointValue::Position
double Position
[rad] for REVOLUTE joint, [m] for Prismatic Joint
Definition: RREntityStructs.h:1064
ERREntityMeshComponentType::STATIC_MESH
@ STATIC_MESH
FRRRobotJointProperty::FRRRobotJointProperty
FRRRobotJointProperty()
Definition: RREntityStructs.h:530
FRREntityModelData::GetJointPropFromChildLinkName
FRRRobotJointProperty GetJointPropFromChildLinkName(const FString &InChildLinkName) const
Get the property of the first joint having its child link name as InChildLinkName.
Definition: RREntityStructs.h:2994
FRREntityModelData::GetJointProp
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
FRRRobotJointProperty::GetAxis
const FVector & GetAxis(bool bIsLocal=false) const
Definition: RREntityStructs.h:683
FRREntityModelData::GetLinkProp
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
FRREntityModelData::GetVisualInfo
FRREntityGeometryInfo GetVisualInfo() const
Get model visual info.
Definition: RREntityStructs.h:3350
ERRRobotJointType
ERRRobotJointType
Definition: RREntityStructs.h:198
FRRSensorProperty::LinkName
FString LinkName
Definition: RREntityStructs.h:1632
FRREntityModelData::IsUEDataTable
bool IsUEDataTable() const
Definition: RREntityStructs.h:2465
FRREntityModelTableRow::FRREntityModelTableRow
FRREntityModelTableRow(FRREntityModelData &&InEntityModelData)
Definition: RREntityStructs.h:3910
ERRRobotJointType::FLOATING
@ FLOATING
ERREntityMeshComponentType::SKELETAL_MESH
@ SKELETAL_MESH
ERREntityDescriptionType::NONE
@ NONE
ERRUEComponentType
ERRUEComponentType
Definition: RREntityStructs.h:46
FRREntityDescriptionParser
This class will co-parent with [IFastXmlCallback], which is not a USTRUCT.
Definition: RREntityStructs.h:4393
ERRJointAxisRotation::Z
@ Z
FRRRobotJointProperty::IsValid
bool IsValid() const
Definition: RREntityStructs.h:738
FRREntityModelData::PrintSelf
void PrintSelf() const
Definition: RREntityStructs.h:3811
ERRUEComponentType::NONE
@ NONE
FRRRobotJointValue::LinearVel
double LinearVel
[m/s]
Definition: RREntityStructs.h:1073
ERRSensorType::DEPTH
@ DEPTH
FRRRobotJointDynamicProperties::FRRRobotJointDynamicProperties
FRRRobotJointDynamicProperties(const FString &InJointName, float InStiffness, float InDamping)
Definition: RREntityStructs.h:332
FRREntityModelInfo::GetLinkPropList
const FORCEINLINE TArray< FRRRobotLinkProperty > & GetLinkPropList() const
Definition: RREntityStructs.h:4119
ERRUEComponentType::ARTICULATION_DRIVE
@ ARTICULATION_DRIVE
FRREntityModelInfo::HasWheel
FORCEINLINE bool HasWheel(const FString &InWheelName) const
Definition: RREntityStructs.h:4347
FRREntityModelData::RemoveLinkJointProp
void RemoveLinkJointProp(const FString &InLinkName)
Remove all link properties of InLinkName and its corresponding joint properties having their #ParentL...
Definition: RREntityStructs.h:2812
ERRSensorType
ERRSensorType
Definition: RREntityStructs.h:152
URRRobotNode::LinkProp
FRRRobotLinkProperty LinkProp
Definition: RREntityStructs.h:2388
ERRUEComponentType::DIFF_DRIVE
@ DIFF_DRIVE
ERRJointAxisRotation::X
@ X
FRRRobotJointProperty::ParentLinkName
FString ParentLinkName
Definition: RREntityStructs.h:637
FRREntityModelInfo::GetJointPropList
FORCEINLINE TArray< FRRRobotJointProperty > & GetJointPropList()
Definition: RREntityStructs.h:4143
FRREntityModelInfo::IsPlainWheeledVehicleModel
FORCEINLINE bool IsPlainWheeledVehicleModel() const
Definition: RREntityStructs.h:4083
FRREntityModelInfo::GetJointPropFromChildLinkName
FORCEINLINE FRRRobotJointProperty GetJointPropFromChildLinkName(const FString &InChildLinkName) const
Definition: RREntityStructs.h:4201
ERRRobotStatus::CREATING
@ CREATING
Invalid status, eg not loaded successfully.
FRRSensorBaseInfo
Sensor base info which includes essential base attributes such as Topic name, frame id,...
Definition: RREntityStructs.h:1333
ERRRobotStatus::ORDER_PROCESSING
@ ORDER_PROCESSING
Idling, ready for command order.
FRREntityModelData::WholeBodyStaticMeshName
FString WholeBodyStaticMeshName
Definition: RREntityStructs.h:3369
RRCoreUtils.h
Core utils.
FRREntityModelData::ModelDescType
ERREntityDescriptionType ModelDescType
Robot Model Description Type (URDF/SDF)
Definition: RREntityStructs.h:2447
FRREntityModelInfo::GetUEComponentTypeFlags
FORCEINLINE int32 GetUEComponentTypeFlags() const
UE Component types.
Definition: RREntityStructs.h:4051
ERRRobotJointType::PLANAR
@ PLANAR