-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into openpcdet-dan
- Loading branch information
Showing
81 changed files
with
2,065 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ code_server_config/*/start_code_server.sh | |
.env | ||
.vscode/ | ||
ssh_config/ | ||
|
||
watod-config.local.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
docker/perception/traffic_sign_detection/traffic_sign_detection.Dockerfile
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
docker/simulation/carla_notebooks/carla_notebooks.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
ARG CARLA_VERSION=0.9.13 | ||
FROM carlasim/carla:${CARLA_VERSION} AS wato_carla_api | ||
|
||
FROM python:3.8.16-slim-bullseye | ||
ARG CARLA_VERSION=0.9.13 | ||
|
||
RUN pip3 install carla==${CARLA_VERSION} jupyter tensorflow-probability | ||
RUN apt-get update && apt-get install -y curl git wget unzip && apt remove python3-networkx | ||
|
||
COPY --from=wato_carla_api --chown=root /home/carla/PythonAPI/carla/agents /usr/local/lib/python3.8/site-packages/agents | ||
|
||
WORKDIR /home/bolty/carla_notebooks | ||
COPY src/simulation/carla_notebooks /home/bolty/carla_notebooks | ||
|
||
WORKDIR /home/bolty | ||
# Setup CARLA Scenario Runner | ||
# The last sed command replaces hero (default ego vehicle name) with another ego vehicle name | ||
RUN git clone https://github.com/carla-simulator/scenario_runner.git && \ | ||
cd scenario_runner && pip3 install -r requirements.txt && \ | ||
sed -i s/hero/ego/g /home/bolty/scenario_runner/srunner/tools/scenario_parser.py | ||
WORKDIR /home/bolty | ||
|
||
WORKDIR /home/bolty/carla_notebooks |
109 changes: 109 additions & 0 deletions
109
docker/simulation/carla_ros_bridge/carla_ros_bridge.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
ARG BASE_IMAGE=ghcr.io/watonomous/wato_monorepo/base:foxy-ubuntu20.04 | ||
|
||
ARG CARLA_VERSION=0.9.13 | ||
FROM carlasim/carla:${CARLA_VERSION} AS wato_carla_api | ||
|
||
################################ Source ################################ | ||
FROM ${BASE_IMAGE} as source | ||
|
||
WORKDIR ${AMENT_WS}/src | ||
|
||
# Download ROS Bridge | ||
RUN git clone --depth 1 --branch master --recurse-submodules https://github.com/carla-simulator/ros-bridge.git && \ | ||
cd ros-bridge && \ | ||
git checkout e9063d97ff5a724f76adbb1b852dc71da1dcfeec && \ | ||
cd .. | ||
|
||
# Fix an error in the ackermann_control node | ||
RUN sed -i s/simple_pid.PID/simple_pid.pid/g ./ros-bridge/carla_ackermann_control/src/carla_ackermann_control/carla_ackermann_control_node.py | ||
|
||
# Copy in source code | ||
COPY src/simulation/carla_config carla_config | ||
COPY src/wato_msgs/simulation ros_msgs | ||
|
||
# Scan for rosdeps | ||
RUN apt-get -qq update && rosdep update --rosdistro foxy && \ | ||
rosdep install --from-paths . -r -s \ | ||
| grep 'apt-get install' \ | ||
| awk '{print $3}' \ | ||
| sort > /tmp/colcon_install_list | ||
|
||
################################# Dependencies ################################ | ||
FROM ${BASE_IMAGE} as dependencies | ||
|
||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-fast install -qq -y --no-install-recommends lsb-release \ | ||
libglu1-mesa-dev xorg-dev \ | ||
software-properties-common \ | ||
build-essential \ | ||
python3-rosdep \ | ||
python3-rospkg \ | ||
python3-colcon-common-extensions \ | ||
python3-pygame \ | ||
ros-$ROS_DISTRO-tf2-geometry-msgs \ | ||
ros-$ROS_DISTRO-tf2-eigen \ | ||
ros-$ROS_DISTRO-ackermann-msgs \ | ||
ros-$ROS_DISTRO-derived-object-msgs \ | ||
ros-$ROS_DISTRO-cv-bridge \ | ||
ros-$ROS_DISTRO-vision-opencv \ | ||
ros-$ROS_DISTRO-rqt-image-view \ | ||
ros-$ROS_DISTRO-rqt-gui-py \ | ||
qt5-default \ | ||
ros-$ROS_DISTRO-pcl-conversions \ | ||
ros-$ROS_DISTRO-resource-retriever \ | ||
ros-$ROS_DISTRO-yaml-cpp-vendor \ | ||
ros-$ROS_DISTRO-urdf \ | ||
ros-$ROS_DISTRO-map-msgs \ | ||
ros-$ROS_DISTRO-laser-geometry \ | ||
ros-$ROS_DISTRO-interactive-markers \ | ||
ros-$ROS_DISTRO-rviz2 | ||
|
||
# Install Rosdep requirements | ||
COPY --from=source /tmp/colcon_install_list /tmp/colcon_install_list | ||
RUN apt-fast install -qq -y --no-install-recommends $(cat /tmp/colcon_install_list) | ||
|
||
# Copy in source code from source stage | ||
WORKDIR ${AMENT_WS} | ||
COPY --from=source ${AMENT_WS}/src src | ||
|
||
# Dependency Cleanup | ||
WORKDIR / | ||
RUN apt-get -qq autoremove -y && apt-get -qq autoclean && apt-get -qq clean && \ | ||
rm -rf /root/* /root/.ros /tmp/* /var/lib/apt/lists/* /usr/share/doc/* | ||
|
||
################################ Build ################################ | ||
FROM dependencies as build | ||
|
||
ARG CARLA_VERSION | ||
|
||
#Install Python Carla API | ||
COPY --from=wato_carla_api --chown=root /home/carla/PythonAPI/carla /opt/carla/PythonAPI | ||
WORKDIR /opt/carla/PythonAPI | ||
RUN python3.8 -m easy_install pip && \ | ||
pip3 install carla==${CARLA_VERSION} && \ | ||
pip install simple-pid==2.0.0 && \ | ||
pip install transforms3d==0.4.1 && \ | ||
pip install pexpect==4.9.0 && \ | ||
pip install networkx==3.1 | ||
|
||
WORKDIR ${AMENT_WS}/src | ||
|
||
# Build ROS2 packages | ||
WORKDIR ${AMENT_WS} | ||
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ | ||
colcon build \ | ||
--cmake-args -DCMAKE_BUILD_TYPE=Release | ||
|
||
# Entrypoint will run before any CMD on launch. Sources ~/opt/<ROS_DISTRO>/setup.bash and ~/ament_ws/install/setup.bash | ||
COPY docker/wato_ros_entrypoint.sh ${AMENT_WS}/wato_ros_entrypoint.sh | ||
ENTRYPOINT ["./wato_ros_entrypoint.sh"] | ||
|
||
################################ Prod ################################ | ||
FROM build as deploy | ||
|
||
# Source Cleanup and Security Setup | ||
RUN chown -R $USER:$USER ${AMENT_WS} | ||
RUN rm -rf src/* | ||
|
||
USER ${USER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM mjxu96/carlaviz:0.9.13 | ||
|
||
ENV CARLAVIZ_BACKEND_HOST localhost | ||
ENV CARLAVIZ_BACKEND_PORT 8081 | ||
ENV CARLA_SERVER_HOST localhost | ||
ENV CARLA_SERVER_PORT 2000 | ||
|
||
WORKDIR /home/carla/carlaviz | ||
|
||
COPY docker/simulation/carla_viz/carlaviz_entrypoint.sh /home/carla/carlaviz/docker/carlaviz_entrypoint.sh | ||
|
||
RUN chmod +x ./docker/carlaviz_entrypoint.sh | ||
|
||
ENTRYPOINT ["/bin/bash", "-c", "./docker/carlaviz_entrypoint.sh > /dev/null 2>&1"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
is_backend_up="" | ||
|
||
function wait_for_backend_up() { | ||
max_wait_time=5 | ||
for ((i=0; i<=$max_wait_time; ++i)) do | ||
cat output.txt | grep -q "Connected to Carla Server" | ||
if [ $? == 0 ]; then | ||
is_backend_up="1" | ||
break | ||
fi | ||
sleep 1 | ||
done | ||
} | ||
|
||
function cleanup_backend() { | ||
backend_pid=$(pidof backend) | ||
kill -9 $backend_pid | ||
echo "Killed Backend process $backend_pid" | ||
} | ||
|
||
echo -e "CARLAVIZ_BACKEND_HOST=${CARLAVIZ_BACKEND_HOST}" >> /home/carla/.env | ||
echo -e "CARLAVIZ_BACKEND_PORT=${CARLAVIZ_BACKEND_PORT}" >> /home/carla/.env | ||
|
||
echo "Make sure you have launched the Carla server." | ||
echo "Launching backend." | ||
./backend/bin/backend ${CARLA_SERVER_HOST} ${CARLA_SERVER_PORT} |& tee output.txt & | ||
wait_for_backend_up | ||
if [[ -z "$is_backend_up" ]]; then | ||
echo "Backend is not launched. Please check if you have already started the Carla server." | ||
cleanup_backend | ||
exit 1 | ||
fi | ||
|
||
echo "Backend launched." | ||
|
||
echo "Launching frontend" | ||
# enable nginx | ||
service nginx restart | ||
echo "Frontend launched. Please open your browser" | ||
sleep 10 | ||
sed -i s/:8081/:$CARLAVIZ_BACKEND_PORT/g /var/www/carlaviz/bundle.js | ||
|
||
while [ "$is_backend_up" = "1" ] | ||
do | ||
cat output.txt | grep -q "time-out of" | ||
if [ $? == 0 ]; then | ||
is_backend_up="" | ||
cleanup_backend | ||
exit 1 | ||
fi | ||
sleep 5 | ||
done |
Oops, something went wrong.