mjcPhysics MjcTendon path now has an indices attribute to allow repeated sites in tendon path.

Since relationships in USD can only contain a single instance of a path, it was previously impossible to have a tendon path that visits the same wrap target more than once. This is a fairly common occurence when dealing with tendons that have pulleys.

With this change, if mjc:path:indices is not defined then the behaviour is as it was and the mjc:path is considered to be ordered. If it is authored then the parser will use the indices into mjc:path as the order. This mirrors other similar concepts in USD such as face vertex indices.

PiperOrigin-RevId: 856339887
Change-Id: I6b9503973de377acdb0689be168c16e4aa19b70b
This commit is contained in:
Sam Haves
2026-01-14 13:23:41 -08:00
committed by Copybara-Service
parent 42c565d860
commit d816b38f4c
7 changed files with 69 additions and 12 deletions
@@ -572,6 +572,10 @@ struct MjcPhysicsTokensType {
///
/// MjcPhysicsTendon
const TfToken mjcPathDivisors;
/// \brief "mjc:path:indices"
///
/// MjcPhysicsTendon
const TfToken mjcPathIndices;
/// \brief "mjc:path:segments"
///
/// MjcPhysicsTendon