Skip to content

Commit

Permalink
Fixed some minor errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TGW795 committed Oct 10, 2023
1 parent 4eaf1b2 commit eb25101
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 35 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ See also [LICENSE](./LICENSE)

日本語/English OK

e-mail : [email protected]
twitter : [mackierx111](https://twitter.com/mackierx111)
e-mail : [email protected]
discord : mackie#6141

(c) 2022 TIER IV, inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The random traffic system consists of the following components:
These components represent traffic entities.
They are used to control and manage the traffic with respect to traffic rules and current road situation.

- [`NPCVehicle`](../../NPCs/Vehicle/)
- [`NPCVehicle`](../../../Traffic/NPCs/Vehicle/)

The vehicle models (*NPCs*) spawned by one of the `TrafficSimulators`.
They are spawned according to the `TrafficSimulator` configuration and either drive around the map randomly (when spawned by a [`RandomTrafficSimulator`](#random-traffic)) or follow the predefined path (when spawned by a [`RouteTrafficSimulator`](#route-traffic)).
Expand Down Expand Up @@ -96,7 +96,7 @@ The `RandomTrafficSimulator` consists of several *GameObjects*.
### TrafficManager (script)
![random_traffic_script](random_traffic_script.png)

*Traffic Manager* (script) is responsible for all of top level management of the [`NPCVehicles`](../../NPCs/Vehicle/).
*Traffic Manager* (script) is responsible for all of top level management of the [`NPCVehicles`](../../../Traffic/NPCs/Vehicle/).
It managed spawning of `NPCVehicles` on `TrafficLanes`.

`TrafficManager` uses the concept of `TrafficSimulators`.
Expand All @@ -106,7 +106,7 @@ The vehicles spawned by one `TrafficSimulator` do respect its configuration.
`TrafficSimulators` can be interpreted as `NPCVehicle` spawners with different configurations each.
Many different `TrafficSimulators` can be added to the `TrafficManager`.

If a random mode is selected ([`RandomTrafficSimulator`](#random-traffic)) then [`NPCVehicles`](../../NPCs/Vehicle/) will spawn in random places (from the selected list) and drive in random directions.
If a random mode is selected ([`RandomTrafficSimulator`](#random-traffic)) then [`NPCVehicles`](../../../Traffic/NPCs/Vehicle/) will spawn in random places (from the selected list) and drive in random directions.
To be able to reproduce the behavior of the `RandomTrafficSimulator` a [`Seed`](https://en.wikipedia.org/wiki/Random_seed) can be specified - which is used for the pseudo-random numbers generation.

`TrafficManager` script also configures all of the spawned `NPCVehicles`, so that they all have common parameters
Expand Down Expand Up @@ -204,7 +204,7 @@ Every bulb has the following aspects configured
- `Bulb Type` - the name that will be usd to reference the configured bulb
- `Material Index` - The index of a material of the configured bulb.
This is an index of a sub-mesh of the configured bulb in the Traffic Light mesh.
The material indices are described in detail [here](../Environment/#materials) and [here](../Environment/#materials_1).
The material indices are described in detail [here](../#materials) and [here](../#materials_1).

## TrafficIntersections
![intersection](intersections/intersection.png)
Expand Down Expand Up @@ -357,7 +357,7 @@ E.g. when `Traffic Lights` in one direction change color to green - `Traffic Lig
`TrafficLane` is a representation of a short road segment.
It consists of several waypoints that are connected by straight lines.
`TrafficLanes` are used as a base for a [RandomTrafficSimulator](#random-traffic-simulator).
They allow [`NPCVehicles`](../../NPCs/Vehicle/) to drive on the specific lanes on the road and perform different maneuvers with respect to the traffic rules.
They allow [`NPCVehicles`](../../../Traffic/NPCs/Vehicle/) to drive on the specific lanes on the road and perform different maneuvers with respect to the traffic rules.
TrafficLanes create a network of drivable roads when connected.

### Link in the default Scene
Expand Down Expand Up @@ -403,7 +403,7 @@ Additionally the `Speed Limit` field contains the highest allowed speed on given
`Right Of Way Lanes` is a collection of `TrafficLanes`.
Vehicle moving on the given `TrafficLane` has to give way to all vehicles moving on every `Right Of Way Lane`.
It is determined based on basic traffic rules.
Setting `Right Of Way Lanes` allows [`RandomTrafficSimulator`](#random-traffic-simulator) to manage all [`NPCVehicles`](../../NPCs/Vehicle/) so they follow traffic rules and drive safely.
Setting `Right Of Way Lanes` allows `RandomTrafficSimulator` to manage all [`NPCVehicles`](../../../Traffic/NPCs/Vehicle/) so they follow traffic rules and drive safely.

In the *Unity* editor - when a `TrafficLane` is selected - aside from the selected `TrafficLane` highlighted in blue, all `Right Of Way Lanes` are highlighted in yellow.

Expand All @@ -418,7 +418,7 @@ In the *Unity* editor - when a `TrafficLane` is selected - aside from the select
![stop](stop_lines/stop.png)

`StopLine` is a representation of a place on the road where vehicles giving way to other vehicles should stop and wait.
They allow [`RandomTrafficSimulator`](#random-traffic-simulator) to manage [`NPCVehicles`](../../NPCs/Vehicle/) in safe and correct way - according to the traffic rules.
They allow [`RandomTrafficSimulator`](#random-traffic-simulator) to manage [`NPCVehicles`](../../../Traffic/NPCs/Vehicle/) in safe and correct way - according to the traffic rules.
All possible locations where a vehicle can stop in order to give way to other vehicles - that are enforced by an infrastructure, this does not include regular lane changing - need to be marked with `StopLines`.

### Link in the default Scene
Expand Down Expand Up @@ -449,13 +449,13 @@ The list of points should always have two elements that create a straight `StopL

The `Has Stop Sign` field contains information whether the configured `StopLine` has a corresponding `StopSign` on the scene.

Every Stop Line needs to have a `Traffic Light` field configured with the corresponding [`Traffic Light`](../Environment/#trafficlights).
This information allows the [`RandomTrafficSimulator`](#random-traffic-simulator) to manage the [`NPCVehicles`](../../NPCs/Vehicle/) in such a way that they respect the Traffic Lights and behave on the [`Traffic Intersections`](#trafficintersections) correctly.
Every Stop Line needs to have a `Traffic Light` field configured with the corresponding [`Traffic Light`](../#trafficlights).
This information allows the [`RandomTrafficSimulator`](#random-traffic-simulator) to manage the [`NPCVehicles`](../../../Traffic/NPCs/Vehicle/) in such a way that they respect the Traffic Lights and behave on the [`Traffic Intersections`](#trafficintersections) correctly.

## Gizmos
![gizmos](gizmos.png)

*Gizmos* are a in-simulation visualization showing current and future moves of the [`NPCVehicles`](../../NPCs/Vehicle/).
*Gizmos* are a in-simulation visualization showing current and future moves of the [`NPCVehicles`](../../../Traffic/NPCs/Vehicle/).
They are useful for checking current behavior of NPCs and its causes.
On the Scene they are visible as cuboid contours indicating which TrafficLanes will be taken by each vehicle in the near future.

Expand Down
12 changes: 6 additions & 6 deletions docs/Components/Environment/AWSIMEnvironment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Moreover, it contains elements responsible for controlling random traffic.
![environment](environment.png)

!!! tip "Own Environment prefab"
If you would like to develop your own prefab `Environment` for *AWSIM*, we encourage you to read this [tutorial](../../../../../Components/Environment/AddNewEnvironment/AddEnvironment/).
If you would like to develop your own prefab `Environment` for *AWSIM*, we encourage you to read this [tutorial](../../Environment/AddNewEnvironment/AddEnvironment/).

!!! note "AutowareSimulation scene"
If you would like to see how `Environment` with random traffic works or run some tests, we encourage you to familiarize yourself with the `AutowareSimulation` scene described in this [section](../../../ProjectGuide/Scenes/#autowaresimulation).
Expand All @@ -18,12 +18,12 @@ The point cloud is created using the [`RGL`](https://github.com/RobotecAI/Robote
We encourage you to familiarize yourself with an example scene of creating a point cloud - described [here](../../../ProjectGuide/Scenes/#pointcloudmapping).

!!! tip "Create PointCloud (*.pcd file)"
If you would like to learn how to create a point cloud in *AWSIM* using `Environment` prefab, we encourage you to read this [tutorial](../../../../../Components/Environment/CreatePCD/).
If you would like to learn how to create a point cloud in *AWSIM* using `Environment` prefab, we encourage you to read this [tutorial](../../Environment/CreatePCD/).

### Architecture
The architecture of an `Environment` - with dependencies between components - is presented on the following diagram.

![environment diagram](../../../../../Introduction/AWSIM//environment.png)
![environment diagram](../../../Introduction/AWSIM/environment.png)

### Prefabs

Expand All @@ -49,8 +49,8 @@ Prefabs can be found under the following path:
As you can see it contains:

- `SJK*` objects - which are aggregators for visual models.
- `RandomTrafficSimulator`, `TrafficIntersections`, `TrafficLanes`, `StopLines` - which are responsible for random traffic of [`NPCVehicles`](../../../../../Components/Traffic/NPCs/Vehicle/).
- `NPCPedestrians` - which is an aggregator of [`NPCPedestrian`](../../../../../Components/Traffic/NPCs/Pedestrian/) prefabs added to the scene.
- `RandomTrafficSimulator`, `TrafficIntersections`, `TrafficLanes`, `StopLines` - which are responsible for random traffic of [`NPCVehicles`](../../Traffic/NPCs/Vehicle/).
- `NPCPedestrians` - which is an aggregator of [`NPCPedestrian`](../../Traffic/NPCs/Pedestrian/) prefabs added to the scene.
- `Volume`, `Directional Light` - which are components that affect the appearance of objects on the scene.

All of these objects are described below in this section.
Expand Down Expand Up @@ -93,7 +93,7 @@ In the project physics settings, it is ensured that collisions between objects i
![layers_physis](layers_physis.png)

## Traffic Components
Due to the specificity of the use of `RandomTrafficSimulator`, `TrafficIntersections`, `TrafficLanes`, `StopLines` objects, they have been described in a separate section [*Traffic Components*](../../../../../Components/Traffic/TrafficComponents/) - where all the elements necessary in simulated random traffic are presented.
Due to the specificity of the use of `RandomTrafficSimulator`, `TrafficIntersections`, `TrafficLanes`, `StopLines` objects, they have been described in a separate section [*Traffic Components*](../../Traffic/TrafficComponents/) - where all the elements necessary in simulated random traffic are presented.

## Visual Elements (SJK)
The visuals elements have been loaded and organized using the `*.fbx` files which can be found under the path:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ This means that Traffic Lights in the *Vehicle Traffic Light Group 2* will hold
This state will be active for 5 seconds, which means that Traffic Lights in the *Vehicle Traffic Light Group 2* will be lighting solid green for the total of 20 seconds.

## How to test
To test how your Traffic Intersection behaves simply run the Scene as shown [here](../../../../../UserGuide/BuildFromSource/RunTheScene/) (but don't launch *Autoware*).
To test how your Traffic Intersection behaves simply run the Scene as shown [here](../../../../../GettingStarted/SetupUnityProject/#run-the-demo-in-editor) (but don't launch *Autoware*).
To take a better look at the Traffic Lights you can change to the *Scene* view by pressing `ctrl + 1` - now you can move the camera freely (to go back to the *Game* view simply press `ctrl + 2`).

As the time passes you can examine whether your Traffic Intersection is configured correctly.
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ The `Traffic Light` Script will enable you to control how the `TrafficLight` lig
![traffic light bulb config](traffic_light_bulb_config.gif)

!!! success
Once you have added `TrafficLights` to your `Environment`, you can start configuring `RandomTraffic` which will add moving vehicles to it! Details [here](../../../../../Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/).
Once you have added `TrafficLights` to your `Environment`, you can start configuring `RandomTraffic` which will add moving vehicles to it! Details [here](../AddRandomTraffic/AddRandomTraffic/).
10 changes: 5 additions & 5 deletions docs/Components/Environment/CreatePCD/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To properly perform the mapping, make sure you have the following files download

!!! question "How to obtain a map"
You can obtain the 3D model of the area by using a `Environment` *prefab* prepared for *AWSIM* or by creating your own.
You can learn how to create you own `Environment` *prefab* in [this tutorial](../../../Components/Environment/AddNewEnvironment/AddEnvironment/).
You can learn how to create you own `Environment` *prefab* in [this tutorial](../../Environment/AddNewEnvironment/AddEnvironment/).

- Configured in-simulation vehicle object with sensors attached (only the [*LiDAR*](../../../Components/Sensors/LiDARSensor/AddNewLiDAR/) is necessary)

Expand All @@ -61,7 +61,7 @@ To properly perform the mapping, make sure you have the following files download
## Setup an Environment
For mapping an `Environment` prefab is needed.
The easiest way is to create a new *Scene* and import the `Environment` *prefab* into it.
Details on how to do this can be found on [this tutorial page](../../../../Components/Environment/AddNewEnvironment/AddEnvironment/).
Details on how to do this can be found on [this tutorial page](../../Environment/AddNewEnvironment/AddEnvironment/).

## Setup a Vehicle
Create a `Vehicle` *GameObject* in the *Hierarchy* view.
Expand All @@ -74,7 +74,7 @@ Add vehicle model by adding a `Geometry` *Object* as a child of `Vehicle` and ad
![vehicle add geometry](vehicle_geometry_add_object.gif)

!!! info "Visual elements"
You can learn how to add visual elements and required components like *Mesh Filter* or *Mesh Renderer* in [this tutorial](../../../../Components/Vehicle/AddNewVehicle/AddVisualElements/).
You can learn how to add visual elements and required components like *Mesh Filter* or *Mesh Renderer* in [this tutorial](../../Vehicle/AddNewVehicle/AddVisualElements/).

### Add a Camera (optional)
Add a Camera component for enhanced visuals by adding a `Main Camera` *Object* as a child of `Vehicle` Object and attaching a `Camera` Component to it.
Expand All @@ -99,7 +99,7 @@ This part of the tutorial shows how to add a *LiDAR* sensor using [RGL](https://

!!! warning "RGL Scene Manager"
Please make sure that `RGLSceneManager` is added to the scene.
For more details and instruction how to do it please visit [this tutorial page](../../../../Components/Sensors/LiDARSensor/RGLUnityPlugin/#scenemanager).
For more details and instruction how to do it please visit [this tutorial page](../../Sensors/LiDARSensor/RGLUnityPlugin/#scenemanager).

1. Create an empty `Sensors` *GameObject* as a child of the `Vehicle` *Object*.

Expand Down Expand Up @@ -162,7 +162,7 @@ A `Leaf Size` of 10.0 results in a reasonable PCD in the given example.
- `World Origin` - MGRS position of the origin of the scene

!!! note "World Origin coordinate system"
Use [*ROS* coordinate system](../../../../Components/Vehicle/AddNewVehicle/AddSensors/#coordinate-system-conversion) for *World Origin*, not Unity.
Use [*ROS* coordinate system](../../Vehicle/AddNewVehicle/AddSensors/#coordinate-system-conversion) for *World Origin*, not Unity.

- `Capture Location Interval` - Distance between consecutive capture points along lanelet centerline
- `Output Pcd File Path` - Output relative path from `Assets` folder
Expand Down
4 changes: 2 additions & 2 deletions docs/Components/ROS2/AddACustomROS2Message/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
If you want to use custom message in *AWSIM*, you need to generate the appropriate files, to do this you have to build `ROS2ForUnity` yourself - please follow the steps below. Remember to start with [prerequisities](#prerequisites) though.

!!! tip "ROS2ForUnity role"
For a better understanding of the role of `ROS2ForUnity` and the messages used, we encourage you to read this [section](../../../Components/ROS2/ROS2ForUnity/).
For a better understanding of the role of `ROS2ForUnity` and the messages used, we encourage you to read this [section](../ROS2ForUnity/).
!!! warning "custom_msgs"
In order to simplify this tutorial, the name of the package containing the custom message is assumed to be `custom_msgs` - remember to replace it with the name of your package.
## Prerequisites
Expand Down Expand Up @@ -212,4 +212,4 @@ You can find them in following directories and simply copy to the analogous dire
## 5. Test
Make sure that the package files `custom_msgs` have been properly copied to the `AWSIM/Assets/Ros2ForUnity`.
Then try to create a message object as described in [this section](../../../../Components/ROS2/ROS2ForUnity/) and check in the console of *Unity Editor* if it compiles without errors.
Then try to create a message object as described in [this section](../ROS2ForUnity/) and check in the console of *Unity Editor* if it compiles without errors.
2 changes: 1 addition & 1 deletion docs/Components/ROS2/ROS2ForUnity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ The basic *ROS2* msgs types that are supported in *AWSIM* by default include:
In order for the message package to be used in *Unity*, its `*.dll` and `*.so` libraries must be generated using `R2FU`.

!!! tip "Custom message"
If you want to generate a custom message to allow it to be used in *AWSIM* please read [this tutorial](../../../../Components/ROS2/AddACustomROS2Message/).
If you want to generate a custom message to allow it to be used in *AWSIM* please read [this tutorial](../AddACustomROS2Message/).

## Use of generated messages in *Unity*
Each message type is composed of other types - which can also be a complex type.
Expand Down
Loading

0 comments on commit eb25101

Please sign in to comment.