newton.actuators.parse_battery_prim#
- newton.actuators.parse_battery_prim(prim)[source]#
Parse a USD battery prim into a battery class and its parameters.
The prim type selects the battery class, e.g.
NewtonConstantResistanceBatteryselectsBatteryConstantResistance, and the authorednewton:attributes become its keyword arguments; the class fills in defaults when the battery is added. The actuators that draw from the battery name it in theirnewton:batteryrelationship;parse_actuator_prim()reports it asActuatorParsed.battery_path.- Parameters:
prim – USD prim to parse.
- Returns:
The parsed battery, or
Noneif the prim is not a battery.- Raises:
ValueError – The prim is derived from
NewtonBatterybut its type is not supported.- Return type:
BatteryParsed | None