Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a message that allows loading environments via a topic #320

Merged
merged 14 commits into from
Aug 4, 2023
Prev Previous commit
Next Next commit
Address PR feedback
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
  • Loading branch information
arjo129 committed May 9, 2023
commit 8c0e400c8517c2a79c9bc849e3ab07163c643603
2 changes: 1 addition & 1 deletion include/gz/msgs/Utility.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion src/Utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
arjo129 marked this conversation as resolved.
Show resolved Hide resolved
}
std::cerr << "Invalid coordinate type passed" << std::endl;
return math::SphericalCoordinates::CoordinateType::LOCAL2;
}

/////////////////////////////////////////////
Expand Down Expand Up @@ -385,6 +387,7 @@ namespace gz
default:
return msgs::SphericalCoordinatesType::LOCAL2;
Copy link
Collaborator

@caguero caguero Dec 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block returns a warning as we don't return anything if none of the previous conditions are met.

}
std::cerr << "Invalid coordinate type passed" << std::endl;
}

/////////////////////////////////////////////
Expand Down