Skip to content

Commit

Permalink
Added colcon build args for local builds (#5)
Browse files Browse the repository at this point in the history
* Fixed colcon build args

Signed-off-by: Cihat Kurtuluş Altıparmak <cihataltiparmak1@gmail.com>

* Added customized build option

Signed-off-by: CihatAltiparmak <cihataltiparmak1@gmail.com>

* Update README.md

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

---------

Signed-off-by: Cihat Kurtuluş Altıparmak <cihataltiparmak1@gmail.com>
Signed-off-by: CihatAltiparmak <cihataltiparmak1@gmail.com>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
  • Loading branch information
CihatAltiparmak and SteveMacenski authored Jan 27, 2025
1 parent 6f1d318 commit da700c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ RUN apt install cppzmq-dev ros-${ROS_DISTRO}-ros-gz -y --no-install-recommends -

# For distribution of Nav2
ARG BUILD=true
ARG COLCON_BUILD_ARGS=""
RUN if [ "${BUILD}" = "true" ]; then \
. /opt/ros/${ROS_DISTRO}/setup.sh && colcon build; \
. /opt/ros/${ROS_DISTRO}/setup.sh && colcon build $COLCON_BUILD_ARGS; \
fi

WORKDIR /root/nav2_ws
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ If you do NOT want to build Nav2 for distribution with the container (setup for

Occasionally, may need to update the base and rebuild when it diverges significantly.

Additionally, if you want to build with customized arguments, you can add your build arguments as in the example `--build-arg COLCON_BUILD_ARGS="--symlink-install"`.

```
sudo docker pull osrf/ros:${ROS_DISTRO}-desktop-full
sudo docker build -t ros-navigation/nav2_docker:local -f Dockerfile .
Expand Down

0 comments on commit da700c0

Please sign in to comment.