MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / _setto_for

Function _setto_for

Scripts/codegen/tests/test_setto_introspection.py:27–38  ·  view source on GitHub ↗

Helper: invoke _emit_setto_call with the rules-real args for one actuator subtype.

(subtype_key, real_rules, real_schema, mjspec)

Source from the content-addressed store, hash-verified

25
26
27def _setto_for(subtype_key, real_rules, real_schema, mjspec):
28 """Helper: invoke _emit_setto_call with the rules-real args for one actuator subtype."""
29 actuator = real_rules["categories"]["actuator"]
30 setto_rules = actuator["subtype_setto"].get(subtype_key)
31 if setto_rules is None:
32 return ""
33 per_type_attrs = real_schema["actuator_types"].get(subtype_key, [])
34 base_attrs = real_schema.get("actuator_common", {}).get("attrs", [])
35 return _emit_setto_call(
36 subtype_key, setto_rules, real_rules, mjspec,
37 subtype_schema_attrs=per_type_attrs, base_schema_attrs=base_attrs,
38 )
39
40
41def test_motor_call_minimal(real_rules, real_schema):

Calls 1

_emit_setto_callFunction · 0.90

Tested by

no test coverage detected