diff --git a/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp b/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp index 2397a9ad2d..97a9c0a4ff 100644 --- a/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp +++ b/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_publisher.hpp @@ -73,7 +73,7 @@ class Costmap2DPublisher std::string global_frame, std::string topic_name, bool always_send_full_costmap = false, - float map_vis_z = 0.0); + double map_vis_z = 0.0); /** * @brief Destructor @@ -167,7 +167,7 @@ class Costmap2DPublisher double saved_origin_y_; bool active_; bool always_send_full_costmap_; - float map_vis_z_; + double map_vis_z_; // Publisher for translated costmap values as msg::OccupancyGrid used in visualization rclcpp_lifecycle::LifecyclePublisher::SharedPtr costmap_pub_; diff --git a/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp b/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp index d7ec01cf8f..2119d6907a 100644 --- a/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp +++ b/nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp @@ -404,7 +404,7 @@ class Costmap2DROS : public nav2_util::LifecycleNode bool track_unknown_space_{false}; double transform_tolerance_{0}; ///< The timeout before transform errors double initial_transform_timeout_{0}; ///< The timeout before activation of the node errors - float map_vis_z_{0}; + double map_vis_z_{0}; bool is_lifecycle_follower_{true}; ///< whether is a child-LifecycleNode or an independent node diff --git a/nav2_costmap_2d/src/costmap_2d_publisher.cpp b/nav2_costmap_2d/src/costmap_2d_publisher.cpp index 011995aa88..bc1b14da78 100644 --- a/nav2_costmap_2d/src/costmap_2d_publisher.cpp +++ b/nav2_costmap_2d/src/costmap_2d_publisher.cpp @@ -55,7 +55,7 @@ Costmap2DPublisher::Costmap2DPublisher( std::string global_frame, std::string topic_name, bool always_send_full_costmap, - float map_vis_z) + double map_vis_z) : costmap_(costmap), global_frame_(global_frame), topic_name_(topic_name),