-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.pmb2_hunavsim2
executable file
·131 lines (94 loc) · 3.82 KB
/
Dockerfile.pmb2_hunavsim2
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# get image of ROS 2 humble
FROM osrf/ros:humble-desktop-full
#
# docker build -t pmb2_hunavsim -f Dockerfile.pmb2_hunavsim .
#
WORKDIR /home
ENV QT_X11_NO_MITSHM=1
ENV EDITOR=nano
ENV XDG_RUNTIME_DIR=/tmp
ENV SHELL=/bin/bash
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
# we set distro ROS2 Humble
ARG distro="humble"
# from now on, we install required packages for HuNavSim
ENV GAZEBO_MODEL_PATH=''
ENV GAZEBO_PLUGIN_PATH=''
ENV GAZEBO_RESOURCE_PATH=''
RUN apt-get update && apt-get install -y \
wget \
git \
bash-completion \
build-essential \
sudo \
nano \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
python3-vcstool \
python3-rosdep \
python3-colcon-common-extensions \
&& rm -rf /var/lib/apt/lists/*
# other required ROS packages
RUN apt-get update && apt-get install -y \
ros-humble-nav2-* ros-dev-tools \
ros-humble-teleop-twist-joy ros-humble-urdf ros-humble-xacro \
ros-humble-behaviortree-cpp-v3 ros-humble-gazebo-ros ros-humble-gazebo-plugins \
ros-humble-gazebo-ros-pkgs ros-humble-teleop-twist-keyboard ros-humble-laser-proc \
ros-humble-controller-interface ros-humble-controller-manager \
ros-humble-ros2-controllers \
ros-humble-joint-state-broadcaster ros-humble-joint-state-publisher \
ros-humble-joint-trajectory-controller ros-humble-joint-state-publisher-gui \
ros-humble-compressed-image-transport ros-humble-rqt* \
ros-humble-slam-toolbox ros-humble-navigation2 ros-humble-interactive-markers \
ros-humble-vision-msgs ros-humble-tf-transformations \
&& rm -rf /var/lib/apt/lists/*
# rosdep
RUN apt-get install python3-rosdep -y
#RUN rosdep init
#RUN rosdep update
#RUN rosdep install -i --from-path src --rosdistro humble -y
# install the lightsfm library
RUN git clone https://github.com/robotics-upo/lightsfm.git \
&& cd lightsfm && make && make install
RUN echo "source /opt/ros/humble/setup.bash" >> /root/.bashrc
RUN echo "source /usr/share/gazebo/setup.sh" >> /root/.bashrc
# PAL pmb2 dependencies
RUN apt-get update && apt-get install -y \
ros-humble-launch-param-builder \
ros-humble-joy-linux \
ros-humble-joy-teleop \
ros-humble-pal-maps \
ros-humble-rmw-cyclonedds-cpp \
ros-humble-twist-mux \
ros-humble-pal-gazebo-plugins \
ros-humble-pal-urdf-utils \
&& rm -rf /var/lib/apt/lists/*
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
# Create workspace
RUN mkdir -p pmb2_ws/src
# get pmb2 packages
WORKDIR /home/pmb2_ws/src
#RUN vcs import --input https://raw.githubusercontent.com/pal-robotics/pmb2_tutorials/humble-devel/pmb2_public.repos src
RUN git clone -b humble-devel https://github.com/pal-robotics/urdf_test.git
RUN git clone -b master https://github.com/pal-robotics/launch_pal.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pal_gazebo_worlds.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pal_navigation_cfg_public.git
# take pmb2_robot from UPO's fork
RUN git clone -b humble-devel https://github.com/robotics-upo/pmb2_robot.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pmb2_navigation.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pmb2_simulation.git
# get last versions of these packages
RUN git clone -b humble https://github.com/ros-controls/ros2_control.git
RUN git clone -b humble https://github.com/ros-controls/gazebo_ros2_control.git
# get people
RUN git clone -b ros2 https://github.com/wg-perception/people.git
#RUN git clone -b humble https://github.com/robotics-upo/hunav_sim.git
#RUN git clone -b humble https://github.com/robotics-upo/hunav_gazebo_wrapper.git
# compile the workspace
WORKDIR /home/pmb2_ws/
RUN source /opt/ros/humble/setup.bash && \
colcon build --symlink-install
# source the workspace
RUN source /home/pmb2_ws/install/setup.bash
RUN echo "source /home/pmb2_ws/install/setup.bash" >> /root/.bashrc