Skip to content

Commit

Permalink
Build image_tranport_plugins from source
Browse files Browse the repository at this point in the history
  • Loading branch information
HiroIshida committed Nov 12, 2022
1 parent e3596bd commit 277bc92
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ros-noetic-ros-base=1.5.0-1* \
&& rm -rf /var/lib/apt/lists/*

RUN apt update && apt install python3-osrf-pycommon python3-catkin-tools -y
RUN apt update && apt install python3-osrf-pycommon python3-catkin-tools python3-wstool -y
RUN apt update && apt install ros-noetic-jsk-tools -y
RUN apt update && apt install ros-noetic-image-transport-plugins -y

Expand All @@ -76,18 +76,28 @@ SHELL ["/bin/bash", "-c"]
RUN sudo apt install python3-pip -y
RUN pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html


########################################
########### WORKSPACE BUILD ############
########################################
# Installing catkin package
RUN mkdir -p ~/detic_ws/src
COPY --chown=user . /home/user/detic_ws/src/detic_ros
RUN sudo apt install -y wget
RUN sudo rosdep init && rosdep update && sudo apt update
RUN cd ~/detic_ws/src/detic_ros && source /opt/ros/noetic/setup.bash && rosdep install --from-paths . -i -r -y
RUN cd ~/detic_ws/src/detic_ros && ./prepare.sh
RUN cd ~/detic_ws &&\
RUN cd ~/detic_ws/src &&\
source /opt/ros/noetic/setup.bash &&\
wstool init &&\
wstool merge detic_ros/rosinstall.noetic &&\
wstool update &&\
rosdep install --from-paths . --ignore-src -y -r &&\
source /opt/ros/noetic/setup.bash &&\
catkin build
rosdep install --from-paths . -i -r -y &&\
cd ~/detic_ws/src/detic_ros && ./prepare.sh &&\
cd ~/detic_ws && catkin init && catkin build

########################################
########### ENV VARIABLE STUFF #########
########################################
RUN touch ~/.bashrc
RUN echo "source ~/detic_ws/devel/setup.bash" >> ~/.bashrc
RUN echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
Expand Down
4 changes: 4 additions & 0 deletions rosinstall.noetic
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- git:
local-name: image_transport_plugins
uri: https://github.com/ros-perception/image_transport_plugins.git
version: noetic-devel

0 comments on commit 277bc92

Please sign in to comment.