211 字
1 分钟

Arena 5.0 / Colcon build failures (Nav2, DWB, rosidl)

What broke#

Symptom A: Nav2/DWB fails with -Werror=maybe-uninitialized#

On the first colcon build after running bash install.sh in the repo root, 7 packages failed: nav2_constrained_smoother, nav2_smoother, nav2_planner, nav2_waypoint_follower, nav2_behaviors, dwb_critics and dwb_plugins.

The blocker was the toolchain treating warnings as errors, specifically -Werror=maybe-uninitialized.

Symptom B: partial rebuild fails with “Failed to find … package.sh”#

After the initial failure, trying to rebuild only Nav2 packages while their install prefixes were missing caused errors like:

  • “Failed to find … package.sh

Fix (exact sequence)#

Step 1: load the workspace environment#

Terminal window
cd ~/arena5_ws
source src/Arena/_meta/tools/source

Step 2 (optional): clean Nav2/DWB residues#

Do this if the install prefixes are missing, or if you want a clean forced rebuild for Nav2/DWB.

Terminal window
rm -rf build/nav2_* build/dwb_* install/nav2_* install/dwb_* log

Step 3 (only if needed): rebuild rosidl fundamentals#

If you see missing rosidl_cmake files (for example, it cannot find rosidl_generate_interfaces.cmake), clean rosidl and rebuild the rosidl baseline first:

Terminal window
rm -rf build/rosidl_* install/rosidl_* log
colcon build --symlink-install --event-handlers console_direct+ \
--packages-select rosidl_cmake rosidl_generator_c rosidl_generator_cpp \
rosidl_typesupport_introspection_c rosidl_typesupport_introspection_cpp \
rosidl_typesupport_fastrtps_c rosidl_typesupport_fastrtps_cpp \
rosidl_generator_py rosidl_generator_tests \
--cmake-args -DCMAKE_CXX_FLAGS="-Wno-error=maybe-uninitialized -Wno-error=uninitialized"

Step 4: rebuild Nav2 + DWB (allow warnings)#

Terminal window
colcon build --symlink-install --event-handlers console_direct+ \
--packages-up-to nav2_behaviors nav2_constrained_smoother nav2_planner \
nav2_smoother nav2_waypoint_follower dwb_critics dwb_plugins \
--cmake-args -DCMAKE_CXX_FLAGS="-Wno-error -Wno-error=maybe-uninitialized -Wno-error=uninitialized"

Result#

The build completed with:

  • Summary: 185 packages finished

Most remaining stderr output was lint / warning noise. The hard blockers (Nav2 + rosidl) were resolved.

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

Arena 5.0 / Colcon build failures (Nav2, DWB, rosidl)
https://blog.acegaruda.com/posts/social-nav-proj/arena50-build-issues/
作者
AceGaruda
发布于
2026-01-14
许可协议
CC BY-NC-SA 4.0

评论区

Profile Image of the Author
AceGaruda
Hello, I'm AceGaruda.
公告
欢迎来到我的博客!这是一则示例公告。
分类
标签
站点统计
文章
6
分类
3
标签
20
总字数
6,253
运行时长
0
最后活动
0 天前

目录