Skip to content

Delete build.sh & merge ROS1/2 into one package - #46

Open
Ericsii wants to merge 7 commits into
Livox-SDK:masterfrom
Ericsii:feature/merge-ros
Open

Ericsii wants to merge 7 commits into
Livox-SDK:masterfrom
Ericsii:feature/merge-ros

Conversation

@Ericsii

@Ericsii Ericsii commented May 8, 2023

Copy link
Copy Markdown

No description provided.

@Ericsii

Ericsii commented May 8, 2023

Copy link
Copy Markdown
Author

#26

@justinberi

Copy link
Copy Markdown

I've tested this on ROS noetic with catkin_make from the top level and believe this is the correct way to do building. Please follow the ROS conventions rather than using a build script as @Ericsii has done.

The PR required the following modification to package.xml

git diff package.xml
diff --git a/package.xml b/package.xml
index 19b5804..ff7cf81 100644
--- a/package.xml
+++ b/package.xml
@@ -11,9 +11,9 @@
 
     <!-- ROS1 dependencies -->
     <buildtool_depend condition="$ROS_VERSION == 1">catkin</buildtool_depend>
-    <build_depend condition="$ROS_VERSION == 1">roscpp</build_depend>
-    <build_depend condition="$ROS_VERSION == 1">rospy</build_depend>
-    <build_depend condition="$ROS_VERSION == 1">message_generation</build_depend>
+    <depend condition="$ROS_VERSION == 1">roscpp</depend>
+    <depend condition="$ROS_VERSION == 1">rospy</depend>
+    <depend condition="$ROS_VERSION == 1">message_generation</depend>
     <exec_depend condition="$ROS_VERSION == 1">message_runtime</exec_depend>
     <exec_depend condition="$ROS_VERSION == 1">rosbag</exec_depend>

@justinberi

justinberi commented Jul 12, 2023 •

Copy link
Copy Markdown

I've also tested under ROS2 humble with colcon build from the workspace dir and it works.

@Ericsii Ericsii left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update package.xml

Comment thread package.xml Resolved
Comment thread package.xml Resolved
Comment thread package.xml Resolved
mourams pushed a commit to mourams/livox_ros_driver2 that referenced this pull request Aug 2, 2023
Comment thread package.xml Resolved
@Timple

Timple commented Jan 5, 2024 •

Copy link
Copy Markdown

Awesome!

Although to be complete you might also update the instructions in the README.md.

Funny how these lidar manufacturers handle ignore these PRs: RoboSense-LiDAR/rslidar_sdk#48
They seem to think the whole software stack/build system revolves around the sensor driver.

@MCFurry

MCFurry commented Jan 26, 2024

Copy link
Copy Markdown

Thx for this!
One question though, ROS2 releases older than Humble are deprecated now: https://dlu.github.io/ros_clock/index.html
Hence, can we ditch the if-guard here?
https://github.com/Ericsii/livox_ros_driver2/blob/6f1a61e785452170a195887400f1d2950c5abfb8/CMakeLists.txt#L285
Which checks for Humble only, but in principle should also be used on Iron and Rolling as well.

@Ericsii

Ericsii commented Jan 27, 2024

Copy link
Copy Markdown
Author

Hence, can we ditch the if-guard here? https://github.com/Ericsii/livox_ros_driver2/blob/6f1a61e785452170a195887400f1d2950c5abfb8/CMakeLists.txt#L285 Which checks for Humble only, but in principle should also be used on Iron and Rolling as well.

Sure, I think this could be removed. But I need some tests on Iron and Rolling

@Timple

Timple commented Feb 19, 2024

Copy link
Copy Markdown

Verified on iron 🙂

@Ericsii

Ericsii commented Feb 23, 2024

Copy link
Copy Markdown
Author

@MCFurry I removed the condition for humble. It might work in newer versions of ros2

@MCFurry

MCFurry commented Feb 23, 2024

Copy link
Copy Markdown

We noticed! Thanks for that! Seems to work fine for Iron now as well.

Although we're also using https://github.com/pixmoving-auto/Livox-SDK2.git on update/robobus branch for the time being, since then both packages are ROS-packages and can now be easily automatically installed.

@Timple

Timple commented Feb 23, 2024

Copy link
Copy Markdown

That being said, that implementation can slightly be improved by keeping it a pure cmake package and only add a package.xml file 🙂

@christophfroehlich christophfroehlich left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, build successfully tested on humble + rolling

@Ericsii Ericsii mentioned this pull request Feb 26, 2024
@Timple Timple mentioned this pull request Jul 1, 2024
TonyCooT added a commit to Polytech-VM-Team/livox_ros_driver2 that referenced this pull request Jul 9, 2024
- PR "Delete build.sh & merge ROS1/2 into one package"
Livox-SDK#46
- PR "Remove unnecesarry linking of boost"
Livox-SDK#51
- PR "<fix> arg frame_id for imu message"
Livox-SDK#100
@leeleebaba

Copy link
Copy Markdown

hello, i fail to build the file using colcon build. how can you do that, it showed that "CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files:
/root/PycharmProject/livox_ros_driver2-master/ws_livox/src/livox_ros_driver2/LIVOX_INTERFACES_INCLUDE_DIRECTORIES
used as include directory in directory /root/PycharmProject/livox_ros_driver2-master/ws_livox/src/livox_ros_driver2"

miyajimad0620 added a commit to team-d2/livox_ros_driver2 that referenced this pull request Jul 8, 2025
@nomumu

nomumu commented Jul 22, 2025

Copy link
Copy Markdown

Sorry. I was interested in this PR and when I was checking it, I made an approve by mistake.

@MCFurry

MCFurry commented Jul 22, 2025

Copy link
Copy Markdown

Sorry. I was interested in this PR and when I was checking it, I made an approve by mistake.

That's okay, a lot of people seem interested in this PR. If someone could actually merge this that would help out a lot of people out there! 😉

@peci1

peci1 commented Dec 8, 2025

Copy link
Copy Markdown

Thanks for the PR. I'm switching our workspace to your branch to be able to build the package in a standard way :)

It works well on both Jazzy and Kilted!

@peci1

peci1 commented Dec 8, 2025

Copy link
Copy Markdown

@Livox-Infra Please have a look at this PR. It would greatly simplify lifes of your users.

@michalpelka

Copy link
Copy Markdown

@Ericsii - works on Jazzy.

@Timple

Timple commented Apr 18, 2026

Copy link
Copy Markdown

This is also resulting in these kind of headaches:
https://github.com/RoboStack/ros-rolling/blob/main/rosdistro_additional_recipes.yaml#L11

@Livox-louie as last committer. What do you think of this thread?
Seems like there is enough animo from the community to get this fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants