gazebosim/sdformat

Compile error in the World.cc of sdformat12-12.6.0

Closed this issue · 1 comments

Hi I tried to build sdformat12-12.6.0 with ignition-math6-6.8 as specified in the cmake file. but, it occurred compile error as following.

I think SufaceType is enum and your code convert it to reference of string in this line. so, error occurred.

Can you please look into this issue?

Environment

  • OS Version: Ubuntu-20.04
  • Source or binary build? 12.6.0 1ee5f07

Description

  • Expected behavior: Should build successfully
  • Actual behavior:
| /home/bchoi/nvidia-yocto-bsp/bchoi-build/tmp/work/armv8a-oe4t-linux/sdformat12/12.6.0-r0/git/src/World.cc: In member function 'sdf::v12::ElementPtr sdf::v12::World::ToElement(const sdf::v12::OutputConfig&) const':
| /home/bchoi/nvidia-yocto-bsp/bchoi-build/tmp/work/armv8a-oe4t-linux/sdformat12/12.6.0-r0/git/src/World.cc:893:55: error: cannot convert 'ignition::math::v6::SphericalCoordinates::SurfaceType' to 'const string&' {aka 'const std::__cxx11::basic_string<char>&'}
|   893 |           this->dataPtr->sphericalCoordinates->Surface()));
|       |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

Steps to reproduce

Output

The conversion was added in gazebosim/gz-math#235 and was released in ign-math6 6.9.0. So you'll need that version to compile.

The version in the SDFormat CMakeLists should have been 6.9, but it's not something we can fix now. Sdformat has since been updated and now requires ign-math6 6.13.0 or newer.