class_docstr: A TensorForce Environment for the [CARLA driving simulator](https://github.com/carla-simulator/carla).
   - This environment is "synchronized" with the server, meaning that the server waits for a client tick. For a
     detailed explanation of this, please refer to https://carla.readthedocs.io/en/latest/adv_synchrony_timestep/.
   - Subclass to customize the behaviour of states, actions, sensors, reward function, agent, training loop, etc.
  
  Requires, you to:
   - Install `pygame`, `opencv`
   - Install the CARLA simulator (version >= 0.9.8): https://carla.readthedocs.io/en/latest/start_quickstart
   - Install CARLA's Python bindings:
   --> Follow this [guide](https://carla.readthedocs.io/en/latest/build_system/#pythonapi), if you have trouble
       with that then follow the above steps.
   --> `cd your-path-to/CARLA_0.9.x/PythonAPI/carla/dist/`
   --> Extract `carla-0.9.x-py3.5-YOUR_OS-x86_64.egg` where `YOUR_OS` depends on your OS, i.e. `linux` or `windows`
   --> Create a `setup.py` file within the extracted folder and write the following:
     ```python
     from distutils.core import setup
  
     setup(name='carla',
           version='0.9.x',
           py_modules=['carla'])
     ```
   --> Install via pip: `pip install -e ~/CARLA_0.9.x/PythonAPI/carla/dist/carla-0.9.x-py3.5-YOUR_OS-x86_64`
   - Run the CARLA simulator from command line: `your-path-to/CARLA_0.9.x/./CarlaUE4.sh` or (CarlaUE4.exe)
   --> To use less resources add these flags: `-windowed -ResX=8 -ResY=8 --quality-level=Low`
  
   Hardware requirements (recommended):
   - GPU: dedicated, with at least 2/4 GB.
   - RAM: 16 GB suggested.
   - CPU: multicore, at least 4.
   - Note: on my hardware (i7 4700HQ 4C/8T, GT 750M 4GB, 16GB RAM) I achieve about 20 FPS in low quality mode.
  
   Example usage:
   - See [tensorforce/examples](https://github.com/tensorforce/tensorforce/tree/master/examples)
  
   Known Issues:
   - TensorForce's Runner is currently not compatible with this environment!
  
   Author:
   - Luca Anzalone (@luca96)
class_docstr_tok: ["A","TensorForce","Environment","for","the","[","CARLA","driving","simulator","]","(","https",":","\/\/github.com\/carla-simulator\/carla",")",".","-","This","environment","is","``","synchronized","''","with","the","server",",","meaning","that","the","server","waits","for","a","client","tick",".","For","a","detailed","explanation","of","this",",","please","refer","to","https",":","\/\/carla.readthedocs.io\/en\/latest\/adv_synchrony_timestep\/",".","-","Subclass","to","customize","the","behaviour","of","states",",","actions",",","sensors",",","reward","function",",","agent",",","training","loop",",","etc",".","Requires",",","you","to",":","-","Install","`","pygame","`",",","`","opencv","`","-","Install","the","CARLA","simulator","(","version",">","=","0.9.8",")",":","https",":","\/\/carla.readthedocs.io\/en\/latest\/start_quickstart","-","Install","CARLA","'s","Python","bindings",":","--",">","Follow","this","[","guide","]","(","https",":","\/\/carla.readthedocs.io\/en\/latest\/build_system\/","#","pythonapi",")",",","if","you","have","trouble","with","that","then","follow","the","above","steps",".","--",">","`","cd","your-path-to\/CARLA_0.9.x\/PythonAPI\/carla\/dist\/","`","--",">","Extract","`","carla-0.9.x-py3.5-YOUR_OS-x86_64.egg","`","where","`","YOUR_OS","`","depends","on","your","OS",",","i.e",".","`","linux","`","or","`","windows","`","--",">","Create","a","`","setup.py","`","file","within","the","extracted","folder","and","write","the","following",":","``","`","python","from","distutils.core","import","setup","setup","(","name='carla","'",",","version=","'","0.9.x","'",",","py_modules=","[","'carla","'","]",")","``","`","--",">","Install","via","pip",":","`","pip","install","-e","~\/CARLA_0.9.x\/PythonAPI\/carla\/dist\/carla-0.9.x-py3.5-YOUR_OS-x86_64","`","-","Run","the","CARLA","simulator","from","command","line",":","`","your-path-to\/CARLA_0.9.x\/.\/CarlaUE4.sh","`","or","(","CarlaUE4.exe",")","--",">","To","use","less","resources","add","these","flags",":","`","-windowed","-ResX=8","-ResY=8","--","quality-level=Low","`","Hardware","requirements","(","recommended",")",":","-","GPU",":","dedicated",",","with","at","least","2\/4","GB",".","-","RAM",":","16","GB","suggested",".","-","CPU",":","multicore",",","at","least","4",".","-","Note",":","on","my","hardware","(","i7","4700HQ","4C\/8T",",","GT","750M","4GB",",","16GB","RAM",")","I","achieve","about","20","FPS","in","low","quality","mode",".","Example","usage",":","-","See","[","tensorforce\/examples","]","(","https",":","\/\/github.com\/tensorforce\/tensorforce\/tree\/master\/examples",")","Known","Issues",":","-","TensorForce","'s","Runner","is","currently","not","compatible","with","this","environment","!","Author",":","-","Luca","Anzalone","(","@","luca96",")"]
code: def _get_vehicle_features(self):
      t = self.vehicle.get_transform()
      control = self.vehicle.get_control()
  
      imu_sensor = self.sensors["imu"]
      gyroscope = imu_sensor.gyroscope
      accelerometer = imu_sensor.accelerometer
  
      return [
          env_utils.speed(self.vehicle),
          control.gear,
          control.steer,
          control.throttle,
          control.brake,
          # Accelerometer:
          accelerometer[0],
          accelerometer[1],
          accelerometer[2],
          # Gyroscope:
          gyroscope[0],
          gyroscope[1],
          gyroscope[2],
          # Location
          t.location.x,
          t.location.y,
          # Compass:
          math.radians(imu_sensor.compass),
      ]
  
imports: import math
  import numpy
  from datetime import datetime
  from tensorforce.environments import Environment
label_desc: Use image node_id 24 for calling the CARLAEnvironment obj's underlying member method code with example usage: obj._get_vehicle_features() and returns: list