caelan / pybullet-planning

PyBullet Planning
https://pypi.org/project/pybullet-planning/
MIT License
407 stars 114 forks source link

Help to build the examples #2

Closed michaelchi08 closed 5 years ago

michaelchi08 commented 5 years ago

Hello,

I'm trying to run these examples on my ubuntu 18.x VM. I managed to install pybullet and numpy.But when i run the test, i get this

Traceback (most recent call last): File "", line 1, in ImportError: No module named ss

Thanks for your help. When i try to run to run the kuka test, i also get some errors

pybullet build time: Mar 5 2019 09:25:16 Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/thermo/Documents/dev/ss-pybullet/examples/test_kuka_pick.py", line 5, in from pybullet_tools.kuka_primitives import BodyPose, BodyConf, Command, get_grasp_gen, \ File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/kuka_primitives.py", line 4, in from .pr2_utils import get_top_grasps File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/pr2_utils.py", line 11, in from .utils import multiply, get_link_pose, joint_from_name, set_joint_position, joints_from_names, \ File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/utils.py", line 20, in from motion_planners.rrt_connect import birrt, direct_path ModuleNotFoundError: No module named 'motion_planners'

Thanks for your help, Michael

caelan commented 5 years ago

Hi Michael,

Run the following commands to update a submodule that ss-pybullet depends on. I've updated the installation instructions to include these directions.

$ cd ss-pybullet $ git submodule update --init --recursive

Caelan

michaelchi08 commented 5 years ago

Hello Caelan,

I'm able to run the example now but getting this. I ran the PR2 example and it ran fine. Do you know what might be going on? Thanks

/Documents/dev/ss-pybullet$ python3 -m examples.test_kuka_pick pybullet build time: Mar 5 2019 09:25:16 ven = VMware, Inc. b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:

b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:

b3Printf: base_link Body id: 0 | Name: simple_cuboid | Rigid: True | Fixed: True Link id: -1 | Name: base_link | Mass: 0.0 | Collision: 9 | Visual: -1

Body id: 1 | Name: flat_terrain | Rigid: True | Fixed: True Link id: -1 | Name: base_link | Mass: 0.0 | Collision: 1 | Visual: -1

Body id: 2 | Name: simple_cuboid | Rigid: True | Fixed: False Link id: -1 | Name: base_link | Mass: 0.1 | Collision: 9 | Visual: -1

Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/thermo/Documents/dev/ss-pybullet/examples/test_kuka_pick.py", line 76, in main() File "/home/thermo/Documents/dev/ss-pybullet/examples/test_kuka_pick.py", line 53, in main command = plan(robot, block, fixed=[floor], teleport=False) File "/home/thermo/Documents/dev/ss-pybullet/examples/test_kuka_pick.py", line 13, in plan grasp_gen = get_grasp_gen(robot, 'top') File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/kuka_primitives.py", line 180, in get_grasp_gen end_effector_link = link_from_name(robot, TOOL_FRAMES[robot_name]) File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/utils.py", line 1221, in link_from_name raise ValueError(body, name) ValueError: (0, 'iiwa_link_ee_kuka') numActiveThreads = 0 stopping threads Thread with taskId 0 exiting Thread TERMINATED destroy semaphore semaphore destroyed destroy main semaphore main semaphore destroyed finished numActiveThreads = 0 btShutDownExampleBrowser stopping threads Thread with taskId 0 exiting Thread TERMINATED destroy semaphore semaphore destroyed destroy main semaphore main semaphore destroyed

On Tue, Mar 5, 2019 at 10:02 AM Caelan Garrett notifications@github.com wrote:

Closed #2 https://github.com/caelan/ss-pybullet/issues/2.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/caelan/ss-pybullet/issues/2#event-2181233173, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU7Y3IDefnaKomWKyX5u52x6HGsnyzuks5vTocUgaJpZM4beytF .

caelan commented 5 years ago

I fixed an issue with the kuka's URDF path. It should work again now.

michaelchi08 commented 5 years ago

still getting this after the update.

python3 -m examples.test_kuka_pick pybullet build time: Mar 5 2019 09:25:16 ven = VMware, Inc. b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:

b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:

b3Printf: base_link Body id: 0 | Name: simple_cuboid | Rigid: True | Fixed: True Link id: -1 | Name: base_link | Mass: 0.0 | Collision: 9 | Visual: -1

Body id: 1 | Name: flat_terrain | Rigid: True | Fixed: True Link id: -1 | Name: base_link | Mass: 0.0 | Collision: 1 | Visual: -1

Body id: 2 | Name: simple_cuboid | Rigid: True | Fixed: False Link id: -1 | Name: base_link | Mass: 0.1 | Collision: 9 | Visual: -1

Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/thermo/Documents/dev/ss-pybullet/examples/test_kuka_pick.py", line 76, in main() File "/home/thermo/Documents/dev/ss-pybullet/examples/test_kuka_pick.py", line 53, in main command = plan(robot, block, fixed=[floor], teleport=False) File "/home/thermo/Documents/dev/ss-pybullet/examples/test_kuka_pick.py", line 13, in plan grasp_gen = get_grasp_gen(robot, 'top') File "/home/thermo/Documents/dev/ss-pybullet/pybullet_tools/kuka_primitives.py", line 182, in get_grasp_gen end_effector_link = link_from_name(robot, TOOL_FRAMES[get_body_name(robot)]) KeyError: 'simple_cuboid' numActiveThreads = 0 stopping threads Thread with taskId 0 exiting Thread TERMINATED destroy semaphore semaphore destroyed destroy main semaphore main semaphore destroyed finished numActiveThreads = 0 btShutDownExampleBrowser stopping threads Thread with taskId 0 exiting Thread TERMINATED destroy semaphore semaphore destroyed destroy main semaphore main semaphore destroyed

On Tue, Mar 5, 2019 at 12:57 PM Caelan Garrett notifications@github.com wrote:

I fixed an issue with the kuka's URDF path. It should work again now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/caelan/ss-pybullet/issues/2#issuecomment-469785043, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU7YzL9hx5xbpgIqoqRZMcorDwxeVudks5vTrABgaJpZM4beytF .

caelan commented 5 years ago

Hmm, what's in master is currently working for me. Can you check that that following URDF paths are correct?

https://github.com/caelan/ss-pybullet/blob/1d5f0b76422ca140a84c6098eb6497b73e21f9cd/pybullet_tools/utils.py#L40