From c28188c7de5c61e7589464bf2ee3335ea674e698 Mon Sep 17 00:00:00 2001 From: dsvkishdv <110782541+dsvkishdv@users.noreply.github.com> Date: Mon, 20 Mar 2023 14:05:02 +0800 Subject: [PATCH 1/4] Add files via upload repair ros humble error 258 | if (index >= 0 && index < beam_size_) | ~~~~~~^~~~~~~~~~~~ From 0fe9ec1208d792ac0ade7b43854ad282f99bb818 Mon Sep 17 00:00:00 2001 From: dsvkishdv <110782541+dsvkishdv@users.noreply.github.com> Date: Mon, 20 Mar 2023 14:07:27 +0800 Subject: [PATCH 2/4] Update lipkg.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix humble error warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare] 258 | if (index >= 0 && index < beam_size_) | ~~~~~~^~~~~~~~~~~~ --- src/lipkg.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ********/ From dc101c55d8a008ac1a261db1c10e54b2e1185712 Mon Sep 17 00:00:00 2001 From: dsvkishdv <110782541+dsvkishdv@users.noreply.github.com> Date: Mon, 20 Mar 2023 21:41:33 +0800 Subject: [PATCH 3/4] Update readme.md --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 9978657..c240eda 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,7 @@ This is an attempt to fix and improve the driver provided by LDRobots in their [website](https://www.ldrobot.com/download/44) +Now are be repaired, and have been tested on ROS2 Humble under ubuntu 22.04 ## Installation cd From ec135a4f0129c19e786adbe77157a3267e00215b Mon Sep 17 00:00:00 2001 From: dsvkishdv <110782541+dsvkishdv@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:13:30 +0800 Subject: [PATCH 4/4] Update readme.md --- readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/readme.md b/readme.md index c240eda..942da59 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,7 @@ -# 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) -Now are be repaired, and have been tested on ROS2 Humble under ubuntu 22.04 ## Installation cd