uos / lvr2

Las Vegas Reconstruction 2.0
BSD 3-Clause "New" or "Revised" License
104 stars 18 forks source link

Build in ROS1 or 2 with package.xml conditionals #18

Closed lucasw closed 6 months ago

lucasw commented 9 months ago

Found these in plotjuggler https://github.com/PlotJuggler/plotjuggler-ros-plugins/blob/main/package.xml - seems to build fine (along with mesh_tools) in my Ubuntu 23.10 catkin install workspace, also builds in a ros2 rolling colcon workspace- but I haven't run any tests beyond that.

If this works in 20.04 noetic also then there's no reason to have a humble branch?

lucasw commented 9 months ago

Now I'm not sure about https://github.com/uos/lvr2/pull/18/commits/70f8064894c3c89231548b14dbd17dc984404686, I wasn't able to build in a catkin devel environment unless I also change the project name from LAS_VEGAS to lvr2, and make find_package LVR2 lowercase lvr2 in hdf5_map_io/CMakeLists.txt and mesh_msgs_conversions/CMakeLists.txt - even then it's still failing out with fatal error: H5Tpublic.h: No such file or directory

amock commented 9 months ago

Hi @lucasw,

if its possible to have it running independently of the ROS-distribution, it would be a reasonable change and we indeed would not need a humble branch anymore. I am a bit concerned that if it's not working we will have to start creating branches for each combination of ROS1-ROS2 distributions. But I would suggest we first go for it and if we notice problems we can start to think again :D

I would appreciate if you come up with a solution to that. Before merging everything into the main branch (or one shared branch) I would run the following tests:

For Ubuntu 20.04, Ubuntu 22.04 do

For Ubuntu 20.04 do

For Ubuntu 22.04 do

I was also thinking about adding some Github-Workflows to automatically doing those tests. Thanks for contributing, let me know if you are making some progress.

amock commented 6 months ago

In PR #19 I replaced the build tool ament_cmake with cmake. This also resulted in lvr2 (humble branch) could be compiled with ROS1 noetic and Ubuntu 20 as well. I have not run any tests other than compiling. However, like this we could avoid the use of conditionals completely.

lucasw commented 6 months ago

That's compiling for me locally as well (along with mesh_tools packages that depend on it), and I'm setting this humble as the default elsewhere for some ros1 builds (https://github.com/lucasw/ros_from_src/commit/6b4629193132a5566b11a2725d38760f656d8665)