Skip to content

Commit

Permalink
WIP - Refactor: Minimal working version to support the new models
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-nhg committed Feb 23, 2024
1 parent 215967d commit 88e566b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 255 deletions.
5 changes: 3 additions & 2 deletions haros_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ then
then
if [ "${2}" = "--all" ]
then
python3 /call_generator.py
python3 /ros_model_extractor.py --clang-version $clang_version --package "$1" --"${3}" --model-path "${4}" --ws "${5}" --path-to-src "$path_to_src_code" --repo $model_repo -a >> ${4}/extractor.log
else
python3 /ros_model_extractor.py --clang-version $clang_version --package "$1" --name "$2" --"${3}" --model-path "${4}" --ws "${5}" --path-to-src "$path_to_src_code" --repo $model_repo>> ${4}/extractor.log
Expand All @@ -120,7 +121,7 @@ echo "~~~~~~~~~~~"
#echo "~~~~~~~~~~~"

echo "###########"
for generated_model in "${4}"/*.ros
for generated_model in "${4}"/*.ros2
do
echo "~~~~~~~~~~~"
echo "Print of the model: $generated_model:"
Expand All @@ -132,4 +133,4 @@ echo "###########"
done

## Clean and finish
rm -rf ${5}/src/*
#rm -rf ${5}/src/*
9 changes: 7 additions & 2 deletions humble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/lib/llvm-14/lib
RUN pip3 install --upgrade pip
RUN pip3 install -Iv clang==14.0
RUN pip3 install -e git+https://github.com/timtadh/pyflwor.git#egg=pyflwor
RUN pip3 install -e git+https://github.com/ipa320/ros_model_parser.git#egg=ros_model_parser
RUN pip3 install -e git+https://github.com/ipa320/ros2model.git#egg=ros2model
RUN pip3 install -e git+https://github.com/git-afsantos/bonsai#egg=bonsai-code
RUN pip3 install -e git+https://github.com/ipa-nhg/haros@FixPythonExtractTopic#egg=haros
# RUN pip3 install -e git+https://github.com/git-afsantos/haros#egg=haros
Expand All @@ -41,6 +41,9 @@ RUN usermod -a -G root extractor
RUN echo "extractor ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/extractor
USER extractor
RUN mkdir -p /home/extractor/ws/src
#RUN git clone https://github.com/ipa320/ros2model.git /home/extractor/ws/src/ros2model
RUN echo "test"
RUN git clone https://github.com/ipa-nhg/ros2model.git -b PythonInstallTemplatesFolder /home/extractor/ws/src/ros2model

RUN mkdir -p /home/extractor/results
RUN chown extractor:extractor /home/extractor/results
Expand Down Expand Up @@ -71,11 +74,13 @@ RUN source /opt/ros/$ROS_DISTRO/setup.bash;\
ENV PYTHON_VERSION 3
RUN echo 'source /home/extractor/ws/install/setup.bash' >> /home/extractor/.bashrc

#RUN echo "test"
RUN echo "test"
COPY ${path_to_scripts}messages_generator_runner.sh /
COPY ${path_to_scripts}generate_messages_model_helper.sh /
COPY ${path_to_scripts}haros_runner.sh /
COPY ${path_to_scripts}ros_model_extractor.py /
COPY ${path_to_scripts}call_generator.py /

COPY ${path_to_scripts}test.sh /

EXPOSE 4005
Expand Down
Loading

0 comments on commit 88e566b

Please sign in to comment.