diff --git a/readme.md b/readme.md index 9978657..942da59 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# LD06 Lidar ROS2 driver +# LD06 Lidar Humble ROS2 driver This is an attempt to fix and improve the driver provided by LDRobots in their [website](https://www.ldrobot.com/download/44) diff --git a/src/lipkg.cpp b/src/lipkg.cpp index 912587e..9c321fd 100644 --- a/src/lipkg.cpp +++ b/src/lipkg.cpp @@ -255,7 +255,8 @@ void LiPkg::ToLaserscan(std::vector src) int index = (int)((output.angle_max - angle) / output.angle_increment); // int index = (int)((angle - output.angle_min) / output.angle_increment); //default, but this is inverted - if (index >= 0 && index < beam_size_) + // if (index >= 0 && index < beam_size_): This alertt error on humble + if (index >= 0 && index < static_cast(beam_size_)) // tested fix { if(range < range_threshold_) { @@ -272,4 +273,4 @@ void LiPkg::ToLaserscan(std::vector src) } } -/********************* (C) COPYRIGHT LD Robot *******END OF FILE ********/ \ No newline at end of file +/********************* (C) COPYRIGHT LD Robot *******END OF FILE ********/