The expert data with the steering angle is used to train a model that extracts a steering angle from the images.
No good results have been achieved yet.
The images with the labels on which the path is marked were used to train a variational autoencoder whose encoder then serves as image preprocessing for the RL agents. Good results with latentspace size = 8.
Here, image data is captured using the RoboSkate Environoment defined in the Gym repository.
The images in the folder where the images are stored must match the image counter in the code otherwise images will be overwritten.
The terminal command below runs the training for the VAE.
python -m vae_files.train --n-epochs: number of epochs --verbose: whether to report the training progress --z-size: The size of latent variables --learning-rate --kl-tolerance --beta: Weight for kl loss -f path-to-record/folder/
The terminal command for running enjoy_latent. This code allows you to generate images using the learned latent variables.
python -m vae_files.enjoy_latent -vae logs/level-0/vae-8.pkl
Here the remote control for the agent is defined! PyGame was used for this purpose. Here are also agents that play the level 1 completely automatically. For this, an optimal trajectoire is defined.
This script is used to test the hardcoded agents. It starts an environment and then connects the selected agent to the environment.
This script is no longer up to date!
Behavioral cloning.
It was used to learn a policy from the expert data. This works very well.
This script is no longer up to date!
Expert data is collected both the movement with (observations and actions) as well as the images with optimal steering angle.
RoboSkateExpertData/directionError
.\RoboSkate_collect_expert_data.py
to get trajectory and images with ground truth direction data.Env_images_and_direction_error
hardcoded_agent_Test.py
with environment Env_direction_error_from_CNN_images.py
to use test the hardcoded movemet with image data.RoboSkate_BC.py
with environment Env_joints_and_direction_error.py
without learning to test MlpPolicy.RoboSkate_BC.py
with environment Env_direction_error_from_CNN_images.py
without learning to test MlpPolicy and CNN Policy.