Skip to content

Commit

Permalink
Updated Dockerfile to install the latest dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
ICGog committed Mar 31, 2021
1 parent 342c32e commit 7ed37c3
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 41 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
## Latest

## Pylot 0.3.2
* Fixed bug in parsing CARLA version strings.
* Fixed EfficientDet detection operator so that it correctly extracts bounding boxes.
* Added indicator stream to logging operators so that they can be used for synchronizing.
* Added CenterTrack obstacle tracker.
* Fixed LaneNet imports.
* Lock pygame to a working version.
* Added code to handle top watermarks in watermark callbacks.
* Added new tracker evaluation operator, and base eval class.
* Added support for CARLA 0.9.11.
* Added option to enable evaluation operators to the challenge agent.

## Pylot 0.3.1
* Improved perfect lane detector to collect all lanes.
* Added support for latest CARLA lidar type (CARLA >= 0.9.9.4).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ pip install -e ./

Next, start the simulator:
```console
export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.8/
export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.10.1/
./scripts/run_simulator.sh
```

In a different terminal, setup the paths:
```console
export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.8/
export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.10.1/
cd $PYLOT_HOME/scripts/
source ./set_pythonpath.sh
```
Expand Down
4 changes: 2 additions & 2 deletions doc/source/manual_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Next, start the simulator:

.. code-block:: bash
export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.8/
export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.10.1/
./scripts/run_simulator.sh
In a different terminal, setup the paths:

.. code-block:: bash
export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.8/
export CARLA_HOME=$PYLOT_HOME/dependencies/CARLA_0.9.10.1/
cd $PYLOT_HOME/scripts/
source ./set_pythonpath.sh
Expand Down
20 changes: 10 additions & 10 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,35 @@ RUN sudo DEBIAN_FRONTEND=noninteractive sudo DEBIAN_FRONTEND=noninteractive apt-
RUN sudo apt-get -y update
RUN sudo apt-get -y install git curl clang python3 python3-pip
RUN python3 -m pip install --upgrade pip
RUN pip3 install setuptools setuptools-rust
RUN python3 -m pip install setuptools setuptools-rust numpy==1.19.5
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/home/erdos/.cargo/bin:${PATH}"
RUN rustup default nightly
RUN mkdir -p /home/erdos/workspace
RUN cd /home/erdos/workspace && git clone https://github.com/erdos-project/erdos.git && cd erdos && python3 python/setup.py install --user

# Set up Pylot.
RUN sudo apt-get install -y python3-pip libcudnn7 cuda-toolkit-10-0 ssh libqt5core5a libeigen3-dev cmake qtbase5-dev libpng16-16 libtiff5
RUN sudo apt-get install -y libcudnn7 cuda-toolkit-10-0 ssh libqt5core5a libeigen3-dev cmake qtbase5-dev libpng16-16 libtiff5 python3-tk
# Get the Pylot directory.
RUN cd /home/erdos/workspace && git clone https://github.com/erdos-project/pylot.git
WORKDIR /home/erdos/workspace/pylot/
ENV PYLOT_HOME /home/erdos/workspace/pylot/
# Install all the Python dependencies.
RUN cd /home/erdos/workspace/pylot/ && pip3 install -e ./
RUN cd /home/erdos/workspace/pylot/ && python3 -m pip install -e ./
# Get the Pylot models and code dependencies.
RUN cd /home/erdos/workspace/pylot/ && ./install.sh
ENV CARLA_HOME /home/erdos/workspace/pylot/dependencies/CARLA_0.9.11
ENV CARLA_HOME /home/erdos/workspace/pylot/dependencies/CARLA_0.9.10.1
# Clone scenario_runner.
RUN cd /home/erdos/workspace && git clone https://github.com/erdos-project/scenario_runner.git
RUN cd /home/erdos/workspace && git clone https://github.com/erdos-project/scenario_runner.git
# Install scenario_runner's dependencies.
RUN pip3 install py-trees==0.8.3 networkx==2.2 Shapely==1.6.4 psutil xmlschema==1.0.18 ephem tabulate
RUN python3 -m pip install py-trees==0.8.3 networkx==2.2 Shapely==1.6.4 psutil==5.7.0 xmlschema==1.0.18 ephem==3.7.6.0 tabulate==0.8.7 six==1.14.0
# Clone leaderboard.
RUN git clone https://github.com/erdos-project/leaderboard.git
RUN pip3 install dictor requests
RUN cd /home/erdos/workspace && git clone https://github.com/erdos-project/leaderboard.git
RUN python3 -m pip install dictor requests

RUN echo "export PYTHONPATH=/home/erdos/workspace/pylot/dependencies/:/home/erdos/workspace/pylot/dependencies/CARLA_0.9.11/PythonAPI/carla/dist/carla-0.9.11-py3.7-linux-x86_64.egg:/home/erdos/workspace/pylot/dependencies/CARLA_0.9.11/PythonAPI/carla/:/home/erdos/workspace/pylot/dependencies/CARLA_0.9.11/PythonAPI/carla/agents/:/home/erdos/workspace/pylot/dependencies/CARLA_0.9.11/PythonAPI/:/home/erdos/workspace/scenario_runner" >> ~/.bashrc
RUN echo "export PYTHONPATH=/home/erdos/workspace/pylot/dependencies/:/home/erdos/workspace/pylot/dependencies/CARLA_0.9.10.1/PythonAPI/carla/dist/carla-0.9.10-py3.7-linux-x86_64.egg:/home/erdos/workspace/pylot/dependencies/CARLA_0.9.10.1/PythonAPI/carla/:/home/erdos/workspace/pylot/dependencies/CARLA_0.9.10.1/PythonAPI/carla/agents/:/home/erdos/workspace/pylot/dependencies/CARLA_0.9.10.1/PythonAPI/:/home/erdos/workspace/scenario_runner" >> ~/.bashrc
RUN echo "export PYLOT_HOME=/home/erdos/workspace/pylot/" >> ~/.bashrc
RUN echo "export CARLA_HOME=/home/erdos/workspace/pylot/dependencies/CARLA_0.9.11" >> ~/.bashrc
RUN echo "export CARLA_HOME=/home/erdos/workspace/pylot/dependencies/CARLA_0.9.10.1" >> ~/.bashrc
RUN echo "if [ -f ~/.bashrc ]; then . ~/.bashrc ; fi" >> ~/.bash_profile

# Set up ssh access to the container.
Expand Down
16 changes: 8 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ fi

sudo apt-get -y update
sudo apt-get install -y git wget cmake python3-pip unzip clang libpng-dev libgeos-dev
pip3 install gdown --user
# Install opencv separately because pip3 install doesn't install all libraries
# opencv requires.
sudo apt-get install -y python3-opencv
python3 -m pip install --user gdown

###############################################################################
# Get models & code bases we depend on
Expand Down Expand Up @@ -159,12 +159,12 @@ git clone https://github.com/mileyan/AnyNet.git
cd AnyNet/models/spn_t1/ ; python3 setup.py clean ; python3 setup.py build

###### Download the Carla simulator ######
echo "[x] Downloading the CARLA 0.9.11 simulator..."
echo "[x] Downloading the CARLA 0.9.10.1 simulator..."
cd $PYLOT_HOME/dependencies/
if [ "$1" != 'challenge' ] && [ ! -d "CARLA_0.9.11" ]; then
mkdir CARLA_0.9.11
cd CARLA_0.9.11
wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.11.tar.gz
tar -xvf CARLA_0.9.11.tar.gz
rm CARLA_0.9.11.tar.gz
if [ "$1" != 'challenge' ] && [ ! -d "CARLA_0.9.10.1" ]; then
mkdir CARLA_0.9.10.1
cd CARLA_0.9.10.1
wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.10.1.tar.gz
tar -xvf CARLA_0.9.10.1.tar.gz
rm CARLA_0.9.10.1.tar.gz
fi
1 change: 1 addition & 0 deletions pylot/planning/frenet_optimal_trajectory/fot_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(self, world, flags, logger):
super().__init__(world, flags, logger)
self.s0 = 0.0
self._hyperparameters = {
"num_threads": 1,
"max_speed": flags.max_speed,
"max_accel": flags.max_accel,
"max_curvature": flags.max_curvature,
Expand Down
12 changes: 3 additions & 9 deletions pylot/simulation/carla_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,17 +302,11 @@ def run(self):
# they register a listener. Thus, we sleep here a bit to
# give them sufficient time to register a callback.
time.sleep(4)
registered_callback = False
if pylot.simulation.utils.check_simulator_version(
self._simulator_version, required_minor=9, required_patch=11):
self._world.on_tick(self.send_actor_data)
registered_callback = True
self._tick_simulator()
time.sleep(4)
if not registered_callback:
# The older CARLA versions require an additional tick to sync
# sensors.
self._world.on_tick(self.send_actor_data)
# The older CARLA versions require an additional tick to sync
# sensors.
self._world.on_tick(self.send_actor_data)
self._tick_simulator()

def _initialize_world(self):
Expand Down
9 changes: 7 additions & 2 deletions pylot/simulation/challenge/ERDOSAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,13 @@ def run_step(self, input_data, timestamp):
e2e_runtime = (time.time() - start_time) * 1000
self.csv_logger.info('{},{},e2e_runtime,{:.4f}'.format(
pylot.utils.time_epoch_ms(), game_time, e2e_runtime))
# return command, int(e2e_runtime)
return command
if FLAGS.simulator_mode == 'synchronous':
return command
elif FLAGS.simulator_mode == 'pseudo-asynchronous':
return command, int(e2e_runtime)
else:
raise ValueError('Unexpected simulator_mode {}'.format(
FLAGS.simulator_mode))

def send_localization(self, timestamp, imu_data, gnss_data, speed_data):
if FLAGS.localization:
Expand Down
5 changes: 3 additions & 2 deletions pylot/simulation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ def check_simulator_version(simulator_version: str,
"""Checks if the simulator meets the minimum version requirements."""
ver_strs = simulator_version.split('.')
if len(ver_strs) < 2 or len(ver_strs) > 3:
raise ValueError(
'CARLA version {} is not supported'.format(simulator_version))
print('ERROR: CARLA version {} is not supported; assuming this is '
'version 0.9.10'.format(simulator_version))
ver_strs = '0.9.10'.split('.')
major = int(ver_strs[0])
minor = int(ver_strs[1])
if major != required_major:
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
absl-py
cvxpy
erdos>=0.3.1
gdown
lapsolver
motmetrics
numpy<1.17
numpy<1.20
open3d-python==0.5.0.0
opencv-python>=4.1.0.25
opencv-contrib-python>=4.1.0.25
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="erdos-pylot",
version="0.3.1",
version="0.3.2",
author="Pylot Team",
description=("A platform for developing autonomous vehicles."),
long_description=open("README.md").read(),
Expand All @@ -14,10 +14,9 @@
"absl-py",
"cvxpy",
"erdos>=0.3.1",
"gdown",
"lapsolver",
"motmetrics",
"numpy<1.17", # Update to newer numpy version once we switch to tf2
"numpy<1.20", # Update to newer numpy version once we switch to tf2
"open3d-python==0.5.0.0",
"opencv-python>=4.1.0.25",
"opencv-contrib-python>=4.1.0.25",
Expand All @@ -37,7 +36,7 @@
"imgaug==0.2.8",
"matplotlib==2.2.4",
"nonechucks==0.3.1",
"nuscenes-devkit"
"nuscenes-devkit",
"progress",
"pyquaternion",
"scikit-learn==0.22.2",
Expand Down

0 comments on commit 7ed37c3

Please sign in to comment.