-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (49 loc) · 2.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:20.04
SHELL ["/bin/bash", "-c"]
# Setup new User
RUN groupadd -r ros
RUN useradd -r -g ros ros
RUN apt update
RUN apt install -y locales
RUN locale-gen en_GB en_GB.UTF-8
RUN update-locale LC_ALL=en_GB.UTF-8 LANG=en_GB.UTF-8
RUN LANG=en_GB.UTF-8
#ENV LANG en_GB.UTF-8
#ENV LC_ALL en_GB.UTF-8
RUN apt update && apt install -y curl gnupg2 lsb-release git
RUN apt-get install -y build-essential
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive apt install -y ros-foxy-desktop
RUN apt install -y ros-foxy-navigation2
RUN apt install -y ros-foxy-ecl-config ros-foxy-ecl-tools
RUN apt install -y librostest-dev python3-rostest
#RUN apt install -y ros-foxy-test-interface-files ros-foxy-test-msgs ros-foxy-test-launch-system-modes
RUN apt install -y ros-foxy-ros-testing
RUN apt install -y ros-foxy-nav2-behavior-tree ros-foxy-behaviortree-cpp-v3
WORKDIR /home/ros/dev_ws/src
RUN git clone https://github.com/cpeavy2/botvac_node.git
RUN git clone https://github.com/cpeavy2/neato_robot.git
RUN git clone https://github.com/kobuki-base/cmd_vel_mux.git
RUN git clone https://github.com/kobuki-base/velocity_smoother.git
#RUN git clone -b foxy-devel https://github.com/ros-planning/navigation2.git
WORKDIR /home/ros/dev_ws/
#RUN apt-get install python3-rosdep2 -y
#To create a more minimal version, comment out ros-foxy-desktop install above and uncomment below
#RUN rosdep init
#RUN rosdep update
#RUN rosdep install -i --from-path src --rosdistro foxy -y
RUN apt install python3-colcon-common-extensions -y
RUN source /opt/ros/foxy/setup.bash && colcon build
#RUN ros2 launch botvac_node test.py
#RUN colcon build
# Install python pyserial
RUN apt install -y python3-pip
RUN apt install ros-foxy-xacro
COPY ros2_entrypoint.sh /home/ros/ros2_entrypoint.sh
RUN chmod +774 /home/ros/ros2_entrypoint.sh
RUN chown -R ros:ros /home/ros
USER ros
ENTRYPOINT ["/home/ros/ros2_entrypoint.sh"]
CMD ["bash"]