Skip to content

Instantly share code, notes, and snippets.

View WuXinyang2012's full-sized avatar
🎯
Focusing

Wu Xinyang WuXinyang2012

🎯
Focusing
  • Stuttgart, Germany.
View GitHub Profile
@WuXinyang2012
WuXinyang2012 / records.md
Last active January 18, 2019 10:04
Records of drl-for-safety projects.

Records of drl-for-safety projects.

1, Background Kownledge.

1.1 Learn the basic DRL concepts and popular algorithms.
1.2 Focus more on DDPG+HER algorithm.

2, Compare mujoco-py and dm_control.

Result: Choose mujoco-py as our framework.

Reason:

1.) mujoco-py has more active community: the number of open issues ~120, while dm_control ~10.

@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')
###Mac OS ignore
.DS_Store
### PyCharm ###
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
@WuXinyang2012
WuXinyang2012 / cartpole_swingup.py
Last active July 13, 2023 12:42
A CartPole-SwingUp env as in PILCO, with {cos(theta), sin(theta)} as observation, instead of theta.
"""
Cart pole swing-up: Identical version to PILCO V0.9
"""
import logging
import math
import gym
from gym import spaces
from gym.utils import seeding
import numpy as np