|
1 | 1 | FROM lcas.lincoln.ac.uk/lcas/devcontainer/ros2-teaching:2324-devel |
2 | 2 |
|
3 | | -# Install OS Packages etc |
4 | | -RUN sudo apt-get update && sudo apt-get install -y \ |
5 | | - git \ |
6 | | - curl \ |
7 | | - wget |
| 3 | +COPY .devcontainer/run.sh /root/ |
| 4 | +RUN chown root:root /root/run.sh |
| 5 | +RUN chmod +x /root/run.sh |
| 6 | +RUN bash -c "/root/run.sh" |
| 7 | + |
| 8 | +RUN su lcas |
| 9 | +RUN sudo chown -R lcas /opt/ros/lcas/ |
| 10 | +RUN sudo chmod 777 /opt/ros/lcas/install/setup.bash |
| 11 | +RUN cat /opt/ros/lcas/install/setup.bash |
8 | 12 |
|
9 | | -RUN sudo apt install python3-rosdep |
| 13 | +RUN bash -c 'source /opt/ros/lcas/install/setup.bash' |
10 | 14 |
|
11 | | -RUN sudo rosdep init -y |
12 | | -RUN rosdep update -y |
13 | | -RUN sudo apt update -y |
| 15 | +# RUN bash -c 'ros2 topic list' |
14 | 16 |
|
15 | | -RUN mkdir -p /workspaces/CMP9764/ws_moveit2/ |
16 | | -RUN cd /workspaces/CMP9764/ws_moveit2/ |
| 17 | +RUN sudo mkdir -p /ws_moveit2/src |
| 18 | +COPY ./src /ws_moveit2/src |
| 19 | +RUN sudo chown -R lcas /ws_moveit2/ |
| 20 | +RUN sudo chmod -R 777 /ws_moveit2/ |
17 | 21 |
|
18 | | -RUN git clone --branch humble https://github.com/ros-planning/moveit2_tutorials |
| 22 | +RUN git clone --branch humble https://github.com/ros-planning/moveit2_tutorials /ws_moveit2/src/moveit2_tutorials/ |
| 23 | + |
| 24 | +# Install OS Packages etc |
| 25 | +RUN sudo apt-get update && sudo apt-get install -y \ |
| 26 | + git \ |
| 27 | + curl \ |
| 28 | + wget \ |
| 29 | + python3-rosdep \ |
| 30 | + python3-vcstool \ |
| 31 | + python3-colcon-common-extensions \ |
| 32 | + python3-colcon-mixin \ |
| 33 | + ros-humble-ament-cmake-python |
19 | 34 |
|
20 | | -RUN sudo apt update -y && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y |
| 35 | +RUN bash -c 'rosdep update -y' |
| 36 | +RUN bash -c 'sudo apt update -y' |
| 37 | +RUN bash -c 'cd /ws_moveit2' |
21 | 38 |
|
22 | | -RUN colcon build --parallel-workers 1 |
| 39 | +RUN bash -c 'vcs import < /ws_moveit2/src/moveit2_tutorials/moveit2_tutorials.repos' |
23 | 40 |
|
24 | | -RUN echo 'source /workspaces/CMP9764/ws_moveit2/install/setup.bash' >> ~/.bashrc |
| 41 | +RUN bash -c 'rosdep install -r --from-paths /ws_moveit2/src/moveit2_tutorials --ignore-src --rosdistro $ROS_DISTRO -y' |
| 42 | +# RUN bash -c 'colcon build --parallel-workers 1' |
25 | 43 |
|
26 | 44 | # add commit history to bust cache if and when needed. |
27 | 45 | ADD "https://api.github.com/repos/LCAS/cmp9764/commits?per_page=1&sha=main" .lcas_addons.commits |
0 commit comments