Skip to content

Commit

Permalink
Fix ROS1 build
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGrupp committed Dec 4, 2024
1 parent 5fb5eac commit 3e9db57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mvsim_node_src/mvsim_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,8 +1167,12 @@ void MVSimNode::internalOn(const mvsim::VehicleBase& veh, const mrpt::obs::CObse

if (auto& c = obs.covariance_enu; c.has_value())
{
#if PACKAGE_ROS_VERSION == 1
msg->position_covariance_type = sensor_msgs::NavSatFix::COVARIANCE_TYPE_DIAGONAL_KNOWN;
#else
msg->position_covariance_type =
sensor_msgs::msg::NavSatFix::COVARIANCE_TYPE_DIAGONAL_KNOWN;
#endif

msg->position_covariance.fill(0.0);
msg->position_covariance[0] = (*c)(0, 0);
Expand Down

0 comments on commit 3e9db57

Please sign in to comment.