none
none

Reputation: 555

Pydrake error with PortDataType in MakeFiniteHorizonLinearQuadraticRegulator

I'm getting the following error and am not sure how to resolve it: Failure at systems/controllers/finite_horizon_linear_quadratic_regulator.cc:53 in RiccatiSystem(): condition 'input_port_->get_data_type() == PortDataType::kVectorValued' failed.

After creating my plant from AddMultibodyPlantSceneGraph and loading in a urdf, I tried passing plant.DeclareInputPort a parameter to plant.DeclareInputPort but still got the same error. How can I properly change the data type of the input port?

Upvotes: 0

Views: 72

Answers (1)

Russ Tedrake
Russ Tedrake

Reputation: 5533

FiniteHorizonLinearQuadraticRegulatorOptions takes an optional input_port_index, which should probably be set to plant.get_actuation_input_port() if you are using it with MultiBodyPlant.

Upvotes: 1

Related Questions