Skip to content

Commit

Permalink
finished filling in README
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelJA committed Feb 25, 2020
1 parent 61b8cfa commit f765af9
Showing 1 changed file with 53 additions and 6 deletions.
59 changes: 53 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

This python package provides a bridge for communicating between Apollo's Cyber Python API and Carla. Besides the source code, a Dockerfile and scripts are provided for getting setup quickly and easily. This package was tested with Carla version 0.9.6, and Apollo v5.0.0.

This is a cyber port of the work done here: https://github.com/carla-simulator/ros-bridge
This is a cyber port of the work done here: [https://github.com/carla-simulator/ros-bridge](https://github.com/carla-simulator/ros-bridge)

## Installation

### Pre-requisites

For the simplest setup, we will run Carla in Docker. You can run Carla from source if you would like, but the setup is more involved: https://carla.readthedocs.io/en/latest/how_to_build_on_linux/
For the simplest setup, we will run Carla in Docker. You can run Carla from source if you would like, but the setup is more involved: [https://carla.readthedocs.io/en/latest/how_to_build_on_linux/](https://carla.readthedocs.io/en/latest/how_to_build_on_linux/)

#### docker

https://docs.docker.com/install/linux/docker-ce/ubuntu/
[https://docs.docker.com/install/linux/docker-ce/ubuntu/](https://docs.docker.com/install/linux/docker-ce/ubuntu/)

#### nvidia-docker

https://github.com/nvidia/nvidia-docker
[https://github.com/nvidia/nvidia-docker](https://github.com/nvidia/nvidia-docker)

## Setup / Getting Started

Expand All @@ -30,7 +30,7 @@ The following commands will be run with 3 containers:

### Clone and build Apollo

Our fork of Apollo has a few changes that make it work with this Carla bridge. You can see those changes here: https://github.com/ApolloAuto/apollo/compare/v5.0.0...AuroAi:carla
Our fork of Apollo has a few changes that make it work with this Carla bridge. You can see those changes here: [https://github.com/ApolloAuto/apollo/compare/v5.0.0...AuroAi:carla](https://github.com/ApolloAuto/apollo/compare/v5.0.0...AuroAi:carla)

```
# run on local machine:
Expand Down Expand Up @@ -126,6 +126,22 @@ cd ~/carla_cyber_bridge
python examples/manual_control.py
```

#### Interfacing with the simulation

For interfacing with the simulator, a copy of the Carla PythonAPI is included in the carla-cyber container. Some uses:

```
# run in another carla-cyber container terminal:
cd ~/carla_cyber_bridge/carla-python-0.9.6
# change the map
python util/config.py -m Town04 --host 172.17.0.1
# spawn traffic
python examples/spawn_npc.py -n 50 --host 172.17.0.1
```

### Run Apollo Dreamview & modules

Now, in the apollo container, run dreamview:
Expand All @@ -140,15 +156,46 @@ Then, in a web browser, go to: `localhost:8888`

#### View camera feed

Click the 'Tasks' button on the sidebar to open the Tasks Toolbar. Click the 'Camera Sensor' switch.
![camera](https://user-images.githubusercontent.com/3516571/75204973-5931d300-5727-11ea-828c-68ecb5ba2063.png)

#### View point cloud

Click the 'Layer Menu' button on the sidebar. Click the 'Point Cloud' switch under 'Perception'.
![pointcloud](https://user-images.githubusercontent.com/3516571/75205481-c003bc00-5728-11ea-8177-d75a46978470.png)

#### Routing

#### Perception & Prediction
Click the 'Module Controller' button on the sidebar. Click the 'Routing' switch to enable Routing.
![routing](https://user-images.githubusercontent.com/3516571/75205804-9303d900-5729-11ea-9d9c-fffc2d847a3b.png)

Click the 'Route Editing' button on the sidebar. Click on the map to place points. Place one point to route from the vehicle's current location. Place two points to route from the first point to the second. Then, click 'Send Routing Request'. If routing is successful, a red line appears showing the planned route.
![route_editing](https://user-images.githubusercontent.com/3516571/75205919-f7bf3380-5729-11ea-9c10-1ebc4f7fc3e8.png)

#### Perception

##### Ground truth obstacle sensor

The example scripts use a ground truth obstacle sensor instead of Apollo perception. This is enable by including object_sensor in [config/settings.yaml](config/settings.yaml).
![groundtruth](https://user-images.githubusercontent.com/3516571/75207429-8b463380-572d-11ea-8179-32603690531c.png)

##### Apollo perception module

To use Apollo perception, remove obstacle_sensor from [config/settings.yaml](config/settings.yaml) and enable the 'Transform' and 'Perception' modules.
![apollo_percpetion](https://user-images.githubusercontent.com/3516571/75207991-225fbb00-572f-11ea-856c-09f7c4e977a4.png)

#### Prediction

Once obstacles are being published, either from Apollo perception or the ground truth obstacle sensor, you can enable the 'Prediction' module.
![prediction](https://user-images.githubusercontent.com/3516571/75208064-59ce6780-572f-11ea-9362-92dc38145a8f.png)

#### Planning

Once a route has been planned, and prediction output is received you can enable the 'Planning' module. The bridge will automatically move the vehicle along the planned path unless output from the 'Control' module is received.
![planning](https://user-images.githubusercontent.com/3516571/75208171-ab76f200-572f-11ea-8a58-910659fb6f93.png)

#### Control
If the 'Control' module is enabled, the bridge will apply its output to the ego vehicle, but this feature has not been fully developed yet. So, the ego's movement may be erratic. The recommended way to use the bridge is to allow it to use the planner output for moving the vehicle.

## Known Issues

Expand Down

0 comments on commit f765af9

Please sign in to comment.