Skip to content

Commit

Permalink
base image 2020-11-11 octomap server (#744)
Browse files Browse the repository at this point in the history
* base image 2020-11-11 includes ros-melodic-octomap-server
* subt/docker/base: add back python-laser-geometry package
* freyja.launch: disable octomap server using if=0
  • Loading branch information
zbynekwinkler authored Nov 11, 2020
1 parent 7ce193c commit 9eb0050
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
19 changes: 9 additions & 10 deletions subt/docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ RUN /bin/sh -c 'echo "deb [trusted=yes] http://packages.ros.org/ros/ubuntu $(lsb
&& apt-get update \
&& apt-get install -y \
python-catkin-tools \
python-laser-geometry \
python-rosdep \
python-rosinstall \
ros-melodic-desktop \
ros-melodic-joystick-drivers \
ros-melodic-octomap-server \
ros-melodic-octomap-rviz-plugins \
ros-melodic-octomap-server \
ros-melodic-pointcloud-to-laserscan \
ros-melodic-robot-localization \
ros-melodic-rotors-control \
Expand All @@ -53,9 +54,7 @@ RUN /bin/sh -c 'echo "deb [trusted=yes] http://packages.ros.org/ros/ubuntu $(lsb
&& rosdep init \
&& apt-get clean

# sdformat8-sdf conflicts with sdformat-sdf installed from gazebo
# so we need to workaround this using a force overwrite
# Do this before installing ign-gazebo
# add gazebo package repository
RUN /bin/sh -c 'echo "deb [trusted=yes] http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' \
&& /bin/sh -c 'wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -' \
&& /bin/sh -c 'apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'
Expand All @@ -69,6 +68,7 @@ RUN apt-get update \

SHELL ["/bin/bash", "-c"]

# build osrf/subt repository
FROM stage1 as build
WORKDIR /tmp
RUN mkdir subt-ws \
Expand All @@ -79,24 +79,23 @@ RUN mkdir subt-ws \

FROM stage1

# copy the binary packages of osrf/subt
COPY --from=build /opt/subt/ /opt/subt/
COPY --from=build /tmp/subt-ws/src/.git/refs/heads/master /opt/subt/HEAD

WORKDIR /osgar-ws

RUN /usr/bin/python3 -m venv env

RUN ./env/bin/pip install --no-cache-dir --upgrade pip
RUN ./env/bin/pip install --no-cache-dir --upgrade pip wheel setuptools

RUN ./env/bin/pip install --no-cache-dir \
"msgpack==1.0.0" \
"numpy==1.19.2" \
"opencv-python==4.4.0.42" \
"numpy==1.19.4" \
"opencv-python==4.4.0.46" \
"protobuf==3.13.0" \
"pyzmq==19.0.2"

RUN ./env/bin/pip install --no-cache-dir \
"http://osgar.robotika.cz/subt/pip/tensorflow/tensorflow-2.2.0rc3-cp36-cp36m-linux_x86_64.whl"

RUN ./env/bin/pip install --no-cache-dir \
"torch==1.5.0+cu101" -f https://download.pytorch.org/whl/torch_stable.html

Expand Down
13 changes: 7 additions & 6 deletions subt/docker/robotika/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM robotika/subt-base:2020-09-22
FROM robotika/subt-base:2020-11-11

# ADD always downloads the file to calculate checksum, RUN checksum only the cmdline
RUN curl -O# http://osgar.robotika.cz/subt/virtual/model/mdnet3.64.64.13.4.relu.pth
RUN curl -O# http://osgar.robotika.cz/subt/virtual/model/ssd_inception_v2_201009/frozen_inference_graph.pb
RUN curl -O# http://osgar.robotika.cz/subt/virtual/model/ssd_inception_v2_201009/cv_graph.pbtxt
RUN curl -O# http://osgar.robotika.cz/subt/virtual/model/mdnet3.64.64.13.4.relu.pth 2>&1
RUN curl -O# http://osgar.robotika.cz/subt/virtual/model/ssd_inception_v2_201009/frozen_inference_graph.pb 2>&1
RUN curl -O# http://osgar.robotika.cz/subt/virtual/model/ssd_inception_v2_201009/cv_graph.pbtxt 2>&1

RUN sudo apt-get update && sudo apt install -y ros-melodic-teleop-twist-keyboard python-laser-geometry
# example how to install an ubuntu package
# RUN sudo apt-get update && sudo apt install -y ros-melodic-teleop-twist-keyboard

ENTRYPOINT ["./src/osgar/subt/docker/robotika/entrypoint.bash"]

Expand All @@ -17,7 +18,7 @@ RUN echo "source /osgar-ws/devel/setup.sh" >> ~/.bashrc
# copy whole build context
COPY . ./src/osgar/

RUN /osgar-ws/env/bin/pip install -e src/osgar/
RUN /osgar-ws/env/bin/pip install --no-cache-dir -e src/osgar/

RUN source /opt/subt/setup.bash && catkin_make -DCMAKE_BUILD_TYPE=Release

Expand Down
2 changes: 2 additions & 0 deletions subt/docker/robotika/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
cd build && $(MAKE) --no-print-directory
2 changes: 1 addition & 1 deletion subt/ros/robot/launch/freyja.launch
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
<node pkg="topic_tools" type="relay" name="points_merge_front" args="$(arg robot_name)/rgbd_front/points $(arg robot_name)/rgbd_all/points"/>
<node pkg="topic_tools" type="relay" name="points_merge_rear" args="$(arg robot_name)/rgbd_rear/points $(arg robot_name)/rgbd_all/points"/>

<node ns="mapping" pkg="octomap_server" type="octomap_server_node" name="octomap">
<node if="0" ns="mapping" pkg="octomap_server" type="octomap_server_node" name="octomap">
<remap from="cloud_in" to="/$(arg robot_name)/rgbd_all/points"/>
<param name="frame_id" value="odom"/>
<!-- In case we want to filter out ceilings.
Expand Down

0 comments on commit 9eb0050

Please sign in to comment.