diff --git a/include/gz/msgs/Utility.hh b/include/gz/msgs/Utility.hh index cdc1d030..fd8ebc32 100644 --- a/include/gz/msgs/Utility.hh +++ b/include/gz/msgs/Utility.hh @@ -222,7 +222,7 @@ namespace gz /// \brief Convert a gz::math::SphericalCoordinates::CoordinateType /// to a msgs::SphericalCoordinatesType - /// \param[in] _coord The spherical coordinates to convert + /// \param[in] _coord The spherical coordinates type to convert /// \return A gz::msgs::SphericalCoordinatesType object GZ_MSGS_VISIBLE msgs::SphericalCoordinatesType ConvertCoord( diff --git a/src/Utility.cc b/src/Utility.cc index 6675b10d..eb3a3e66 100644 --- a/src/Utility.cc +++ b/src/Utility.cc @@ -197,9 +197,11 @@ namespace gz return math::SphericalCoordinates::CoordinateType::SPHERICAL; case msgs::SphericalCoordinatesType::LOCAL: return math::SphericalCoordinates::CoordinateType::LOCAL; - default: + case msgs::SphericalCoordinatesType::LOCAL2: return math::SphericalCoordinates::CoordinateType::LOCAL2; } + std::cerr << "Invalid coordinate type passed" << std::endl; + return math::SphericalCoordinates::CoordinateType::LOCAL2; } ///////////////////////////////////////////// @@ -385,6 +387,7 @@ namespace gz default: return msgs::SphericalCoordinatesType::LOCAL2; } + std::cerr << "Invalid coordinate type passed" << std::endl; } /////////////////////////////////////////////