diff --git a/.gitignore b/.gitignore index 740fcdf4f..765ba3bfc 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ **/**.mp4 /documentation/jupyter_execute/ /documentation/**/**.gif +/documentation/source/img.png +/documentation/source/demo.png diff --git a/documentation/README.md b/documentation/README.md index 87bedad75..38e4332fa 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -79,4 +79,8 @@ And you need to skip all cells you don't want to run with cell tags: ```python {"tags": ["skip-execution"]} -``` \ No newline at end of file +``` + +### Preprocess-Add colab link +Everytime the `make html` is called, all `ipynb` file will have corresponding colab link in it by modifying the source +code. So you will find that your source code is modified in git. Please commit that changes as well. diff --git a/documentation/source/action.ipynb b/documentation/source/action.ipynb index ca1374549..5383d2e28 100644 --- a/documentation/source/action.ipynb +++ b/documentation/source/action.ipynb @@ -6,6 +6,9 @@ "metadata": {}, "source": [ "# Action and Policy\n", + "\n", + "[![Click and Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/metadriverse/metadrive/blob/main/documentation/source/action.ipynb)\n", + "\n", "This section will discuss how to control the vehicle in MetaDrive with the *Policy* interface. Before this, let's have a look at the raw control signal required by vehicles.\n", "\n", "## Action\n", @@ -786,7 +789,7 @@ "metadata": {}, "source": [ "### ReplayPolicy\n", - "Usually, we use [ScenarioNet](https://metadriverse.github.io/scenarionet/) to convert scenarios collected by Waymo, nuScenes, nuPlan, and Argoverse to internal [Scenario Description](description.ipynb) and rebuild the scenarios in MetaDrive. Thus this policy is used to load and replay the recorded traffic trajectories for these real-world scenarios. There are two replay policies for replaying the trajectories of ego car and traffic participants, respectively:\n", + "Usually, we use [ScenarioNet](https://metadriverse.github.io/scenarionet/) to convert scenarios collected by Waymo, nuScenes, nuPlan, and Argoverse to internal [Scenario Description](scenario_description.ipynb) and rebuild the scenarios in MetaDrive. Thus this policy is used to load and replay the recorded traffic trajectories for these real-world scenarios. There are two replay policies for replaying the trajectories of ego car and traffic participants, respectively:\n", "* **ReplayEgoCarPolicy**\n", "* **ReplayTrafficParticipantPolicy**\n", "\n", diff --git a/documentation/source/before_reading.ipynb b/documentation/source/before_reading.ipynb index 9a1c44d75..c4750627a 100644 --- a/documentation/source/before_reading.ipynb +++ b/documentation/source/before_reading.ipynb @@ -6,6 +6,9 @@ "metadata": {}, "source": [ "# Before reading the Doc\n", + "\n", + "[![Click and Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/metadriverse/metadrive/blob/main/documentation/source/before_reading.ipynb)\n", + "\n", "Most of the document is made with `jupyter notebook`. Therefore, you can clone the [repo](https://github.com/metadriverse/metadrive) and run the demo code listed in `metadrive/documentation/source/*.ipynb` on your local machine. These examples are supposed to work with the latest main branch. Note: videos can not be played in notebook as it doesn't support `