Skip to content

Commit

Permalink
Compile without script (from Livox-SDK#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateus Sanches committed Aug 2, 2023
1 parent bf4d062 commit 9f11ddd
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 191 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.vscode
build
package.xml
__pycache__
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# judge which cmake codes to use
if(ROS_EDITION STREQUAL "ROS1")
if($ENV{ROS_VERSION} STREQUAL "1")

# Copyright(c) 2019 livoxtech limited.

Expand Down Expand Up @@ -184,7 +184,7 @@ if(ROS_EDITION STREQUAL "ROS1")
#---------------------------------------------------------------------------------------


else(ROS_EDITION STREQUAL "ROS2")
else($ENV{ROS_VERSION} STREQUAL "2")

# Copyright(c) 2020 livoxtech limited.

Expand Down Expand Up @@ -282,7 +282,7 @@ else(ROS_EDITION STREQUAL "ROS2")
target_include_directories(${PROJECT_NAME} PRIVATE ${livox_sdk_INCLUDE_DIRS})

# get include directories of custom msg headers
if(HUMBLE_ROS STREQUAL "humble")
if($ENV{ROS_DISTRO} STREQUAL "humble")
rosidl_get_typesupport_target(cpp_typesupport_target
${LIVOX_INTERFACES} "rosidl_typesupport_cpp")
target_link_libraries(${PROJECT_NAME} "${cpp_typesupport_target}")
Expand Down
70 changes: 0 additions & 70 deletions build.sh

This file was deleted.

45 changes: 45 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0"?>
<package format="3">
<name>livox_ros_driver2</name>
<version>1.0.0</version>
<description>The ROS device driver for Livox 3D LiDARs</description>
<maintainer email="[email protected]">feng</maintainer>
<license>MIT</license>

<!-- Common ROS 1 / ROS 2 dependencies -->
<build_depend>ros_environment</build_depend>

<!-- ROS1 dependencies -->
<buildtool_depend condition="$ROS_VERSION == 1">catkin</buildtool_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>

<!-- ROS2 dependencies -->
<buildtool_depend condition="$ROS_VERSION == 2">ament_cmake_auto</buildtool_depend>
<build_depend condition="$ROS_VERSION == 2">rosidl_default_generators</build_depend>
<member_of_group condition="$ROS_VERSION == 2">rosidl_interface_packages</member_of_group>
<depend condition="$ROS_VERSION == 2">rclcpp</depend>
<depend condition="$ROS_VERSION == 2">rclcpp_components</depend>
<depend condition="$ROS_VERSION == 2">rcl_interfaces</depend>
<depend condition="$ROS_VERSION == 2">rcutils</depend>
<exec_depend condition="$ROS_VERSION == 2">rosbag2</exec_depend>
<exec_depend condition="$ROS_VERSION == 2">rosidl_default_runtime</exec_depend>
<test_depend condition="$ROS_VERSION == 2">ament_lint_auto</test_depend>
<test_depend condition="$ROS_VERSION == 2">ament_lint_common</test_depend>

<!-- ROS1/2 dependencies -->
<depend>std_msgs</depend>
<depend>sensor_msgs</depend>
<depend>pcl_conversions</depend>
<depend>pcl_ros</depend>
<depend>git</depend>
<depend>apr</depend>

<export>
<build_type condition="$ROS_VERSION == 2">ament_cmake</build_type>
<build_type condition="$ROS_VERSION == 1">catkin</build_type>
</export>
</package>
82 changes: 0 additions & 82 deletions package_ROS1.xml

This file was deleted.

35 changes: 0 additions & 35 deletions package_ROS2.xml

This file was deleted.

0 comments on commit 9f11ddd

Please sign in to comment.