Skip to content

Commit

Permalink
fix worldToMapContinuous type
Browse files Browse the repository at this point in the history
Signed-off-by: Brice <brice.renaudeau@gmail.com>
  • Loading branch information
BriceRenaudeau committed Apr 10, 2024
1 parent 5fd195e commit 35442e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Costmap2D
* @param my Will be set to the associated map y coordinate
* @return True if the conversion was successful (legal bounds) false otherwise
*/
bool worldToMapContinuous(double wx, double wy, double & mx, double & my) const;
bool worldToMapContinuous(double wx, double wy, float & mx, float & my) const;

/**
* @brief Convert from world coordinates to map coordinates without checking for legal bounds
Expand Down
2 changes: 1 addition & 1 deletion nav2_costmap_2d/src/costmap_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ bool Costmap2D::worldToMap(double wx, double wy, unsigned int & mx, unsigned int
return false;
}

bool Costmap2D::worldToMapContinuous(double wx, double wy, double & mx, double & my) const
bool Costmap2D::worldToMapContinuous(double wx, double wy, float & mx, float & my) const
{
if (wx < origin_x_ || wy < origin_y_) {
return false;
Expand Down

0 comments on commit 35442e0

Please sign in to comment.