浏览代码

Various changes to make crawler learning work. Demonstration of ArticulationBody.enable=false crash.

/PhysXArticulations20201
Vilmantas Balasevicius 5 年前
当前提交
0b0383f1
共有 7 个文件被更改,包括 559 次插入533 次删除
  1. 53
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/ArticulatedCrawler.prefab
  2. 259
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/ArticulatedFixedPlatform.prefab
  3. 7
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/ArticulatedCrawlerManualControl.unity
  4. 740
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/ArticulatedCrawlerStaticTarget.unity
  5. 2
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/ArticulatedCrawlerAgent.cs
  6. 11
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/ArticulatedCrawlerManualControl.cs
  7. 20
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/ArticulatedJointDriveController.cs

53
UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/ArticulatedCrawler.prefab


m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &114805933462601644
MonoBehaviour:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &114245671031386664
MonoBehaviour:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1528865102058454
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1726653501711894
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1828705975967124
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &114418822382166060
MonoBehaviour:
m_ObjectHideFlags: 0

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 0
m_Swing2: 0
m_SwingY: 0
m_SwingZ: 0
m_Twist: 0
m_XDrive:
lowerLimit: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1932904558829096
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &74792054008867844
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1375085644099298951
GameObject:
m_ObjectHideFlags: 0

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 1
m_Swing2: 1
m_SwingY: 1
m_SwingZ: 1
m_Twist: 0
m_XDrive:
lowerLimit: -120

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &8617053891981789506
MonoBehaviour:
m_ObjectHideFlags: 0

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 1
m_Swing2: 1
m_SwingY: 1
m_SwingZ: 1
m_Twist: 0
m_XDrive:
lowerLimit: -120

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &2186961647629543809
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &3729430663587470931
MonoBehaviour:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &3866106115563462531
GameObject:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &4108932900018414747
MonoBehaviour:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &1614554596081838312
MonoBehaviour:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &1490860231545480551
MonoBehaviour:
m_ObjectHideFlags: 0

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 1
m_Swing2: 1
m_SwingY: 1
m_SwingZ: 1
m_Twist: 0
m_XDrive:
lowerLimit: -120

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &142744381922245345
MonoBehaviour:
m_ObjectHideFlags: 0

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 2
m_Swing2: 2
m_SwingY: 0
m_SwingZ: 0
m_Twist: 1
m_XDrive:
lowerLimit: -120

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 2
m_Swing2: 2
m_SwingY: 0
m_SwingZ: 0
m_Twist: 1
m_XDrive:
lowerLimit: -120

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 1
m_Swing2: 0
m_SwingY: 0
m_SwingZ: 0
m_Twist: 1
m_XDrive:
lowerLimit: -120

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 2
m_Swing2: 2
m_SwingY: 0
m_SwingZ: 0
m_Twist: 1
m_XDrive:
lowerLimit: -120

m_LinearX: 0
m_LinearY: 0
m_LinearZ: 0
m_Swing1: 1
m_Swing2: 1
m_SwingY: 1
m_SwingZ: 1
m_Twist: 0
m_XDrive:
lowerLimit: -120

259
UnitySDK/Assets/ML-Agents/Examples/Crawler/Prefabs/ArticulatedFixedPlatform.prefab


m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 975, y: 4, z: 0}
m_LocalPosition: {x: 975, y: 0.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4309919623019186}

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!54 &248458943591167062
Rigidbody:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &65552026022255230
BoxCollider:
m_ObjectHideFlags: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!64 &64915381469382996
MeshCollider:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 4309919623019186}
m_Modifications:
- target: {fileID: 1129387478859796, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2, type: 3}
propertyPath: m_Name
value: ArticulatedCrawler
objectReference: {fileID: 0}
- target: {fileID: 4283901937423508, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2, type: 3}
propertyPath: m_LocalPosition.x
value: 0

propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1129387478859796, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2, type: 3}
propertyPath: m_Name
value: ArticulatedCrawler
objectReference: {fileID: 0}
- target: {fileID: 7737080709538424164, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: targetIsStatic
value: 1
propertyPath: m_ParentAnchorPosition.x
value: -0.98527044
- target: {fileID: 5477127875235992920, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.x
value: -0.34
propertyPath: m_ParentAnchorPosition.y
value: -0.15444617
- target: {fileID: 5477127875235992920, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
value: 0.33999467
value: -0.94547755
- target: {fileID: 7568056552315507695, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.x
value: 0.34
propertyPath: m_ParentAnchorRotation.z
value: 0
- target: {fileID: 7568056552315507695, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.z
value: -0.33999467
propertyPath: m_ParentAnchorRotation.w
value: 0.9238796
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.x
value: -0.34000012
propertyPath: target
value:
objectReference: {fileID: 4749909135913778}
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
propertyPath: ground
value:
objectReference: {fileID: 4856650706546504}
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
propertyPath: brain
value:
objectReference: {fileID: 11400000, guid: 0505e961608004377974940ed17e03d5,
type: 2}
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
propertyPath: detectTargets
value: 0
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.y
value: -0.16999991
propertyPath: targetIsStatic
value: 1
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153208165644155028, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.z
value: -0.3399946
propertyPath: m_ConnectedAnchor.x
value: -0.0000046193595
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153208165644155028, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorRotation.x
value: 0
propertyPath: m_ConnectedAnchor.y
value: 0.62499624
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153258788415880078, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorRotation.y
value: 0.38268355
propertyPath: m_ConnectedAnchor.z
value: 0.2828397
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153475598826299386, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorRotation.z
value: 0
propertyPath: m_ConnectedAnchor.x
value: 0.0000032511432
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153475598826299386, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorRotation.w
value: -0.9238796
propertyPath: m_ConnectedAnchor.y
value: 0.6249948
- target: {fileID: 484994017600599577, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153558694387803708, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.x
value: 0.34000012
propertyPath: m_ConnectedAnchor.x
value: -0.000004619356
- target: {fileID: 484994017600599577, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153558694387803708, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.z
value: 0.3399946
propertyPath: m_ConnectedAnchor.y
value: 0.6249963
- target: {fileID: 5132821532538140345, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153842898101386942, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.z
value: -0.94547755
propertyPath: m_ConnectedAnchor.x
value: 0.2828424
- target: {fileID: 5132821532538140345, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153842898101386942, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.x
value: -0.98527044
propertyPath: m_ConnectedAnchor.z
value: 0.28283963
- target: {fileID: 8962597602698882073, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153987082673184770, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.x
value: -0.98526704
propertyPath: m_ConnectedAnchor.x
value: -0.2828424
- target: {fileID: 8962597602698882073, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 153987082673184770, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorPosition.z
value: -0.945482
propertyPath: m_ConnectedAnchor.z
value: -0.28283963
objectReference: {fileID: 0}
- target: {fileID: 391510198893407734, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}

propertyPath: m_ParentAnchorPosition.z
value: -0.9454822
objectReference: {fileID: 0}
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 484994017600599577, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
propertyPath: m_ParentAnchorPosition.x
value: 0.34000012
objectReference: {fileID: 0}
- target: {fileID: 484994017600599577, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
propertyPath: m_ParentAnchorPosition.z
value: 0.3399946
objectReference: {fileID: 0}
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
value: -0.98527044
value: -0.34000012
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
value: -0.15444617
value: -0.16999991
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
value: -0.94547755
value: -0.3399946
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorRotation.z
propertyPath: m_ParentAnchorRotation.x
- target: {fileID: 75375539162916863, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ParentAnchorRotation.w
value: 0.9238796
propertyPath: m_ParentAnchorRotation.y
value: 0.38268355
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
propertyPath: target
value:
objectReference: {fileID: 4749909135913778}
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
propertyPath: ground
value:
objectReference: {fileID: 4856650706546504}
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
propertyPath: brain
value:
objectReference: {fileID: 11400000, guid: 0505e961608004377974940ed17e03d5,
type: 2}
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: detectTargets
propertyPath: m_ParentAnchorRotation.z
- target: {fileID: 114824265617332224, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 952006233201449903, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: targetIsStatic
value: 1
propertyPath: m_ParentAnchorRotation.w
value: -0.9238796
- target: {fileID: 153208165644155028, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 5132821532538140345, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.x
value: -0.0000046193595
propertyPath: m_ParentAnchorPosition.z
value: -0.94547755
- target: {fileID: 153208165644155028, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 5132821532538140345, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.y
value: 0.62499624
propertyPath: m_ParentAnchorPosition.x
value: -0.98527044
- target: {fileID: 153987082673184770, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 5477127875235992920, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.x
value: -0.2828424
propertyPath: m_ParentAnchorPosition.x
value: -0.34
- target: {fileID: 153987082673184770, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 5477127875235992920, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.z
value: -0.28283963
propertyPath: m_ParentAnchorPosition.z
value: 0.33999467
- target: {fileID: 153842898101386942, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 7568056552315507695, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.x
value: 0.2828424
propertyPath: m_ParentAnchorPosition.x
value: 0.34
- target: {fileID: 153842898101386942, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 7568056552315507695, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.z
value: 0.28283963
propertyPath: m_ParentAnchorPosition.z
value: -0.33999467
- target: {fileID: 153558694387803708, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 7737080709538424164, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.x
value: -0.000004619356
propertyPath: targetIsStatic
value: 1
- target: {fileID: 153558694387803708, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 7737080709538424164, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.y
value: 0.6249963
propertyPath: detectTargets
value: 0
- target: {fileID: 153475598826299386, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 7737080709538424164, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.x
value: 0.0000032511432
propertyPath: respawnTargetWhenTouched
value: 0
- target: {fileID: 153475598826299386, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 8962597602698882073, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.y
value: 0.6249948
propertyPath: m_ParentAnchorPosition.x
value: -0.98526704
- target: {fileID: 153258788415880078, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
- target: {fileID: 8962597602698882073, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
propertyPath: m_ConnectedAnchor.z
value: 0.2828397
propertyPath: m_ParentAnchorPosition.z
value: -0.945482
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2, type: 3}

7
UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/ArticulatedCrawlerManualControl.unity


upperLeg1: {fileID: 384922840}
foreLeg0: {fileID: 1541621532}
foreLeg1: {fileID: 162708877}
body: {fileID: 1633365430}
useAlternativeKeySetForInput: 0
maxJointForceLimit: 1000
maxJointSpring: 100

type: 3}
m_PrefabInstance: {fileID: 671491189}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1633365430 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1828705975967124, guid: 1661ce2a8a3cdfd3480c3d24bddd72f2,
type: 3}
m_PrefabInstance: {fileID: 671491189}
m_PrefabAsset: {fileID: 0}

740
UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/ArticulatedCrawlerStaticTarget.unity
文件差异内容过多而无法显示
查看文件

2
UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/ArticulatedCrawlerAgent.cs


public void GetRandomTargetPos()
{
var newTargetPos = Random.insideUnitSphere * targetSpawnRadius;
newTargetPos.y = 5;
newTargetPos.y = 0.5f;
target.position = newTargetPos + ground.position;
}

11
UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/ArticulatedCrawlerManualControl.cs


{
public GameObject upperLeg0, upperLeg1;
public GameObject foreLeg0, foreLeg1;
public GameObject body;
private ArticulationBody m_AbBody;
private Vector3 m_rotationUpper0, m_rotationUpper1;
private Vector3 m_rotationFore0, m_rotationFore1;

m_AbUpper1 = upperLeg1.GetComponent<ArticulationBody>();
m_AbFore1 = foreLeg1.GetComponent<ArticulationBody>();
m_AbBody = body.GetComponent<ArticulationBody>();
m_rotationUpper0 = m_rotationFore0 = m_rotationUpper1 = m_rotationFore1 = Vector3.zero;
}

/// </summary>
public void AgentReset()
{
m_rotationUpper0 = m_rotationFore0 = m_rotationUpper1 = m_rotationFore1 = Vector3.zero;
Vector3 position = new Vector3(0.0f, 8.0f, 6.3f);
Quaternion rotation = Quaternion.identity;
m_AbBody.enabled = false;
//m_AbBody.TeleportRoot(position, rotation);
m_AbBody.enabled = true;
//m_rotationUpper0 = m_rotationFore0 = m_rotationUpper1 = m_rotationFore1 = Vector3.zero;
/*
m_AbUpper.transform.position = new Vector3(0f, -4f, 0f) + transform.position;

20
UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/ArticulatedJointDriveController.cs


{
//[Header("Body Part Info")][Space(10)] public ConfigurableJoint joint;
public ArticulationBody arb;
public Transform t;
[HideInInspector] public Vector3 startingArbPos;
[HideInInspector] public Quaternion startingArbRot;
[Header("Ground & Target Contact")][Space(10)]
public GroundContact groundContact;

{
// Can't assign transforms for articulation bodies: transform changes are ignored, simulations goes on.
// No way to reset velocities for articulation bodies now
if (bp.arb.isRoot)
bp.arb.TeleportRoot(bp.startingPos, bp.startingRot);
//bp.arb.transform.position = bp.startingPos;
//bp.arb.transform.rotation = bp.startingRot;
//if (bp.arb.isRoot)
//{
// bp.arb.TeleportRoot(bp.startingArbPos, bp.startingArbRot);
// bp.t.position = bp.startingPos;
// bp.t.rotation = bp.startingRot;
//}
// Can't assigned articulation body velocitys/angularVelocities
//bp.arb.velocity = Vector3.zero;
//bp.arb.angularVelocity = Vector3.zero;

var bp = new ArticulationBodyPart()
{
arb = arb,
t = t,
startingArbPos = arb.transform.position,
startingArbRot = arb.transform.rotation,
startingPos = t.position,
startingRot = t.rotation
};

正在加载...
取消
保存