Metadata-Version: 2.1
Name: onsite
Version: 0.1.2
Summary: A tool package for Onsite
Home-page: https://github.com/HuajunZhou-TJ/onsite
Author: Zhou Huajun
Author-email: 1931314@tongji.edu.cn
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: shapely
Requires-Dist: pandas
Requires-Dist: matplotlib

# Project description
Onsite is a tool package for Onsite.
# Update
- Version 0.1.1

    Bug fixing.

- Version 0.1.0

    Add feature: Automatically output test results into output dir.


# Installation
To get started, you'll need to have Python 3.6+ installed. Simply install **onsite**  using **pip**:

`pip install onsite`

And you’re good to go!

# Usage
The usage of this library refered to the well-known reinforcement learning library OpenAI Gym.

A simple example:

```python
# make env from scenario (OpenScenario XML)
env,observation = onsite.env.make(scenario,output_dir)
while True:
    # planning based on observation
    action = planner.act(observation)
    # obtain new observations from env
    observation,reward,done,info = env.step(action)
    # stop simulation if done
    if done:
        break
```
This is just an implementation of the classic “agent-environment loop”. Each timestep, the agent chooses an action, and the environment returns an observation and a reward.

