Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AddModelFromFile -> AddModels #13

Open
yunho-c opened this issue Sep 8, 2024 · 0 comments
Open

Update AddModelFromFile -> AddModels #13

yunho-c opened this issue Sep 8, 2024 · 0 comments

Comments

@yunho-c
Copy link

yunho-c commented Sep 8, 2024

Hi Vince, thank you for sharing this great project!

Running examples.simulation_demo results in errors saying AddModelFromFile is undefined.

Traceback (most recent call last):
  ...
  File ".../kinova_drake/kinova_station/simulation_station.py", line 243, in SetupSinglePegScenario
    self.AddArmWithHandeGripper(arm_damping=arm_damping)
  File ".../kinova_drake/kinova_station/simulation_station.py", line 400, in AddArmWithHandeGripper
    self.AddArm(include_damping=arm_damping)
  File ".../kinova_drake/kinova_station/simulation_station.py", line 294, in AddArm
    self.arm = Parser(plant=self.plant).AddModelFromFile(arm_urdf, "arm")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'pydrake.multibody.parsing.Parser' object has no attribute 'AddModelFromFile'. Did you mean: 'AddModelsFromUrl'?

I believe this is because of changes in pydrake's API regarding the URDF/SDF file import.

I found a simple workaround and will submit a PR, but I am not sure if it addresses the problem completely/properly (since it is not possible to assign names like "arm" and "gripper" with AddModels method).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant