wbap / PyLIS

PyLIS (Life in Silico with PyBullet)
Apache License 2.0
18 stars 7 forks source link

Can't find some of the meshes #3

Closed sycz00 closed 2 years ago

sycz00 commented 2 years ago

Hey,

I am currently trying to integrate the HSR into pybullet and saw your repo. I saw that you changed a few things in the hsrb4s.urdf in order to load it into pybullet. I wonder where you saved the mesh files such as l_finger.stl ? In my case, I am able to load the HSR into pybullet using the original mesh files from TRI and your urdf file without the last gripper parts.

thanks in advance for your help :)

susumuota commented 2 years ago

@sycz00 Hey, thank you for the report. I will check it.

rondelion commented 2 years ago

The hand is transplanted from PyBullet R2D2, so the mesh at https://github.com/bulletphysics/bullet3/tree/master/data is the one you look for?

susumuota commented 2 years ago

@sycz00

I wonder where you saved the mesh files such as l_finger.stl ?

l_finger.stl is on pybullet_data directory. PyBullet includes R2D2 model which uses l_finger.stl and you don't have to copy it manually if you install PyBullet by pip. In my env (Mac OS X 12.3.1, Python 3.10.3, PyBullet 3.2.4), it is on venv/lib/python3.10/site-packages/pybullet_data/l_finger.stl.

Could you follow this instruction bellow (replace 3.10 if needed)? I confirmed this works fine today. I could see HSR model with R2D2 gripper.

git clone https://github.com/wbap/PyLIS.git
cd PyLIS

python3 -m venv venv
source venv/bin/activate

pip install numpy

pip install gym

pip install pybullet

# You may need to install prerequisites.
# See https://github.com/DLR-RM/stable-baselines3#installation for more details.
pip install stable-baselines3

git clone https://github.com/ToyotaResearchInstitute/hsr_meshes.git
cp -rp hsr_meshes venv/lib/python3.10/site-packages/pybullet_data

cp -p gym-foodhunting/urdf/hsrb4s.urdf venv/lib/python3.10/site-packages/pybullet_data
# If you want to use original URDF file by TRI,
# git clone https://github.com/ToyotaResearchInstitute/hsr_description.git
# cp -p hsr_description/robots/hsrb4s.urdf venv/lib/python3.10/site-packages/pybullet_data
cp -p gym-foodhunting/urdf/r2d2.urdf venv/lib/python3.10/site-packages/pybullet_data
cp -p gym-foodhunting/urdf/food_sphere.urdf venv/lib/python3.10/site-packages/pybullet_data
cp -p gym-foodhunting/urdf/food_cube.urdf venv/lib/python3.10/site-packages/pybullet_data

cd gym-foodhunting
pip install -e .
cd ..

python gym-foodhunting/examples/example_joint.py