zt-yang / diffusion-ccsp

Code for Compositional Diffusion-Based Continuous Constraint Solvers (CoRL 23)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'pybullet_engine'

YZhang001 opened this issue · comments

Hello. I was following the setting-up steps to see how Diffusion-CCSP works. But I got an error at the following step:

  • Compile IK for Franka Panda if want to collect and test robot planning.
    (cd pybullet_engine/ikfast/franka_panda; python setup.py)

This is the log shown in terminal:

(diffusion-ccsp) user@user-ThinkPad-P16-Gen-1:~/test_ws/diffusion-ccsp/pybullet_engine/ikfast/franka_panda$ python setup.py
Traceback (most recent call last):
File "/home/user/test_ws/diffusion-ccsp/pybullet_engine/ikfast/franka_panda/setup.py", line 13, in
from pybullet_engine.ikfast.compile import compile_ikfast
ModuleNotFoundError: No module named 'pybullet_engine'

If I run python pybullet_engine/ikfast/franka_panda/setup.py directly from the /diffusion-ccsp directory, it will give the following error:

pybullet build time: Oct 14 2023 15:48:24
Traceback (most recent call last):
File "/home/yanni/test_ws/diffusion-ccsp/pybullet_engine/ikfast/franka_panda/setup.py", line 13, in
from pybullet_engine.ikfast.compile import compile_ikfast
File "/home/yanni/test_ws/diffusion-ccsp/pybullet_engine/init.py", line 16, in
from .client import *
File "/home/yanni/test_ws/diffusion-ccsp/pybullet_engine/client.py", line 23, in
import jacinle
ModuleNotFoundError: No module named 'jacinle'

So I added a line export PYTHONPATH=./Jacinle:$PYTHONPATH in the setup.sh file and sourced it, then it's like:

pybullet build time: Oct 14 2023 15:48:24
gcc: error: ikfast_panda_arm.cpp: No such file or directory
gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1

I think I already did everything mentioned in the previous steps. I cloned the Jacinle repo into /diffusion-ccsp. Did I miss anything or is the code still in development?
Thank you.

On your last solution. change the setup.py code to:
def main():
robot_name = 'panda_arm'
compile_ikfast(
module_name='ikfast_{}'.format(robot_name),
cpp_filename='./pybullet_engine/ikfast/franka_panda/ikfast_{}.cpp'.format(robot_name),
remove_build=True
)
Then it works:
ikfast module ikfast_panda_arm imported successful