-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM ros:galactic-ros-base | ||
ARG USE_RVIZ | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends software-properties-common git libusb-1.0-0-dev wget zsh python3-colcon-common-extensions | ||
|
||
ENV DEBIAN_FRONTEND=dialog | ||
RUN sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" | ||
|
||
ENV WS=/ws | ||
RUN mkdir -p $WS/src | ||
COPY ./ .$WS/src/depthai_ros | ||
RUN cd .$WS/ && rosdep install --from-paths src --ignore-src -y | ||
RUN cd .$WS/ && . /opt/ros/galactic/setup.sh && colcon build | ||
RUN if [ "$USE_RVIZ" = "1" ] ; then echo "RVIZ ENABLED" && sudo apt install -y ros-galactic-rviz2 ros-galactic-rviz-imu-plugin ; else echo "RVIZ NOT ENABLED"; fi | ||
RUN echo "if [ -f ${WS}/install/setup.zsh ]; then source ${WS}/install/setup.zsh; fi" >> $HOME/.zshrc | ||
RUN echo 'eval "$(register-python-argcomplete3 ros2)"' >> $HOME/.zshrc | ||
RUN echo 'eval "$(register-python-argcomplete3 colcon)"' >> $HOME/.zshrc | ||
RUN echo "if [ -f ${WS}/install/setup.bash ]; then source ${WS}/install/setup.bash; fi" >> $HOME/.bashrc | ||
ENTRYPOINT [ "/ws/src/depthai_ros/entrypoint.sh" ] | ||
CMD ["zsh"] |