Crawling Robot 2D Simulation with physics behavior.
- Pygame for GUI
- Pymunk for Physics
git clone git@github.com:micheltokic/crawlingrobot.git
cd crawlingrobot
# create virtual env, e.g. with Python 3.8.10
pyenv local 3.8.10
python -m venv .venv
.venv/bin/activate # Linux
.venv\scripts\activate # Windows
# install setuptools
pip install setuptools
# install package + dependencies
pip install -e .
If your Python kernel dies during the experiment and you receive the following error just update your NVIDIA driver to the latest version: 2022-05-26 00:28:32.360589: F tensorflow/stream_executor/lib/statusor.cc:34] Attempting to fetch value instead of handling error Internal: failed to get device attribute 13 for device 0: CUDA_ERROR_UNKNOWN: unknown error [I 00:28:38.402 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
import gymnasium as gym
import gym_crawlingrobot
# crawlingrobot discrete environment for Reinforcement Learning algorithm e.g. Q-Learning
env = gym.make('crawlingrobot-discrete-v1', rotation_angles=5, goal_distance=2500, window_size=(1500, 800))
env.reset()
...
# crawlingrobot continuous environment for Reinforcement Learning algorithm e.g. PPO2
env = gym.make('crawlingrobot-continuous-v1', goal_distance=2500, window_size=(1500, 800), render_intermediate_steps=False)
For Quick Start you can find a Python-notebook under the folder example
.