- Download MuJoCo
mkdir .mujoco
cd .mujoco
wget https://github.com/deepmind/mujoco/releases/download/2.1.0/mujoco210-linux-x86_64.tar.gz
tar xvzf mujoco210-linux-x86_64.tar.gz
rm -rf mujoco210-linux-x86_64.tar.gz
- Install Dependencies
sudo apt install libosmesa6-dev libgl1-mesa-glx libglfw3
- Add the following to the
.bashrc
file:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/.mujoco/mujoco210/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so
- Install the environment
git clone [email protected]:tudorjnu/cathsim.git
cd cathsim
pip install -e .
import cathsim_env
import gym
env = gym.make('cathsim_env/CathSim-v0',
scene=1, # 1 or 2 for Type-I Aortic Arch and Type-II Aortic Arch
target="bca", # "bca" or "lcca"
obs_type="internal", # image or internal
image_size=128,
delta=0.008, # the distance threshold between catheter head and target
success_reward=10.0, # the reward for reaching the target
compute_force=False, # whether to compute the force
dense_reward=True, # whether to use a dense reward or a sparse reward,
)
obs = env.reset()
for _ in range(2000):
action = env.action_space.sample()
obs, reward, done, info = env.step(action)
env.render()
@article{jianu2022cathsim,
title={CathSim: An Open-source Simulator for Autonomous Cannulation},
author={Jianu, Tudor and Huang, Baoru and Abdelaziz, Mohamed EMK and Vu, Minh Nhat and Fichera, Sebastiano and Lee, Chun-Yi and Berthet-Rayne, Pierre and Nguyen, Anh and others},
journal={arXiv preprint arXiv:2208.01455},
year={2022}
}