Trouble building Autoware Auto (which setup.bash to source?)
Hi. I am trying to build Autoware-Auto from source, following this guide.
I first installed ros2 foxy from source.
So now I have two directory that contains the ros2 files, and each have a setup.bash
file inside.
A: ~/ros2_foxy/install/setup.bash
and B: /opt/ros/foxy/setup.bash
When I only source A, Autoware-Auto build failes with this message:
~/AutowareAuto$ colcon build
Starting >>> autoware_auto_examples
--- stderr: autoware_auto_cmake
CMake Error at CMakeLists.txt:19 (find_package):
By not providing "Findament_cmake_auto.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"ament_cmake_auto", but CMake did not find one.
Could not find a package configuration file provided by "ament_cmake_auto"
with any of the following names:
ament_cmake_autoConfig.cmake
ament_cmake_auto-config.cmake
Add the installation prefix of "ament_cmake_auto" to CMAKE_PREFIX_PATH or
set "ament_cmake_auto_DIR" to a directory containing one of the above
files. If "ament_cmake_auto" provides a separate development package or
SDK, be sure it has been installed.
---
Failed <<< autoware_auto_cmake [0.13s, exited with code 1]
When I source only B, or source both A & B, build also failes with this message:
~/AutowareAuto$ colcon build
Found package configuration file:
~/ros2_foxy/install/ament_cmake_cpplint/share/ament_cmake_cpplint/cmake/ament_cmake_cpplintConfig.cmake
but it set ament_cmake_cpplint_FOUND to FALSE so package
"ament_cmake_cpplint" is considered to be NOT FOUND.
CMake Warning at CMakeLists.txt:58 (find_package):
Found package configuration file:
~/ros2_foxy/install/ament_cmake_cpplint/share/ament_cmake_cpplint/cmake/ament_cmake_uncrustifyConfig.cmake
but it set ament_cmake_uncrustify_FOUND to FALSE so package
"ament_cmake_uncrustify" is considered to be NOT FOUND.
~/AutowareAuto/src/common/autoware_auto_common/test/test_message_field_adapters.cpp:20:10: fatal error: geometry_msgs/msg/transform_stamped.hpp: No such file or directory
20 | #include <geometry_msgs/msg/transform_stamped.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
---
Failed <<< autoware_auto_common [14.8s, exited with code 2]
This is very weird, because I find that <geometry_msgs/msg/transform_stamped.hpp
exists in /opt/ros/foxy/include/geometry_msgs/msg/transform_stamped.hpp
.
You can find the CMakeLists.txt file here.
Why am I getting these build errors?