docker build requires the user to first manually pull the base image (ROS problem)
after pulling the base image first and building the container, the build process fails due to an openscad dependancy error
gaspers@reconcycle-dev2:~/Desktop/urdfstp/urdf-from-step-docker$ docker build -t urdf-from-step .
[+] Building 0.7s (24/49) docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 3.33kB 0.0s
=> [internal] load metadata for docker.io/library/ros:noetic-ros-core-focal 0.0s
=> [ 1/47] FROM docker.io/library/ros:noetic-ros-core-focal 0.0s
=> CACHED [ 2/47] RUN set -ex; apt update && apt install -y python3-pip screen vi 0.0s
=> CACHED [ 3/47] RUN apt-get install -y wget git build-essential libgl1-mesa-dev libfreetype6-de 0.0s
=> CACHED [ 4/47] RUN dpkg-reconfigure --frontend noninteractive tzdata 0.0s
=> CACHED [ 5/47] WORKDIR /opt/build 0.0s
=> CACHED [ 6/47] RUN wget 'https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=fecb0 0.0s
=> CACHED [ 7/47] RUN tar -zxvf occt-fecb042.tar.gz >> extracted_occt753_files.txt 0.0s
=> CACHED [ 8/47] RUN mkdir occt-fecb042/build 0.0s
=> CACHED [ 9/47] WORKDIR /opt/build/occt-fecb042/build 0.0s
=> CACHED [10/47] RUN ls /usr/include 0.0s
=> CACHED [11/47] RUN cmake -G Ninja -DINSTALL_DIR=/opt/build/occt753 -DBUILD_RELEASE_DISABLE_E 0.0s
=> CACHED [12/47] RUN ninja install 0.0s
=> CACHED [13/47] RUN echo "/opt/build/occt753/lib" >> /etc/ld.so.conf.d/occt.conf 0.0s
=> CACHED [14/47] RUN ldconfig 0.0s
=> CACHED [15/47] RUN ls /opt/build/occt753 0.0s
=> CACHED [16/47] RUN ls /opt/build/occt753/lib 0.0s
=> CACHED [17/47] WORKDIR /opt/build 0.0s
=> CACHED [18/47] RUN git clone https://github.com/tpaviot/pythonocc-core 0.0s
=> CACHED [19/47] WORKDIR /opt/build/pythonocc-core 0.0s
=> CACHED [20/47] WORKDIR /opt/build/pythonocc-core/build 0.0s
=> ERROR [21/47] RUN cmake -DOCE_INCLUDE_PATH=/opt/build/occt753/include/opencascade -DOCE_LIB_ 0.6s
------
> [21/47] RUN cmake -DOCE_INCLUDE_PATH=/opt/build/occt753/include/opencascade -DOCE_LIB_PATH=/opt/build/occt753/lib -DPYTHONOCC_BUILD_TYPE=Release ..:
0.299 -- The C compiler identification is GNU 9.4.0
0.346 -- The CXX compiler identification is GNU 9.4.0
0.350 -- Check for working C compiler: /usr/bin/cc
0.380 -- Check for working C compiler: /usr/bin/cc -- works
0.381 -- Detecting C compiler ABI info
0.409 -- Detecting C compiler ABI info - done
0.414 -- Detecting C compile features
0.414 -- Detecting C compile features - done
0.416 -- Check for working CXX compiler: /usr/bin/c++
0.448 -- Check for working CXX compiler: /usr/bin/c++ -- works
0.449 -- Detecting CXX compiler ABI info
0.481 -- Detecting CXX compiler ABI info - done
0.486 -- Detecting CXX compile features
0.486 -- Detecting CXX compile features - done
0.492 -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
0.584 -- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter Development
0.584 -- Python3 interpreter:/usr/bin/python3.8
0.584 -- Python include directory: /usr/include/python3.8
0.584 -- Python library release: /usr/lib/x86_64-linux-gnu/libpython3.8.so
0.589 CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
0.589 Could NOT find SWIG: Found unsuitable version "4.0.1", but required is at
0.589 least "4.1.1" (found /usr/bin/swig4.0)
0.589 Call Stack (most recent call first):
0.589 /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:391 (_FPHSA_FAILURE_MESSAGE)
0.589 /usr/share/cmake-3.16/Modules/FindSWIG.cmake:64 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
0.589 CMakeLists.txt:118 (find_package)
0.589
0.589
0.589 -- Configuring incomplete, errors occurred!
0.589 See also "/opt/build/pythonocc-core/build/CMakeFiles/CMakeOutput.log".
------
Dockerfile:65
--------------------
64 |
65 | >>> RUN cmake \
66 | >>> -DOCE_INCLUDE_PATH=/opt/build/occt753/include/opencascade \
67 | >>> -DOCE_LIB_PATH=/opt/build/occt753/lib \
68 | >>> -DPYTHONOCC_BUILD_TYPE=Release \
69 | >>> ..
70 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cmake -DOCE_INCLUDE_PATH=/opt/build/occt753/include/opencascade -DOCE_LIB_PATH=/opt/build/occt753/lib -DPYTHONOCC_BUILD_TYPE=Release .." did not complete successfully: exit code: 1
#### 2.2. Docker pull approach
- When running `docker run -v ~/input_step_files:/input_step_files -v ~/output_ros_urdf_packages:/output_ros_urdf_packages --rm ghcr.io/reconcycle/urdf-from-step:latest roslaunch urdf_from_step build_urdf_from_step.launch step_file_path:="/input_step_files/robot_arm.step" urdf_package_name:="robot_arm"` it throws this error:
```bash
gaspers@reconcycle-dev2:~/Desktop$ docker run -v ~/input_step_files:/input_step_files -v ~/output_ros_urdf_packages:/output_ros_urdf_packages --rm ghcr.io/reconcycle/urdf-from-step:latest roslaunch urdf_from_step build_urdf_from_step.launch step_file_path:="/input_step_files/robot_arm.step" urdf_package_name:="robot_arm"
[INFO] [1697632983.689546]: Creating ROS package:
[INFO] [1697632983.689889]: robot_arm
Traceback (most recent call last):
File "/ros_ws/devel/lib/urdf_from_step/create_urdf.py", line 15, in <module>
exec(compile(fh.read(), python_script, 'exec'), context)
File "/ros_ws/src/urdf_from_step/scripts/create_urdf.py", line 514, in <module>
createPackageROS(package_name,output_folder_path)
File "/ros_ws/src/urdf_from_step/scripts/create_urdf.py", line 435, in createPackageROS
create_package_files(target_path=package_path,
File "/usr/lib/python3/dist-packages/catkin_pkg/package_templates.py", line 216, in create_package_files
_safe_write_files(newfiles, target_path)
File "/usr/lib/python3/dist-packages/catkin_pkg/package_templates.py", line 177, in _safe_write_files
raise ValueError('File exists: %s' % target_file)
ValueError: File exists: /output_ros_urdf_packages/robot_arm/package.xml
================================================================================REQUIRED process [urdf_creator-2] has died!
process has died [pid 186, exit code 1, cmd /ros_ws/devel/lib/urdf_from_step/create_urdf.py __name:=urdf_creator __log:=/root/.ros/log/e044f768-6db3-11ee-93a9-0242ac110003/urdf_creator-2.log].
log file: /root/.ros/log/e044f768-6db3-11ee-93a9-0242ac110003/urdf_creator-2*.log
Initiating shutdown!
================================================================================
... logging to /root/.ros/log/e044f768-6db3-11ee-93a9-0242ac110003/roslaunch-6111bb242b6c-1.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://6111bb242b6c:45209/
SUMMARY
========
PARAMETERS
* /rosdistro: noetic
* /rosversion: 1.15.14
* /urdf_creator/output_folder_path: /output_ros_urdf_...
* /urdf_creator/step_file_path: /input_step_files...
* /urdf_creator/urdf_package_name: robot_arm
NODES
/
urdf_creator (urdf_from_step/create_urdf.py)
auto-starting new master
process[master]: started with pid [111]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to e044f768-6db3-11ee-93a9-0242ac110003
process[rosout-1]: started with pid [183]
started core service [/rosout]
process[urdf_creator-2]: started with pid [186]
[urdf_creator-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
After this process crashes, the /output_ros_urdf_packages/ directory is empty and i cannot continue the installation process
1. Installation manual
2. Instalation process
2.1. Docker build approach
After this process crashes, the
/output_ros_urdf_packages/
directory is empty and i cannot continue the installation process