meraccos/f1tenth_reinforcement_learning

Unable to run train.py, 'F110Env' object has no attribute 'map_data'

wongm3079 opened this issue · 3 comments

Unable to run train.py
After cloning the repository. and running python3 train.py. An error shows when creating an environment. The F110Env object does not show to have a map_data attribute.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the Github repository
  2. navigate to the work directory
  3. run the command python3 train.py
  4. Observe Issue

Expected Behavior
Successfully create the environment, train the model, and save the model

Actual Behavior
Screenshot from 2024-01-02 17-04-29

Desktop:

  • OS: Linux Ubuntu 20.04 LTS
  • Python Version: 3.8.10
  • GPU: NVIDIA 3070 Ti
  • NVIDIA Cuda Compiler Version: 10.1, V10.1.243

Additional context

  1. Changing the device from cuda to cpu in train.py has no effect in changing the result
  2. Added a line on Line 64 that saves the model: model.save("save path")

Closing issue as is related to virtual environment setup. Issue is not reproduced when running outside a virtual environment.

Re-opening Issue due to PPO class not recognizing the action space.
Attached screenshot for more information
image

I believe this issue is related to the newer versions of stable baselines3, which uses gymnasium instead of gym. Try installing stablebaselines3 < v2.0 and run again.