Reputation: 153
In PyDrake I get AttributeError from this line: body_pose_output_port = plant.get_body_poses_output_port()
Error message:
AttributeError: 'MultibodyPlant_[float]' object has no attribute 'get_body_poses_output_port'
Here is how I set up the plant:
plt_is_interactive = SetupMatplotlibBackend()
builder = DiagramBuilder()
plant, scene_graph = AddMultibodyPlantSceneGraph(builder, time_step=0.0001)
file_name = FindResource("models/robot.urdf")
robot_model = Parser(plant).AddModelFromFile(file_name)
file_name = FindResource("models/object.urdf")
object_model = Parser(plant).AddModelFromFile(file_name)
plant.Finalize()
plant.set_name('robot')
What I don't understand is that getting state output in essentially the same way doesn't raise any errors, i.e.state_output_port = plant.get_state_output_port(robot_model) behaves as expected and returns the correct port.
What's the difference in calling get_body_poses_output_port() vs. get_state_output_port() that I'm missing here?
Upvotes: 1
Views: 266
Reputation: 2449
The C++ method MultibodyPlant::get_body_poses_output_port() is not bound in pydrake.
Upvotes: 1