-
Run the following command in your terminal where the
environment.ymlfile is located:conda env create -f environment.yml
-
Then, activate your new environment:
conda activate Touch3D
-
Now that your environment is set up with Python 3.9, run the following command to install PyTorch, torchvision, torchaudio, and the appropriate CUDA toolkit. Below is for CUDA 12.1:
conda install pytorch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 pytorch-cuda=12.8 -c pytorch -c nvidia
-
If you didn’t include the pip requirements in the YAML file, you can install them now:
pip install -r requirements.txt
-
Create the folder 'Training/Logs' (the checkpoints and tf events will be saved here)
-
Run the following command in your terminal to train the network:
python PPO.py
Note: The network will train from scratch for 500k steps. You can change the parameters in
PPO.pyfile or give a pretrained model path inconf/RL.yaml
-
Create the folder 'Outputs' (3D poit cloud will be saved here)
-
Set configuration at
conf/test.yamlfor testing:-
RL:
- pretrain_model_path:
Training/Logs/PPO_Contact_AMB/your_latest_model.zip
- pretrain_model_path:
-
Environment:
- Object:
- object_name: Name of the test object
- urdf path of the object:
objects/ycb/object/model.urdf
- Object:
-
-
Run the following command in your terminal to test the model:
python test.py
The testing will begin and point cloud is generated after 5000 evaluation steps are over or the sensor goes out of bounds.
**Note:** If due to some reason the point cloud cannot be visualized after testing is finished; follow the steps below to visualize the generated point cloud.
-
Navigate to the
visualize_npy.pyfile -
Change the default path of the point cloud to the
.npyfile generated during testing, Example:outputs/DEMO_model_96.95.npy -
Execute the file:
python visualize_npy.py
NOTE:The live visualiztion is turned off by default to improve performance
- This is the live visualization of testing the CNN policy with PPO on unseen 3D object(strawberry and mustard can in this particular case). The test is conducted for a single episode of 5000 steps.
|
|
- The point cloud visualization of complex objects is shown below:
|
|
|
|
|
|







