Skip to content

Commit 4958c4f

Browse files
Make IKOS available in the spaceros image (#99).
IKOS is one of the tools that Space ROS includes to perform static analysis of ROS 2 applications. Although ament_ikos is provided with the docker image, IKOS itself is not, rendering the former useless and leaving it to users to compile and install IKOS prior to being able to use it. This commit modifies the spaceros Earthfile to install IKOS globally in the system.
1 parent 297fedf commit 4958c4f

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

spaceros/Earthfile

+22-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ setup:
7373
ENV USERNAME spaceros-user
7474
ENV HOME_DIR=/home/${USERNAME}
7575
ENV SPACEROS_DIR=${HOME_DIR}/spaceros
76-
ARG IKOS_DIR=${HOME_DIR}/ikos
7776
ENV ROSDISTRO=humble
7877

7978
# Create a spaceros user
@@ -144,6 +143,28 @@ rosdep:
144143
RUN sudo rosdep init && rosdep update
145144
RUN rosdep install --from-paths src --ignore-src --rosdistro rolling -y --skip-keys "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers rmw_connextdds ros_testing rmw_connextdds rmw_fastrtps_cpp rmw_fastrtps_dynamic_cpp composition demo_nodes_py lifecycle rosidl_typesupport_fastrtps_cpp rosidl_typesupport_fastrtps_c ikos"
146145

146+
RUN sudo apt-get install --yes \
147+
gcc g++ cmake libgmp-dev libboost-dev libboost-filesystem-dev \
148+
libboost-thread-dev libboost-test-dev \
149+
libsqlite3-dev libtbb-dev libz-dev libedit-dev \
150+
python3 python3-pip python3-venv \
151+
llvm-14 llvm-14-dev llvm-14-tools clang-14
152+
153+
WORKDIR $SPACEROS_DIR
154+
RUN git clone -b v3.2 --depth 1 https://github.com/NASA-SW-VnV/ikos.git
155+
WORKDIR $SPACEROS_DIR/ikos
156+
RUN mkdir build
157+
WORKDIR $SPACEROS_DIR/ikos/build
158+
RUN cmake \
159+
-DCMAKE_INSTALL_PREFIX="/opt/ikos" \
160+
-DCMAKE_BUILD_TYPE="Debug" \
161+
-DLLVM_CONFIG_EXECUTABLE="/usr/lib/llvm-14/bin/llvm-config" \
162+
..
163+
RUN make
164+
RUN sudo make install
165+
WORKDIR $SPACEROS_DIR
166+
RUN sudo rm -rf ikos/
167+
147168
build:
148169
FROM +rosdep
149170
RUN colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --no-warn-unused-cli

0 commit comments

Comments
 (0)