Created
July 28, 2023 05:18
-
-
Save TiNredmc/20d633b6f41c02fcbebc6e1e08bf93f4 to your computer and use it in GitHub Desktop.
Remote Point cloud depth_image_proc launch file for ROS2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ROS2 Remote Point Cloud Processing launch file using depth_image_proc | |
# Using this with Asus Xtion (no RGB) camera. Orange Pi Prime running Openni2 camera node. | |
# Original code by 808brick https://github.com/ros-perception/image_pipeline/issues/823 | |
# Modified by TinLethax 2023/07/28 +7 | |
import launch | |
from launch_ros.actions import ComposableNodeContainer | |
from launch_ros.descriptions import ComposableNode | |
def generate_launch_description(): | |
namespace = '/camera' | |
container = ComposableNodeContainer( | |
name='pcl_remote', | |
namespace=namespace, | |
package='rclcpp_components', | |
executable='component_container', | |
composable_node_descriptions=[ | |
ComposableNode( | |
package='depth_image_proc', | |
plugin='depth_image_proc::PointCloudXyzNode', | |
name='point_cloud_xyz', | |
namespace=namespace, | |
parameters=[{'queue_size': 10}], | |
remappings=[ | |
('image_rect', 'depth/image_raw'), | |
('camera_info', 'depth/camera_info'), | |
('points', 'depth/points') | |
] | |
), | |
], | |
output='screen', | |
) | |
return launch.LaunchDescription([container]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment