Skip to content

Commit 7756a74

Browse files
authored
Merge pull request #39 from JdeRobot/update-bt-studio
Update Bt Studio
2 parents 7a7c692 + 520314e commit 7756a74

File tree

3 files changed

+348
-2
lines changed

3 files changed

+348
-2
lines changed

.github/workflows/generate_Bt_Studio.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
sudo apt-get update
9696
cd scripts
9797
if [ "${{ github.event.inputs.ROS }}" == "humble" ]; then
98-
docker build -f Dockerfile.dependencies_humble -t jderobot/robotics-applications:dependencies-humble .
98+
docker build -f Dockerfile.dependencies_humble_bt_studio -t jderobot/robotics-applications:dependencies-humble .
9999
else
100100
echo "Incorrect ROS version"
101101
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,346 @@
1+
FROM nvidia/opengl:1.2-glvnd-runtime-ubuntu22.04
2+
3+
# Make all NVIDIA GPUS visible
4+
ARG NVIDIA_VISIBLE_DEVICES=all
5+
ENV NVIDIA_DRIVER_CAPABILITIES all
6+
ENV VIRTUALGL_VERSION=3.0.2
7+
ENV TURBOVNC_VERSION=3.0.3
8+
9+
# Setup NON INTERACTIVE ENVIRONMENT
10+
ENV DEBIAN_FRONTEND=noninteractive
11+
12+
# Install locales to prevent errors
13+
RUN apt-get clean && \
14+
apt-get update && \
15+
apt-get install --no-install-recommends -y locales && \
16+
rm -rf /var/lib/apt/lists/* && \
17+
locale-gen en_US.UTF-8
18+
ENV LANG en_US.UTF-8
19+
ENV LANGUAGE en_US:en
20+
ENV LC_ALL en_US.UTF-8
21+
22+
ENV ROS_DISTRO=humble
23+
ENV AMENT_PREFIX_PATH=/opt/ros/${ROS_DISTRO}
24+
ENV COLCON_PREFIX_PATH=/opt/ros/${ROS_DISTRO}
25+
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/opt/ros/${ROS_DISTRO}/opt/rviz_ogre_vendor/lib:/opt/ros/${ROS_DISTRO}/lib/x86_64-linux-gnu:/opt/ros/${ROS_DISTRO}/lib:/usr/share/gazebo/../../lib/x86_64-linux-gnu/gazebo-11/plugins:
26+
ENV PATH=/opt/ros/${ROS_DISTRO}/bin:$PATH
27+
ENV PYTHONPATH=/opt/ros/${ROS_DISTRO}/lib/python3.10/site-packages
28+
ENV ROS_PYTHON_VERSION=3
29+
ENV ROS_VERSION=2
30+
31+
# Install common tools
32+
RUN apt-get update && apt-get install -y \
33+
software-properties-common \
34+
bash-completion \
35+
apt-utils \
36+
build-essential \
37+
git curl wget cmake \
38+
nano vim \
39+
gnupg \
40+
lsb-release \
41+
sudo \
42+
net-tools \
43+
pciutils \
44+
&& rm -rf /var/lib/apt/lists/*
45+
46+
# Install ROS2 and ROS packages
47+
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \
48+
&& 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 \
49+
&& apt-get update && apt-get install -y \
50+
ros-${ROS_DISTRO}-ros-base \
51+
ros-${ROS_DISTRO}-xacro \
52+
ros-${ROS_DISTRO}-joint-state-publisher \
53+
ros-${ROS_DISTRO}-rviz2 \
54+
python3-colcon-common-extensions \
55+
python3-pip python3-rosdep python3-vcstool \
56+
python3-argcomplete \
57+
&& rosdep init \
58+
&& rm -rf /var/lib/apt/lists/*
59+
60+
# Install Gazebo 11
61+
RUN add-apt-repository ppa:openrobotics/gazebo11-gz-cli
62+
RUN apt-get update && apt-get install -y \
63+
gazebo11 \
64+
ros-humble-gazebo-ros-pkgs \
65+
gstreamer1.0-plugins-bad \
66+
gstreamer1.0-plugins-good \
67+
gstreamer1.0-plugins-ugly \
68+
gstreamer1.0-libav \
69+
libgstreamer-plugins-base1.0-dev \
70+
libimage-exiftool-perl \
71+
&& apt-get -y autoremove \
72+
&& apt-get clean autoclean \
73+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
74+
RUN mkdir ~/.gazebo && touch ~/.gazebo/gui.ini
75+
76+
# Install Gazebo Harmonic
77+
RUN apt-get update \
78+
&& wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg \
79+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null \
80+
&& apt-get update && apt-get install -y -q \
81+
gz-harmonic \
82+
&& rm -rf /var/lib/apt/lists/*
83+
84+
RUN apt-get update && apt-get install -y \
85+
ros-humble-ros-gzharmonic \
86+
&& rm -rf /var/lib/apt/lists/*
87+
88+
# Install VNC
89+
# Xorg segfault error mitigation
90+
RUN apt-get update && apt-get install -y --no-install-recommends \
91+
dbus-x11 \
92+
libdbus-c++-1-0v5 \
93+
xvfb xauth xfonts-base xkb-data x11-xkb-utils \
94+
x11vnc \
95+
xterm \
96+
xserver-xorg-video-dummy \
97+
x11-apps \
98+
&& apt-get -y autoremove \
99+
&& apt-get clean autoclean \
100+
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
101+
102+
RUN wget https://xpra.org/xorg.conf \
103+
&& rm -rf /tmp/*
104+
105+
# Install noVNC and websockify
106+
RUN git clone -b v1.4.0 https://github.com/novnc/noVNC.git
107+
RUN cd /noVNC/utils && git clone -b v0.11.0 https://github.com/novnc/websockify.git
108+
109+
# VirtualGL and TurboVNC
110+
COPY ./gpu/virtualgl_${VIRTUALGL_VERSION}_amd64.deb ./gpu/virtualgl32_${VIRTUALGL_VERSION}_amd64.deb ./gpu/turbovnc_${TURBOVNC_VERSION}_amd64.deb /
111+
112+
RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y \
113+
libxtst6:i386 \
114+
libxv1:i386 \
115+
libglu1-mesa:i386 \
116+
libegl1-mesa:i386 \
117+
libegl1-mesa:amd64
118+
119+
RUN apt-get update && dpkg -i /virtualgl_${VIRTUALGL_VERSION}_amd64.deb /virtualgl32_${VIRTUALGL_VERSION}_amd64.deb \
120+
&& rm /virtualgl_${VIRTUALGL_VERSION}_amd64.deb /virtualgl32_${VIRTUALGL_VERSION}_amd64.deb \
121+
&& chmod u+s /usr/lib/libvglfaker.so \
122+
&& chmod u+s /usr/lib/libdlfaker.so \
123+
&& chmod u+s /usr/lib32/libvglfaker.so \
124+
&& chmod u+s /usr/lib32/libdlfaker.so \
125+
&& chmod u+s /usr/lib/i386-linux-gnu/libvglfaker.so \
126+
&& chmod u+s /usr/lib/i386-linux-gnu/libdlfaker.so \
127+
&& apt-get update && apt-get install -y --no-install-recommends \
128+
/turbovnc_${TURBOVNC_VERSION}_amd64.deb \
129+
&& rm turbovnc_${TURBOVNC_VERSION}_amd64.deb \
130+
&& rm -rf /var/lib/apt/lists/*
131+
132+
RUN apt-get update && \
133+
apt-get install -y lxde-common && \
134+
rm -rf /var/lib/apt/lists/*
135+
136+
137+
# RUN echo -e "no-remote-connections\n\
138+
# no-httpd\n\
139+
# no-x11-tcp-connections\n\
140+
# no-pam-sessions\n\
141+
# permitted-security-types = None, VNC, otp\
142+
# " > /etc/turbovncserver-security.conf
143+
144+
ENV PATH "$PATH:/opt/VirtualGL/bin:/opt/TurboVNC/bin"
145+
146+
# Node
147+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
148+
&& apt-get install -y nodejs \
149+
&& npm install -g yarn
150+
151+
# Install Python 3 pip build dependencies first
152+
RUN python3.10 -m pip install --upgrade pip==23.3.1 wheel==0.41.3 setuptools==69.0.2
153+
154+
# pip install dependencies
155+
RUN python3.10 -m pip install \
156+
pylint==3.3.1 transitions==0.9.0 pydantic==2.4.2 websocket-client==1.5.2 \
157+
argparse==1.4.0 coverage==6.2 cerberus==1.3.4 empy==3.3.4 jinja2==3.0.3 kconfiglib==14.1.0 \
158+
matplotlib==3.0.* numpy==1.24.3 nunavut==1.1.0 packaging==21.3 pkgconfig==1.5.5 pyros-genmsg==0.5.8 \
159+
pyulog==1.0.1 pyyaml==5.4.1 requests==2.31.0 serial==0.0.97 six==1.16.0 toml==0.10.2 psutil==5.9.0 \
160+
onnxruntime==1.15.0 Pillow==9.0.1 opencv-python==4.5.5.64 netron seaborn==0.11.2 watchdog==2.1.5 utm==0.7.0 psycopg2
161+
162+
# monaco editor
163+
RUN python3.10 -m pip install black==24.10.0
164+
165+
# websocket server dependency
166+
RUN python3.10 -m pip install websocket_server==0.6.4 posix-ipc==1.1.1 django==4.1.7 djangorestframework==3.13.1 \
167+
django-webpack-loader==1.5.0 django-cors-headers==3.14.0 websockets==11.0.3 asyncio==3.4.3
168+
169+
# BT STUDIO hotfix
170+
RUN python3.10 -m pip install py-trees autopep8
171+
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \
172+
&& 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 \
173+
&& apt-get update && apt-get install -y \
174+
ros-humble-py-trees \
175+
ros-humble-py-trees-ros
176+
177+
#-----------------------------------------
178+
# # PX4 pip installs
179+
# RUN python3.10 -m pip install jsonschema==4.18.0
180+
181+
# # PX4 Dependencies
182+
# RUN apt-get update && apt-get install -y \
183+
# astyle \
184+
# gdb \
185+
# lcov \
186+
# libfuse2 \
187+
# ninja-build \
188+
# rsync \
189+
# shellcheck \
190+
# && rm -rf /var/lib/apt/lists/*
191+
192+
# # Install PX4
193+
# RUN git clone -b v1.14.0 https://github.com/PX4/PX4-Autopilot.git --recursive \
194+
# && cd /PX4-Autopilot \
195+
# && DONT_RUN=1 make px4_sitl gazebo
196+
197+
# # https://github.com/JdeRobot/RoboticsAcademy/issues/2310
198+
# RUN echo 'param set-default COM_OF_LOSS_T 5' >> /PX4-Autopilot/build/px4_sitl_default/etc/init.d-posix/px4-rc.params
199+
200+
# RUN git clone -b v2.4.3 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git /tmp/MicroXRCEAgent \
201+
# && cd /tmp/MicroXRCEAgent \
202+
# && mkdir build && cd build \
203+
# && cmake .. \
204+
# && make -j $(nproc) \
205+
# && make install \
206+
# && ldconfig /usr/local/lib/ \
207+
# && rm -rf /tmp/*
208+
#-----------------------------------------
209+
210+
## Aerostack2
211+
WORKDIR /root/
212+
213+
RUN apt-get update && \
214+
apt-get install apt-utils -y \
215+
software-properties-common \
216+
git \
217+
tmux \
218+
tmuxinator \
219+
python3-rosdep \
220+
python3-pip \
221+
python3-colcon-common-extensions \
222+
python3-colcon-mixin \
223+
python-is-python3 \
224+
ros-dev-tools \
225+
python3-flake8 \
226+
python3-flake8-builtins \
227+
python3-flake8-comprehensions \
228+
python3-flake8-docstrings \
229+
python3-flake8-import-order \
230+
python3-flake8-quotes \
231+
cppcheck \
232+
lcov \
233+
lsb-release \
234+
wget \
235+
gnupg \
236+
&& rm -rf /var/lib/apt/lists/*
237+
238+
RUN pip3 install \
239+
pylint \
240+
flake8==4.0.1 \
241+
pycodestyle==2.8 \
242+
cmakelint \
243+
cpplint \
244+
colcon-lcov-result \
245+
PySimpleGUI-4-foss
246+
247+
RUN colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
248+
RUN colcon mixin update default
249+
RUN rm -rf log
250+
# remove log folder
251+
RUN mkdir -p /home/drones_ws/src/
252+
WORKDIR /home/drones_ws/src/
253+
RUN git clone https://github.com/aerostack2/aerostack2.git -b 733-aerostack2-shared-launch-context
254+
RUN touch aerostack2/as2_hardware_drivers/COLCON_IGNORE
255+
RUN touch aerostack2/as2_behavior_tree/COLCON_IGNORE
256+
RUN touch aerostack2/as2_map_server/COLCON_IGNORE
257+
RUN touch aerostack2/as2_behaviors/as2_behaviors_path_planning/COLCON_IGNORE
258+
RUN touch aerostack2/as2_utilities/as2_geozones/COLCON_IGNORE
259+
RUN touch aerostack2/as2_user_interfaces/as2_visualization/as2_rviz_plugins/COLCON_IGNORE
260+
261+
WORKDIR /home/drones_ws/
262+
# RUN rosdep update
263+
# RUN apt update && \
264+
# rosdep install --from-paths src --ignore-src -r -y
265+
266+
RUN apt-get update && \
267+
apt-get install -y \
268+
libbenchmark-dev \
269+
libeigen3-dev \
270+
libgeographic-dev \
271+
libncurses-dev \
272+
libyaml-cpp-dev \
273+
pybind11-dev \
274+
python3-jinja2 \
275+
python3-pydantic \
276+
python3-pymap3d \
277+
python3-pytest \
278+
ros-humble-action-msgs \
279+
ros-humble-ament-cmake \
280+
ros-humble-ament-cmake-gtest \
281+
ros-humble-ament-cmake-lint-cmake \
282+
ros-humble-ament-cmake-pytest \
283+
ros-humble-ament-cmake-python \
284+
ros-humble-ament-cmake-xmllint \
285+
ros-humble-ament-copyright \
286+
ros-humble-ament-flake8 \
287+
ros-humble-ament-index-cpp \
288+
ros-humble-ament-lint-auto \
289+
ros-humble-ament-lint-common \
290+
ros-humble-ament-pep257 \
291+
ros-humble-backward-ros \
292+
ros-humble-builtin-interfaces \
293+
ros-humble-cv-bridge \
294+
ros-humble-geographic-msgs \
295+
ros-humble-geometry-msgs \
296+
ros-humble-image-transport \
297+
ros-humble-mocap4r2-msgs \
298+
ros-humble-nav-msgs \
299+
ros-humble-pluginlib \
300+
ros-humble-rclcpp \
301+
ros-humble-rclcpp-action \
302+
ros-humble-rclcpp-components \
303+
ros-humble-rclcpp-lifecycle \
304+
ros-humble-rclpy \
305+
ros-humble-robot-state-publisher \
306+
# ros-humble-ros-gz \
307+
# ros-humble-ros-gz-bridge \
308+
# ros-humble-ros-gz-sim \
309+
ros-humble-rosidl-default-generators \
310+
ros-humble-rosidl-default-runtime \
311+
ros-humble-rviz2 \
312+
ros-humble-sdformat-urdf \
313+
ros-humble-sensor-msgs \
314+
ros-humble-std-msgs \
315+
ros-humble-std-srvs \
316+
ros-humble-tf2 \
317+
ros-humble-tf2-geometry-msgs \
318+
ros-humble-tf2-msgs \
319+
ros-humble-tf2-ros \
320+
ros-humble-trajectory-msgs \
321+
ros-humble-visualization-msgs \
322+
&& rm -rf /var/lib/apt/lists/*
323+
324+
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
325+
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
326+
327+
# # Create workspace and add drone packages
328+
# RUN mkdir -p /home/drones_ws/src/
329+
# RUN git clone https://github.com/aerostack2/aerostack2.git /home/drones_ws/src/
330+
331+
RUN echo "source /usr/share/gazebo/setup.bash" >> ~/.bashrc
332+
RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
333+
RUN echo 'export AEROSTACK2_PATH=/home/drones_ws/src/aerostack2' >> ~/.bashrc
334+
RUN echo 'source $AEROSTACK2_PATH/as2_cli/setup_env.bash' >> ~/.bashrc
335+
RUN echo "source /home/drones_ws/install/setup.bash" >> ~/.bashrc
336+
337+
# # Compiling and sourcing the workspace
338+
# WORKDIR /home/drones_ws/
339+
# RUN apt-get update && rosdep update && rosdep install -y -r -q --from-paths src --ignore-src --rosdistro ${ROS_DISTRO}
340+
# RUN /bin/bash -c "source /opt/ros/humble/setup.bash; colcon build --symlink-install"
341+
342+
# Download and install OMPL library
343+
COPY install-ompl-ubuntu.sh /
344+
WORKDIR /
345+
RUN chmod u+x install-ompl-ubuntu.sh
346+
RUN ./install-ompl-ubuntu.sh --python

scripts/Dockerfile.humble_BT

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RUN git clone --depth 1 https://github.com/JdeRobot/bt-studio.git -b $BT_STUDIO
3232

3333
# Compiling and sourcing the workspace
3434
WORKDIR /home/ws
35-
RUN /bin/bash -c "source /home/drones_ws/install/setup.bash; rosdep install --from-paths src --ignore-src -r --rosdistro humble -y"
35+
RUN /bin/bash -c "source /home/drones_ws/install/setup.bash"
3636
RUN /bin/bash -c "source /opt/ros/humble/setup.bash; colcon build --symlink-install"
3737

3838
# build frontend

0 commit comments

Comments
 (0)