Issue: After recent ROS updates (I could not track down, but it happened after I did sudo apt upgrade), _pedsim_gazeboplugin is failing while building _pedsimros pkg.
Errors (not all but some of them included below):
In file included from /usr/include/ignition/math6/gz/math/Quaternion.hh:20, from /usr/include/ignition/math6/gz/math/Pose3.hh:20, from /usr/include/ignition/math6/ignition/math/Pose3.hh:18, from /usr/include/sdformat-9.8/sdf/Actor.hh:23, from /usr/include/sdformat-9.8/sdf/sdf.hh:2, from /usr/include/gazebo-11/gazebo/common/Plugin.hh:33, from /home/akmandor/test_ws/src/pedsim_ros/pedsim_gazebo_plugin/src/actor_poses_plugin.cpp:7: /usr/include/ignition/math6/gz/math/Helpers.hh:838:30: error: no matching function for call to ‘get<std::chrono::duration<long unsigned int, std::ratio<86400, 1> > >(std::tuple<std::chrono::duration<long unsigned int, std::ratio<86400, 1> >, std::chrono::duration<long int, std::ratio<3600, 1> >, std::chrono::duration<long int, std::ratio<60, 1> >, std::chrono::duration<long int, std::ratio<1, 1> >, std::chrono::duration<long int, std::ratio<1, 1000> > >&)’ 838 | std::get<Durations>(retval))))), 0)...};
In file included from /usr/include/gazebo-11/gazebo/physics/physics.hh:9, from /home/akmandor/test_ws/src/pedsim_ros/pedsim_gazebo_plugin/src/actor_poses_plugin.cpp:8: /usr/include/gazebo-11/gazebo/physics/Collision.hh:205:28: error: ‘optional’ in namespace ‘std’ does not name a template type 205 | public: virtual std::optional<sdf::SemanticPose> SDFSemanticPose()
/usr/include/sdformat-9.8/sdf/Param.hh:294:29: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’? 294 | else if constexpr (std::is_same_v<T, std::uint64_t>)
I solved the issue (based on this comment in another issue) by changing the compile options in CmakeLists of _pedsim_gazeboplugin to add_compile_options(-std=c++17).
System: Ubuntu 20.04 (ROS Noetic)
Issue: After recent ROS updates (I could not track down, but it happened after I did
sudo apt upgrade
), _pedsim_gazeboplugin is failing while building _pedsimros pkg.Errors (not all but some of them included below):
In file included from /usr/include/ignition/math6/gz/math/Quaternion.hh:20, from /usr/include/ignition/math6/gz/math/Pose3.hh:20, from /usr/include/ignition/math6/ignition/math/Pose3.hh:18, from /usr/include/sdformat-9.8/sdf/Actor.hh:23, from /usr/include/sdformat-9.8/sdf/sdf.hh:2, from /usr/include/gazebo-11/gazebo/common/Plugin.hh:33, from /home/akmandor/test_ws/src/pedsim_ros/pedsim_gazebo_plugin/src/actor_poses_plugin.cpp:7: /usr/include/ignition/math6/gz/math/Helpers.hh:838:30: error: no matching function for call to ‘get<std::chrono::duration<long unsigned int, std::ratio<86400, 1> > >(std::tuple<std::chrono::duration<long unsigned int, std::ratio<86400, 1> >, std::chrono::duration<long int, std::ratio<3600, 1> >, std::chrono::duration<long int, std::ratio<60, 1> >, std::chrono::duration<long int, std::ratio<1, 1> >, std::chrono::duration<long int, std::ratio<1, 1000> > >&)’ 838 | std::get<Durations>(retval))))), 0)...};
In file included from /usr/include/gazebo-11/gazebo/physics/physics.hh:9, from /home/akmandor/test_ws/src/pedsim_ros/pedsim_gazebo_plugin/src/actor_poses_plugin.cpp:8: /usr/include/gazebo-11/gazebo/physics/Collision.hh:205:28: error: ‘optional’ in namespace ‘std’ does not name a template type 205 | public: virtual std::optional<sdf::SemanticPose> SDFSemanticPose()
/usr/include/sdformat-9.8/sdf/Param.hh:294:29: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’? 294 | else if constexpr (std::is_same_v<T, std::uint64_t>)