Closed ggiulian closed 3 years ago
Did you run rosdep install -r --from-paths src -i -y --rosdistro galactic
as instructed in the README? It looks like you're missing ros-galactic-nav-msgs
.
Yes,all rosdeps are installed
Our latest CI for Edifice + Galactic compiles and passes all tests:
https://github.com/ignitionrobotics/ros_ign/runs/3356214523?check_suite_focus=true
It also works for me locally.
So I think it's probably an issue with your workspace. Here are the steps followed by CI as a reference:
https://github.com/ignitionrobotics/ros_ign/blob/ros2/.github/workflows/build-and-test.sh
Sorry, which workspace? ROS2 or ROS_IGN?
One of them :slightly_smiling_face:
Did you install nav-msgs
from source or binaries? That seems to be the problematic package.
From source
Also in the test_utils.hpp I tried to omit the #include <nav_msgs/msg/odometry.hpp>
and I encountered the same build error but in the sensor_msgs/msg/battery_state.hpp
package. So I think there are other problematic packages
From source
My guess is that you probably have a bad combination of branches or sourced workspaces.
Since I'm unable to reproduce the issue and this also works on our automated testing, this seems to be a local problem with your setup. I'll close this issue and suggest you follow up at https://answers.gazebosim.org/.
The same thing just happened to me. The only difference is that I'm using ROS Foxy and Ignition Citadel.
The problem seems to be occuring during test compilation. For me, after adding --cmake-args -DBUILD_TESTING=OFF
in colcon build
, the bridge compiles and seems to be working just fine. So, IMHO that might be something with CMake of the test, since the include from convert.hpp
works and the one from test_utils.hpp
don't. I still need to study more ament and take a deeper look in the CMakeLists.txt
to see if I can understand why this happens. Also, I believe that most people use binary installation and for some reason, this problem doesn't occur there. CI is assuming binary installation as well, isn't it @chapulina? @ggiulian were you able to manage this situation in some other way?
It worked for me, I can tell you the steps I took. Before the build, in a new terminal:
source /opt/ros/galactic/setup.bash
cd ~/ros_ign_ws
source ~/edifice_ws/install/local_setup.bash
colcon build
Following this steps, it works for me. I agree that many use binary installation, so they don't notice this problem
Environment
Following the documentation released here: https://github.com/ignitionrobotics/ros_ign/tree/ros2, the build fails with a fatal error when trying to build the ros_ign_bridge. In particular it cannot find the nav_msgs / msg / odometry.hpp file or directory. The file in question, however, appears to be present in the ROS2 Galactic workspace. The error is present in the test_utils.hpp