Add user sensor bindings.
Stop force-setting nusersensor, instead allow MuJoCo to infer the size. PiperOrigin-RevId: 494783883 Change-Id: Ia2a1b1803b2904f2dded7b790d01eb6f1920dbaf
This commit is contained in:
committed by
Copybara-Service
parent
7a248a8bde
commit
21f10ce1b6
@@ -401,12 +401,17 @@ public class MjScene : MonoBehaviour {
|
||||
MjRoot.AppendChild(GenerateMjcfSection(
|
||||
doc, components.Where(component => component is MjBaseConstraint), "equality"));
|
||||
|
||||
MjRoot.AppendChild(GenerateMjcfSection(
|
||||
doc, components.Where(component => component is MjActuator), "actuator"));
|
||||
|
||||
MjRoot.AppendChild(GenerateMjcfSection(
|
||||
doc, components.Where(component => component is MjBaseSensor), "sensor"));
|
||||
MjRoot.AppendChild(
|
||||
GenerateMjcfSection(doc,
|
||||
components.Where(component => component is MjActuator)
|
||||
.OrderBy(component => component.transform.GetSiblingIndex()),
|
||||
"actuator"));
|
||||
|
||||
MjRoot.AppendChild(
|
||||
GenerateMjcfSection(doc,
|
||||
components.Where(component => component is MjBaseSensor)
|
||||
.OrderBy(component => component.transform.GetSiblingIndex()),
|
||||
"sensor"));
|
||||
// Generate the Mjcf of the runtime dependencies added to the context.
|
||||
_generationContext.GenerateMjcf(MjRoot);
|
||||
return doc;
|
||||
|
||||
Reference in New Issue
Block a user