Skip to content

micheltokic/crawlingrobot

Repository files navigation

gym-crawlingrobot

Crawling Robot 2D Simulation with physics behavior.

PyGame window

Used librarys with Python 3.8

  • Pygame for GUI
  • Pymunk for Physics

Installation

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 .

possible errors during experiments

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

Example for usage

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.

Example of a reward model from the real crawling robot

Videos: https://www.tokic.com/the-crawling-robot/ Hardware robot reward model

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published