0

My code: https://deepnote.com/project/IIWA-ARM-WITH-COLLISONS-VmNCT6XuS7yKITvWjqLY1g/%2Fnotebook.ipynb (should be set to anyone with link can view)

Using Russ's "Set up a basic ManipulationStation diagram," I tried using a manipulation station to make an iiwa arm controller for the dense sphere collision iiwa urdf.

When I try to use

builder = DiagramBuilder()
station = builder.AddSystem(MakeManipulationStation())
plant = station.get_multibody_plant()

the code gives me an error that the diagram does not have the attribute. I am trying to use the MakeManipulationStation() just like the regular ManipulationStation is used in Russ's course notes. How should I go about getting the multibody plant from MakeManipulationStation()?

Carlos
  • 23
  • 2

1 Answers1

0

That is because your MakeManipulationStation() method returns an object of type Diagram. There is no API in Diagram that is specific to multibody plant (and there should not be any).

The error message you get is consistent:

AttributeError: 'Diagram_[float]' object has no attribute 'get_multibody_plant'

That is telling that there is no method called get_multibody_plant() in an object of type Diagram (or Diagram_[float] to be more specific).

You could use something like plant = station.GetSubsystemByName("plant")

Alejandro
  • 1,064
  • 1
  • 8
  • 22