You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
straversaro@IITICUBLAP102:~$ apt list --installed | grep math4
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libignition-math4-dev/focal,now 4.0.0+dfsg1-5ubuntu1 amd64 [installed]
libignition-math4/focal,now 4.0.0+dfsg1-5ubuntu1 amd64 [installed,automatic]
Description
Expected behavior: IGNITION_MATH_MAJOR_VERSION is a macro expected to have the integer value of the major version of ignition math.
Actual behavior: For IgnMath4, that macro is empty
Steps to reproduce
Just run cat /usr/include/ignition/math4/ignition/math/config.hh and inspect the output.
Output
straversaro@IITICUBLAP102:~$ cat /usr/include/ignition/math4/ignition/math/config.hh
/* Config.hh. Generated by CMake for ignition-math. */
/* Version number */
#define IGNITION_MATH_MAJOR_VERSION
#define IGNITION_MATH_MINOR_VERSION
#define IGNITION_MATH_PATCH_VERSION
#define IGNITION_MATH_VERSION "4.0"
#define IGNITION_MATH_VERSION_FULL "4.0.0"
#define IGNITION_MATH_VERSION_NAMESPACE v4
#define IGNITION_MATH_VERSION_HEADER "Ignition math, version 4.0.0\nCopyright (C) 2014 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n"
/* #undef IGNITION_MATH_BUILD_TYPE_PROFILE */
/* #undef IGNITION_MATH_BUILD_TYPE_DEBUG */
/* #undef IGNITION_MATH_BUILD_TYPE_RELEASE */
The text was updated successfully, but these errors were encountered:
A bit of background: the issue was fixed for ign-math >= 6 in #151 . However, another major change of ign-math6 w.r.t. to ign-math4 was the semantics of Pose3::operator*, see https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-math/pull-requests/301/page/1 and #60 for some background. For this reason, if you need to have a plugin that uses Pose3::operator* and you want that it works fine both with Gazebo 9 (EOL: Jan 2023) and Gazebo 11 (EOL: Jan 2025), you need to have some logic like:
but it turns out that this results in a compilation error:
/home/gnava/Software/github/dic-iit/component_ironcub/software/gazebo/plugins/jets-plugin/jets-plugin.cc:595:41: error: operator '>=' has no left operand
595 | #if IGNITION_MATH_MAJOR_VERSION >= 5
| ^~
due to the issue described in this issue.
If anyone is affected by the same problem, as long as you are compiling a Gazebo plugin you can rely on the fact that Gazebo 9 uses ign-math4 and Gazebo 11 uses ign-math6, and so you can just use the GAZEBO_MAJOR_VERSION as a proxy for the ign-math version, i.e. this will work fine:
Environment
Description
IGNITION_MATH_MAJOR_VERSION
is a macro expected to have the integer value of the major version of ignition math.Steps to reproduce
Just run
cat /usr/include/ignition/math4/ignition/math/config.hh
and inspect the output.Output
The text was updated successfully, but these errors were encountered: