In Mujoco USD interop, only consider dynamic friction when writing to and parsing from USD.
PiperOrigin-RevId: 783741987 Change-Id: I23c47a6e95c160c5c7d5c513e268c79e4236e2e4
This commit is contained in:
committed by
Copybara-Service
parent
b99d9e8f12
commit
6144a508b5
@@ -831,9 +831,8 @@ class ModelWriter {
|
||||
|
||||
mjsGeom *geom_default = mjs_getDefault(geom->element)->geom;
|
||||
if (geom->friction[0] != geom_default->friction[0]) {
|
||||
WriteUniformAttribute(material_path, pxr::SdfValueTypeNames->Float,
|
||||
pxr::UsdPhysicsTokens->physicsStaticFriction,
|
||||
(float)geom->friction[0]);
|
||||
// Since MuJoCo has no concept of static friction, only write dynamic
|
||||
// friction to remain truthful to how MuJoCo perceives the data.
|
||||
WriteUniformAttribute(material_path, pxr::SdfValueTypeNames->Float,
|
||||
pxr::UsdPhysicsTokens->physicsDynamicFriction,
|
||||
(float)geom->friction[0]);
|
||||
|
||||
Reference in New Issue
Block a user