Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Building gazebo_ros_pkgs on Ubuntu 21.10

Hello all,

I am following the tutorial found here to install ROS-Noetic from source as it is not officially supported for Ubuntu 21.10. I can install ros-desktop without a problem, however I need the gazebo plugin found in gazebo-ros-pkgs, which is included in ros-desktop-full.

All is well until it comes time for the gazebo_ros package to be installed. I received errors such as the following:

/usr/include/ignition/math6/ignition/math/Helpers.hh:813:30: error: type/value mismatch at argument 1 in template parameter list for ‘template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr const _Tp& std::get(const std::array<_Tp, _Nm>&)’

and

/usr/include/gazebo-11/gazebo/physics/PhysicsEngine.hh:275:23: note: ‘std::any_cast’ is only available from C++17 onwards

There are tons of these errors but they are similar, so it would be too much to post here. I suspect I have to tell CMAKE or catkin to use C++17 but I am not sure how to do that, I've looked through all the CMakeLists.txt files in the gazebo_ros_pkgs folder and cannot find a way to set CXX_FLAGS.

I've also tried to follow this tutorial, and tried to build it separately and copying the gazebo_ros_pkgs folder and replacing the one in the ROS Noetic build tutorial, same result.

I already have gazebo-11 running with ardupilot, which was a pain, so I would like to keep this installation and do not have time for a reinstall of another version of Ubuntu, gazebo, ros, ardupilot, etc.

Any help is appreciated, thank you.