Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catkin make vs build #92

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ TODO
- [For versions >= `v2.5.0`] Added rust support for all ROS distributions. Also, fixed bug #79 that was introduced in `v2.3.0`.
- [For versions >= `v2.5.1`] Now deleting all problematic locks instead of just the oldest and fixed #85 (exec locks daemon bug).
- [For versions >= `v2.5.2`] Fixed a bug that was introduced in `v2.4.0` where `rosez` and `rosezm` could get mixed up when used simultaneously (issue #88).
- [For versions >= `v2.5.3`] Added the ability to distinguish between `catkin_make` and `catkin build` workspaces in ROS1. Also, now using the `RelWithDebInfo` flag for all build commands.
20 changes: 18 additions & 2 deletions internal/entrypoint.bash
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,26 @@ if [ "$rosversion" != "unknown" ]; then
intermediate_error_handler $?
else
if [ $skip_compilation -ne 1 ]; then
script --flush --quiet --return /tmp/rosez-build-output.txt --command "catkin_make" | tee /dev/fd/2
catkin_tool="catkin_make"
cmake_extras="--cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo"
built_by_file=/opt/ros/"$bl"/build/.built_by
if [[ -f "$built_by_file" ]]; then
built_by=$(cat $built_by_file)
if [[ "$built_by" == "catkin_make" || "$built_by" == "catkin build" ]]; then
catkin_tool="$built_by"
else
echo -e "${colour_orange}${bl}: No catkin tool (catkin_make/catkin build) could be detected. Defaulting to catkin_make...$colour_end"
fi
fi
script --flush --quiet --return /tmp/rosez-build-output.txt --command "$catkin_tool $cmake_extras" | tee /dev/fd/2
intermediate_error_handler $?
fi
. /opt/ros/$bl/devel/setup.bash
devel_setup_file="/opt/ros/$bl/devel/setup.bash"
if [[ -f "$devel_setup_file" ]]; then
. "$devel_setup_file"
else
echo -e "${colour_orange}${bl}: No setup.bash file was found under devel. Continuing without sourcing the workspace...$colour_end"
fi
intermediate_error_handler $?
fi
done </opt/ros/$wstxt
Expand Down
2 changes: 2 additions & 0 deletions internal/ros2_foxy_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ RUN apt-get update --allow-insecure-repositories && apt-get install -y curl && c
git \
gdb \
vim \
wget \
curl \
xterm \
valgrind \
pulseaudio \
Expand Down
1 change: 1 addition & 0 deletions internal/ros2_humble_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN mkdir -p /opt/ros/ros2_ws/src && apt-get update && apt-get full-upgrade -y &
git \
gdb \
vim \
wget \
curl \
xterm \
valgrind \
Expand Down
1 change: 1 addition & 0 deletions internal/ros2_jazzy_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN mkdir -p /opt/ros/ros2_ws/src && apt-get update && apt-get full-upgrade -y &
git \
gdb \
vim \
wget \
curl \
xterm \
libgl1 \
Expand Down
2 changes: 2 additions & 0 deletions internal/ros_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN mkdir -p /opt/ros/catkin_ws/src && apt-get update && apt-get full-upgrade -y
git \
gdb \
vim \
wget \
curl \
xterm \
valgrind \
Expand All @@ -47,6 +48,7 @@ libgl1-mesa-glx \
ros-noetic-amcl \
ros-noetic-moveit \
python3-catkin-pkg \
python3-catkin-tools \
ros-noetic-move-base \
ros-noetic-navigation \
ros-noetic-gazebo-ros \
Expand Down
2 changes: 2 additions & 0 deletions internal/ros_melodic_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN mkdir -p /opt/ros/catkin_ws/src && apt-get update && apt-get full-upgrade -y
git \
gdb \
vim \
wget \
curl \
xterm \
valgrind \
Expand All @@ -45,6 +46,7 @@ ros-melodic-amcl \
python-catkin-pkg \
python-catkin-lint \
ros-melodic-moveit \
python-catkin-tools \
ros-melodic-move-base \
ros-melodic-navigation \
ros-melodic-gazebo-ros \
Expand Down