dfki-ric-underactuated-lab / torque_limited_simple_pendulum

Torque Limited Simple Pendulum Underactuated System
BSD 3-Clause "New" or "Revised" License
52 stars 19 forks source link

not loading pydrake.symbolic #12

Closed ricopicone closed 2 years ago

ricopicone commented 2 years ago

https://github.com/dfki-ric-underactuated-lab/torque_limited_simple_pendulum/blob/222c610b6ce8e684f7141c1eeddbeb8f85f45b65/software/python/simple_pendulum/trajectory_optimization/ilqr/ilqr.py#L4

I have installed Drake, and I can import the main module with

python -c 'import pydrake; print(pydrake.__file__)'

However, when I run the benchmark_controller.py I get

ModuleNotFoundError: No module named 'pydrake.symbolic'

from the line referenced above. Was this usage deprecated or something?

If there's an easier way to run some simulation tests, please advise.

fwiebe commented 2 years ago

What operating system are you using and on what way did you install Drake?

For easier simulation tests: The energy shaping controller and lqr controller do have no special dependencies and can be tested with the "sim_energy_shaping.py" and "sim_lqr.py" scripts. I will add a README file on that level to explain the examples and their dependencies.

shivesh1210 commented 2 years ago

@ricopicone Do you have any feedback for us based on @fwiebe comment?

fwiebe commented 2 years ago

Hi @ricopicone,

All drake functions used in this repository should now be included in the pip version of drake. Both crocoddyl and drake are added now in the setup.py (see f0d24ba1f7fbcd02fdb77ecc78a4a6c110cf4919). Maybe that helps you?

The examples are now documented in a readme file here: https://github.com/dfki-ric-underactuated-lab/torque_limited_simple_pendulum/tree/master/software/python/examples

There it is also described what examples require what "special" libraries.

ricopicone commented 2 years ago

It seems to be working now. Thanks @fwiebe and @shivesh1210