This code should be simple enough. But I can't get it right. And, I don't find answer from previous similar questions. Is it a pydrake issue or just I don't use it in the right way?
TypeError: set_value(): incompatible function arguments. The following argument types are supported:
1. (self: pydrake.common.value.Value[QueryObject_[float]], arg0: pydrake.geometry.QueryObject_[float]) -> None
Invoked with: <pydrake.common.value.Value[QueryObject_[float]] object at 0x1298c2c30>, (0, 0)
from pydrake.all import *
from underactuated import ManipulatorDynamics
x= [1,2,3,4]
u= [1,1]
plant = MultibodyPlant(time_step=0)
parser = Parser(plant)
parser.AddModelFromFile(FindResource("models/double_pendulum.urdf"))
plant.Finalize()
context = plant.CreateDefaultContext()
context.SetContinuousState(x)
plant.get_actuation_input_port(0).FixValue(context,u)