我正在尝试ForceElement
按如下方式创建自定义
class FrontWheelForce(ForceElement):
def __init__(self, plant):
front_wheel = plant.GetBodyByName("front_wheel")
front_wheel_node_index = front_wheel.index()
pdb.set_trace()
ForceElement.__init__(self, front_wheel.model_instance())
但是得到以下错误就行了ForceElement.__init__(self, front_wheel.model_instance())
TypeError: FrontWheelForce: No constructor defined!