Skip to content

Commit

Permalink
Merge pull request #124 from Tigul/docker
Browse files Browse the repository at this point in the history
Docker
  • Loading branch information
Tigul authored Jan 10, 2024
2 parents c79d953 + 30b9198 commit cda9cd9
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

ARG FROM_IMAGE=ros:noetic-ros-core-focal
ARG OVERLAY_WS=/opt/ros/overlay_ws

FROM $FROM_IMAGE as builder
ARG OVERLAY_WS=/opt/ros/overlay_ws
WORKDIR $OVERLAY_WS/src

RUN sudo apt-get update && apt-get install python3-pip python3-vcstool git -y
RUN vcs import --input https://raw.githubusercontent.com/cram2/pycram/dev/pycram-https.rosinstall --recursive --skip-existing $OVERLAY_WS/src
RUN sudo apt-get update && apt-get install python3-pip -y && pip3 install pip --upgrade
RUN pip3 install --no-cache-dir -r $OVERLAY_WS/src/pycram/requirements.txt

RUN pip3 install rosdep && rosdep init
RUN rosdep update && rosdep install --from-paths $OVERLAY_WS/src --ignore-src -r -y
RUN sudo apt-get install jupyter -y

RUN . /opt/ros/noetic/setup.sh && cd $OVERLAY_WS && catkin_make
RUN echo "source $OVERLAY_WS/devel/setup.bash" >> ~/.bashrc
RUN rm -rf $OVERLAY_WS/src/pycram

COPY . $OVERLAY_WS/src/pycram
RUN pip3 install -r $OVERLAY_WS/src/pycram/requirements.txt
COPY docker/entrypoint.sh /
ENTRYPOINT ["bash", "/entrypoint.sh"]

# launch ros package
#CMD ["roslaunch", "pycram", "ik_and_description.launch", "&"]
#CMD ["jupyter", "notebook", "--ip", "0.0.0.0", "--allow-root", "/opt/ros/overlay_ws/src/pycram/examples/"]
7 changes: 7 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

source /opt/ros/overlay_ws/devel/setup.bash

exec "$@"
25 changes: 25 additions & 0 deletions pycram-https.rosinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
repositories:
iai_maps:
type: git
url: https://github.com/code-iai/iai_maps.git
version: master
iai_robots:
type: git
url: https://github.com/code-iai/iai_robots.git
version: master
pycram:
type: git
url: https://github.com/cram2/pycram.git
version: dev
pr2_common:
type: git
url: https://@github.com/PR2/pr2_common.git
version: b34703bcca2b07cadbc3777d3c504c232a0c0c28
kdl_ik_services:
type: git
url: https://github.com/cram2/kdl_ik_service.git
version: master
pr2_kinematics:
type: git
url: https://github.com/PR2/pr2_kinematics.git
version: kinetic-devel
2 changes: 1 addition & 1 deletion pycram.rosinstall
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories:
kdl_ik_services:
type: git
url: [email protected]:cram2/kdl_ik_service.git
verison: master
version: master
pr2_kinematics:
type: git
url: [email protected]:PR2/pr2_kinematics.git
Expand Down

0 comments on commit cda9cd9

Please sign in to comment.