-
Notifications
You must be signed in to change notification settings - Fork 987
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
Issues with building MAVROS with ROS2 humble in Docker Container #1941
Comments
Have you done that:
|
Hey, Build ROS dependencyecho "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc sudo apt-get update MAVROSrosdep update && rosdep install -y -i --from-paths src I have tried many things now so sorry if the commands are a bit cluttered :) I also noticed that running this line: rosdep install --from-paths ${ROS_WORKSPACE} --ignore-src --rosdistro=${ROSDISTRO} rosdep install --from-paths ${ROS_WORKSPACE} --ignore-src --rosdistro=${ROSDISTRO} I'm definitely doing something wrong here but I can't figure out what. |
Try to complete this instructins in a new workspace: https://github.com/mavlink/mavros/tree/ros2/mavros#source-installation Do not forget to |
Unfortunately, this did not change the outcome, I ran the exact same commands as this tutorial and the issue still persists. In my docker file |
I should also add, I had to build ROS2 Humble on Ubuntu 20.04 for the Isaac ros pkgs. This might have some effect. |
Just do all the steps manually first. Simply That's my "ros-in-docker.txt", which works pretty fine:
|
This is only bug and feature tracker, please use it
to report bugs or request features.
Issue details
Hi,
I'm sorry if this has been mentioned before but I am consistently running into the same problem when trying to colcon build the MAVROS package. I am running ROS2 humble in a Docker container and everytime I try to colcon build the packages in my src folder the MAVROS package fails with the following error:
Starting >>> mavros
--- stderr: mavros
CMake Warning at /usr/src/gtest/CMakeLists.txt:54 (project):
VERSION keyword not followed by a value or was followed by a value that
expanded to nothing.
CMake Deprecation Warning at /usr/src/gtest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning at /opt/ros/humble/share/ament_cmake_gmock/cmake/ament_cmake_gmock-extras.cmake:118 (message):
'gmock' not found, C++ tests using 'Google Mock' can not be built. Please
install the 'Google Mock' headers globally in your system to enable these
tests (e.g. on Ubuntu/Debian install the package 'google-mock') or get the
ament package 'gmock_vendor'
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:50 (_ament_cmake_gmock_find_gmock)
CMakeLists.txt:254 (ament_add_gmock)
CMake Error at CMakeLists.txt:255 (target_link_libraries):
Cannot specify link libraries for target "mavros-router-test" which is not
built by this project.
Failed <<< mavros [1.23s, exited with code 1]
Maybe I am clearly just missing something simple but I would really appreciate some help. The link library "mavros-router-test" keeps causing problems for me. Note, I have managed to install this in the past with ROS1 noetic without issues, but the install for ROS2 humble is more of a struggle. Are there install instructions that are updated for ROS2 humble, the current ones seem to only use catkin.
My current install process is:
sudo apt install -y python3-vcstool python3-rosinstall-generator python3-osrf-pycommon
rosinstall_generator --format repos mavlink | tee /tmp/mavlink.repos
rosinstall_generator --format repos --upstream mavros | tee -a /tmp/mavros.repos
vcs import src < /tmp/mavlink.repos
vcs import src < /tmp/mavros.repos
rosdep install --from-paths src --ignore-src -y
sudo ./src/mavros/mavros/scripts/install_geographiclib_datasets.sh
colcon build --packages-select mavros mavlink
Then the error occurs...
Thank you in advance!
MAVROS version and platform
Mavros: latest ros2 branch
ROS: Humble
Ubuntu: 20.04
Autopilot type and version
[ X] ArduPilot
[ ] PX4
The text was updated successfully, but these errors were encountered: