Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions src/nebula_continental/nebula_continental/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ find_package(message_filters REQUIRED)
find_package(tf2_ros REQUIRED)
autoware_package()

if("$ENV{ENABLE_AGNOCAST}" AND NOT agnocast_components_FOUND)
message(FATAL_ERROR "agnocast_components is required when Agnocast is enabled")
endif()

# # Continental

# ARS548
Expand Down Expand Up @@ -42,9 +46,16 @@ ament_target_dependencies(
rclcpp_components
tf2_ros)

rclcpp_components_register_node(
continental_ars548_ros_wrapper PLUGIN "ContinentalARS548RosWrapper"
EXECUTABLE continental_ars548_ros_wrapper_node)
if("$ENV{ENABLE_AGNOCAST}")
agnocast_components_register_node(
continental_ars548_ros_wrapper PLUGIN "ContinentalARS548RosWrapper"
EXECUTABLE continental_ars548_ros_wrapper_node
EXECUTOR CallbackIsolatedAgnocastExecutor)
else()
rclcpp_components_register_node(
continental_ars548_ros_wrapper PLUGIN "ContinentalARS548RosWrapper"
EXECUTABLE continental_ars548_ros_wrapper_node)
endif()

# SRR520
add_library(
Expand Down Expand Up @@ -79,9 +90,15 @@ ament_target_dependencies(
message_filters
tf2_ros)

rclcpp_components_register_node(
continental_srr520_ros_wrapper PLUGIN "ContinentalSRR520RosWrapper"
EXECUTABLE continental_srr520_ros_wrapper_node)
if("$ENV{ENABLE_AGNOCAST}")
agnocast_components_register_node(
continental_srr520_ros_wrapper PLUGIN "ContinentalSRR520RosWrapper"
EXECUTABLE continental_srr520_ros_wrapper_node)
else()
rclcpp_components_register_node(
continental_srr520_ros_wrapper PLUGIN "ContinentalSRR520RosWrapper"
EXECUTABLE continental_srr520_ros_wrapper_node)
endif()

install(
TARGETS continental_ars548_ros_wrapper
Expand Down Expand Up @@ -185,4 +202,8 @@ ament_export_dependencies(
visualization_msgs
yaml-cpp)

if("$ENV{ENABLE_AGNOCAST}")
ament_export_dependencies(agnocast_components)
endif()

ament_package()
1 change: 1 addition & 0 deletions src/nebula_continental/nebula_continental/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<buildtool_depend>ros_environment</buildtool_depend>
<buildtool_depend>ros_testing</buildtool_depend>

<depend condition="$ENABLE_AGNOCAST == 1">agnocast_components</depend>
<depend>autoware_sensing_msgs</depend>
<depend>continental_msgs</depend>
<depend>continental_srvs</depend>
Expand Down
15 changes: 13 additions & 2 deletions src/nebula_hesai/nebula_hesai/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ autoware_package()
if("$ENV{ENABLE_AGNOCAST}" AND NOT agnocastlib_FOUND)
message(FATAL_ERROR "agnocastlib is required when Agnocast is enabled")
endif()
if("$ENV{ENABLE_AGNOCAST}" AND NOT agnocast_components_FOUND)
message(FATAL_ERROR "agnocast_components is required when Agnocast is enabled")
endif()

# Hesai
add_library(
Expand Down Expand Up @@ -46,8 +49,15 @@ if("$ENV{ENABLE_AGNOCAST}")
add_definitions(-DUSE_AGNOCAST_ENABLED)
endif()

rclcpp_components_register_node(hesai_ros_wrapper PLUGIN "HesaiRosWrapper"
EXECUTABLE hesai_ros_wrapper_node)
if("$ENV{ENABLE_AGNOCAST}")
agnocast_components_register_node(
hesai_ros_wrapper PLUGIN "HesaiRosWrapper"
EXECUTABLE hesai_ros_wrapper_node
EXECUTOR CallbackIsolatedAgnocastExecutor)
else()
rclcpp_components_register_node(hesai_ros_wrapper PLUGIN "HesaiRosWrapper"
EXECUTABLE hesai_ros_wrapper_node)
endif()

install(
TARGETS hesai_ros_wrapper
Expand Down Expand Up @@ -185,6 +195,7 @@ ament_export_dependencies(

if("$ENV{ENABLE_AGNOCAST}")
ament_export_dependencies(agnocastlib)
ament_export_dependencies(agnocast_components)
endif()

ament_package()
1 change: 1 addition & 0 deletions src/nebula_hesai/nebula_hesai/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<buildtool_depend>ros_environment</buildtool_depend>
<buildtool_depend>ros_testing</buildtool_depend>

<depend condition="$ENABLE_AGNOCAST == 1">agnocast_components</depend>
<depend condition="$ENABLE_AGNOCAST == 1">agnocastlib</depend>
<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_utils_debug</depend>
Expand Down
Loading