Skip to content

Instantly share code, notes, and snippets.

View rohanpsingh's full-sized avatar
🤖

Rohan P. Singh rohanpsingh

🤖
View GitHub Profile
@WuXinyang2012
WuXinyang2012 / collision.py
Created November 16, 2018 13:05
A script for detecting the collision and calculating the contact forces in mujoco environments.
#!/usr/bin/env python
import os
import mujoco_py
import numpy as np
PATH_TO_HUMANOID_XML = os.path.expanduser('~/.mujoco/mjpro150/model/humanoid.xml')
#PATH_TO_HUMANOID_XML = os.path.expanduser('/home/rfa-xw/anaconda3/envs/mujoco-py/lib/python3.6/site-packages/gym/envs/robotics/assets/fetch/reach.xml')