grvcTeam / grvc-ual

An abstraction layer for unmanned aerial vehicles
MIT License
50 stars 24 forks source link

Error compiling SITL - fatal error: ignition/math/Inertial.hh: No such file or directory #53

Closed Bardo91 closed 5 years ago

Bardo91 commented 5 years ago

I have a compile error while compiling the Firmware. It is related with some gazebo msgs.

[ 58%] Building CXX object CMakeFiles/rotors_gazebo_controller_interface.dir/src/gazebo_controller_interface.cpp.o
In file included from /usr/include/gazebo-7/gazebo/gazebo_core.hh:21:0,
                 from /usr/include/gazebo-7/gazebo/gazebo.hh:20,
                 from /home/bardo91/programming/catkin_grvc/src/Firmware/Tools/sitl_gazebo/include/gazebo_imu_plugin.h:27,
                 from /home/bardo91/programming/catkin_grvc/src/Firmware/Tools/sitl_gazebo/src/gazebo_imu_plugin.cpp:21:
/usr/include/gazebo-7/gazebo/msgs/msgs.hh:24:37: fatal error: ignition/math/Inertial.hh: No such file or directory
compilation terminated.
CMakeFiles/rotors_gazebo_imu_plugin.dir/build.make:62: recipe for target 'CMakeFiles/rotors_gazebo_imu_plugin.dir/src/gazebo_imu_plugin.cpp.o' failed
make[7]: *** [CMakeFiles/rotors_gazebo_imu_plugin.dir/src/gazebo_imu_plugin.cpp.o] Error 1
CMakeFiles/Makefile2:220: recipe for target 'CMakeFiles/rotors_gazebo_imu_plugin.dir/all' failed
make[6]: *** [CMakeFiles/rotors_gazebo_imu_plugin.dir/all] Error 2
make[6]: *** Waiting for unfinished jobs....
In file included from /usr/include/gazebo-7/gazebo/gazebo_core.hh:21:0,
                 from /usr/include/gazebo-7/gazebo/gazebo.hh:20,
                 from /home/bardo91/programming/catkin_grvc/src/Firmware/Tools/sitl_gazebo/include/gazebo_mavlink_interface.h:34,
                 from /home/bardo91/programming/catkin_grvc/src/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp:22:
/usr/include/gazebo-7/gazebo/msgs/msgs.hh:24:37: fatal error: ignition/math/Inertial.hh: No such file or directory
compilation terminated.
In file included from /usr/include/gazebo-7/gazebo/gazebo_core.hh:21:0,
                 from /usr/include/gazebo-7/gazebo/gazebo.hh:20,
                 from /home/bardo91/programming/catkin_grvc/src/Firmware/Tools/sitl_gazebo/include/gazebo_controller_interface.h:26,
                 from /home/bardo91/programming/catkin_grvc/src/Firmware/Tools/sitl_gazebo/src/gazebo_controller_interface.cpp:22:
/usr/include/gazebo-7/gazebo/msgs/msgs.hh:24:37: fatal error: ignition/math/Inertial.hh: No such file or directory
compilation terminated.
CMakeFiles/rotors_gazebo_mavlink_interface.dir/build.make:62: recipe for target 'CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o' failed
make[7]: *** [CMakeFiles/rotors_gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/rotors_gazebo_mavlink_interface.dir/all' failed
make[6]: *** [CMakeFiles/rotors_gazebo_mavlink_interface.dir/all] Error 2
CMakeFiles/rotors_gazebo_controller_interface.dir/build.make:62: recipe for target 'CMakeFiles/rotors_gazebo_controller_interface.dir/src/gazebo_controller_interface.cpp.o' failed
make[7]: *** [CMakeFiles/rotors_gazebo_controller_interface.dir/src/gazebo_controller_interface.cpp.o] Error 1
CMakeFiles/Makefile2:146: recipe for target 'CMakeFiles/rotors_gazebo_controller_interface.dir/all' failed
make[6]: *** [CMakeFiles/rotors_gazebo_controller_interface.dir/all] Error 2
In file included from /usr/include/gazebo-7/gazebo/gazebo_core.hh:21:0,
                 from /usr/include/gazebo-7/gazebo/gazebo.hh:20,
                 from /home/bardo91/programming/catkin_grvc/src/Firmware/Tools/sitl_gazebo/include/gazebo_motor_model.h:27,
                 from /home/bardo91/programming/catkin_grvc/src/Firmware/Tools/sitl_gazebo/src/gazebo_motor_model.cpp:22:
/usr/include/gazebo-7/gazebo/msgs/msgs.hh:24:37: fatal error: ignition/math/Inertial.hh: No such file or directory
compilation terminated.
CMakeFiles/rotors_gazebo_motor_model.dir/build.make:62: recipe for target 'CMakeFiles/rotors_gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o' failed
make[7]: *** [CMakeFiles/rotors_gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o] Error 1
CMakeFiles/Makefile2:183: recipe for target 'CMakeFiles/rotors_gazebo_motor_model.dir/all' failed
make[6]: *** [CMakeFiles/rotors_gazebo_motor_model.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make[5]: *** [all] Error 2
platforms/posix/CMakeFiles/sitl_gazebo.dir/build.make:112: recipe for target 'external/Stamp/sitl_gazebo/sitl_gazebo-build' failed
make[4]: *** [external/Stamp/sitl_gazebo/sitl_gazebo-build] Error 2
CMakeFiles/Makefile2:10751: recipe for target 'platforms/posix/CMakeFiles/sitl_gazebo.dir/all' failed
make[3]: *** [platforms/posix/CMakeFiles/sitl_gazebo.dir/all] Error 2
CMakeFiles/Makefile2:19384: recipe for target 'platforms/posix/CMakeFiles/gazebo.dir/rule' failed
make[2]: *** [platforms/posix/CMakeFiles/gazebo.dir/rule] Error 2
Makefile:6385: recipe for target 'gazebo' failed
make[1]: *** [gazebo] Error 2
Makefile:147: recipe for target 'posix_sitl_default' failed
make: *** [posix_sitl_default] Error 2
Bardo91 commented 5 years ago

As advised in https://github.com/PX4/Firmware/issues/5773, it is related with a missing package in Gazebo7. It is solved by installing libignition math 2

sudo apt-get install libignition-math2-dev
zijinoier commented 4 years ago

thx

shubham-shahh commented 3 years ago

As advised in PX4/PX4-Autopilot#5773, it is related with a missing package in Gazebo7. It is solved by installing libignition math 2

sudo apt-get install libignition-math2-dev

On ubuntu 20.04 I encountered the following error Package libignition-math2-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libignition-math2-dev' has no installation candidate

arturotorresg commented 3 years ago

As advised in PX4/PX4-Autopilot#5773, it is related with a missing package in Gazebo7. It is solved by installing libignition math 2

sudo apt-get install libignition-math2-dev

On ubuntu 20.04 I encountered the following error Package libignition-math2-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libignition-math2-dev' has no installation candidate

This issue happened on Ubuntu 16.04 with ROS Kinetic and Gazebo 7. I would not assume that this could solve a similar issue on Ubuntu 20.04 and Gazebo 11.

v-xchen-v commented 7 months ago

sudo apt-get install libignition-math4-dev