Skip to content

Commit

Permalink
added point_type_adapter to launch with point_cloud_fusion in single …
Browse files Browse the repository at this point in the history
…composable node container
  • Loading branch information
john-chrosniak committed Apr 15, 2024
1 parent 60e3f67 commit d676ad4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Copyright (C) 2024 LEIDOS.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# Licensed under the Apache License, Version 2.0 (the 'License'); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
Expand All @@ -16,7 +16,9 @@
# consisting of two Velodyne LiDARs

import launch
from launch_ros.actions import Node
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
from carma_ros2_utils.launch.get_current_namespace import GetCurrentNamespace
from ament_index_python import get_package_share_directory

import os
Expand All @@ -27,15 +29,39 @@


def generate_launch_description():
point_cloud_fusion_nodes = Node(
package='point_cloud_fusion_nodes',
executable='pointcloud_fusion_node_exe',
parameters=[point_cloud_fusion_node_param_file],
remappings=[
("output_topic", "lidar/points_raw"),
("input_topic1", "velodyne_1/lidar/points_xyzi"),
("input_topic2", "velodyne_2/lidar/points_xyzi")

point_cloud_fusion_container = ComposableNodeContainer(
package='carma_ros2_utils', # rclcpp_components
name='point_cloud_fusion_container',
executable='lifecycle_component_wrapper_mt',
namespace=GetCurrentNamespace(),
composable_node_descriptions=[
ComposableNode(
package='point_cloud_fusion_nodes',
plugin='autoware::perception::filters::point_cloud_fusion_nodes::PointCloudFusionNode',
name='point_cloud_fusion_node',
parameters=[point_cloud_fusion_node_param_file],
remappings=[
('output_topic', 'lidar/points_raw'),
('input_topic1', 'velodyne_1/lidar/points_xyzi'),
('input_topic2', 'velodyne_2/lidar/points_xyzi')
]
),
ComposableNode(
package='point_type_adapter',
plugin='autoware::tools::point_type_adapter::PointTypeAdapterNode',
name='velodyne_1/point_type_adapter_node',
remappings=[('points_raw', 'velodyne_1/lidar/points_raw'),
('points_xyzi', 'velodyne_1/lidar/points_xyzi')]
),
ComposableNode(
package='point_type_adapter',
plugin='autoware::tools::point_type_adapter::PointTypeAdapterNode',
name='velodyne_2/point_type_adapter_node',
remappings=[('points_raw', 'velodyne_2/lidar/points_raw'),
('points_xyzi', 'velodyne_2/lidar/points_xyzi')],
)
]
)

return launch.LaunchDescription([point_cloud_fusion_nodes])
return launch.LaunchDescription([point_cloud_fusion_container])
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<depend>tf2_ros</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tf2_sensor_msgs</depend>
<depend>carma_ros2_utils</depend>
<depend>point_type_adapter</depend>

<build_depend>eigen</build_depend>
<build_depend>autoware_auto_common</build_depend>
Expand Down

This file was deleted.

0 comments on commit d676ad4

Please sign in to comment.