Dependency to geographic_msgs not found when building Autoware in an environment of locally-built ROS 2 #3802
lorenzzhao
started this conversation in
General
Replies: 2 comments 6 replies
-
Did you execute |
Beta Was this translation helpful? Give feedback.
4 replies
-
@lorenzzhao, @kminoda, did you find a solution to this issue? I am facing a very similar issue, failing at |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to build Autoware in an environment of a locally-built ROS 2, rather than in the environment of the ROS 2 distribution as installed by the autoware/setup-dev-env.sh script. In other words, I don't source the ROS 2 installation's setup.bash script:
source /opt/ros/humble/setup.bash
but rather I source the setup.bash script of my local (from-source-built) ROS 2 workspace:
source ~/Desktop/my_ros/ros2_humble/install/setup.bash
.The Autoware's colcon build command then leads to the following build error:
CMake Error at /home/lzh/Desktop/my_ros/ros2_humble/install/rosidl_cmake/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:162 (message): rosidl_generate_interfaces() the passed dependency 'geographic_msgs' has not been found before using find_package()
I am working on Ubuntu 22.04. Building Autoware in the environment of the ROS 2 distribution as installed by the autoware/setup-dev-env.sh script (i. e. after performing
source /opt/ros/humble/setup.bash
) succeeds.My local (from-source-built) ROS 2 seems to be ok, as the ROS 2 tests (
colcon test
) succeed.Here are the exacts steps that lead to the build error:
colcon test
-> succeeds./setup-dev-env.sh
I removed the linesource /opt/ros/humble/setup.bash
from ~/.bashrc because I don't want the ROS 2 installation in /opt/ros/humble/ to be sourced as workspacesource ~/Desktop/my_ros/ros2_humble/install/setup.bash
, instead of sourcing the setup.bash from the ROS 2 distribution as installed by the autoware/setup-dev-env.sh (source /opt/ros/humble/setup.bash
)-> Now the colcon build command to build Autoware (
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
) leads to an error, the full output is:`~/Desktop/autoware$ colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> autoware_lint_common
Starting >>> autoware_auto_geometry_msgs
Starting >>> autoware_auto_mapping_msgs
Starting >>> tier4_debug_msgs
Starting >>> autoware_common_msgs
Starting >>> autoware_planning_msgs
Starting >>> autoware_adapi_v1_msgs
Starting >>> autoware_auto_control_msgs
Starting >>> tier4_planning_msgs
Starting >>> tier4_map_msgs
Starting >>> autoware_auto_system_msgs
Starting >>> tier4_v2x_msgs
Starting >>> tier4_rtc_msgs
Starting >>> tier4_external_api_msgs
Starting >>> autoware_map_msgs
Starting >>> boost_io_context
--- stderr: tier4_map_msgs
CMake Error at /home/lzh/Desktop/my_ros/ros2_humble/install/rosidl_cmake/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:162 (message):
rosidl_generate_interfaces() the passed dependency 'geographic_msgs' has
not been found before using find_package()
Call Stack (most recent call first):
CMakeLists.txt:7 (rosidl_generate_interfaces)
Failed <<< tier4_map_msgs [3.62s, exited with code 1]
Aborted <<< autoware_adapi_v1_msgs [11.3s]
Aborted <<< autoware_common_msgs [17.9s]
Aborted <<< autoware_auto_geometry_msgs [19.1s]
Aborted <<< tier4_v2x_msgs [20.7s]
Aborted <<< boost_io_context [20.7s]
Aborted <<< autoware_lint_common [20.9s]
Aborted <<< autoware_auto_mapping_msgs [20.9s]
Aborted <<< autoware_auto_control_msgs [20.9s]
Aborted <<< autoware_auto_system_msgs [24.7s]
Aborted <<< autoware_planning_msgs [25.8s]
Aborted <<< autoware_map_msgs [26.0s]
Aborted <<< tier4_rtc_msgs [26.3s]
Aborted <<< tier4_debug_msgs [26.7s]
Aborted <<< tier4_planning_msgs [48.8s]
Aborted <<< tier4_external_api_msgs [1min 2s]
Summary: 0 packages finished [1min 3s]
1 package failed: tier4_map_msgs
15 packages aborted: autoware_adapi_v1_msgs autoware_auto_control_msgs autoware_auto_geometry_msgs autoware_auto_mapping_msgs autoware_auto_system_msgs autoware_common_msgs autoware_lint_common autoware_map_msgs autoware_planning_msgs boost_io_context tier4_debug_msgs tier4_external_api_msgs tier4_planning_msgs tier4_rtc_msgs tier4_v2x_msgs
3 packages had stderr output: autoware_adapi_v1_msgs boost_io_context tier4_map_msgs
294 packages not processed`
Can anyone help to solve this build error?
Beta Was this translation helpful? Give feedback.
All reactions