forked from NVIDIA-ISAAC-ROS/isaac_ros_apriltag
/
isaac_ros_apriltag_pipeline.launch.py
executable file
·69 lines (58 loc) · 2.25 KB
/
isaac_ros_apriltag_pipeline.launch.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
import os
import launch
import yaml
from launch_ros.actions import ComposableNodeContainer, Node
from launch_ros.descriptions import ComposableNode
# detect all 36h11 tags
cfg_36h11 = {
'image_transport':'raw',
'family':'36h11',
'size':0.162
}
def generate_launch_description():
cam_yaml = '/isaac_ros_apriltag' + '/config' + '/rpi_cam.yaml'
cam_yaml_abs = os.path.abspath(os.getcwd())
cat_path = 'file://' + cam_yaml_abs + cam_yaml
rectify_node = ComposableNode(
package='image_proc',
plugin='image_proc::RectifyNode',
name='rectify_node',
)
rectify_container = ComposableNodeContainer(
name='rectify_container',
namespace='',
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=[rectify_node],
output='screen'
)
composable_node = ComposableNode(
name='apriltag',
package='isaac_ros_apriltag',
plugin='isaac_ros::apriltag::AprilTagNode',
remappings=[('/camera/image_rect', '/image_rect'),
('/camera/camera_info', '/camera_info')],
parameters=[cfg_36h11])
apriltag_container = ComposableNodeContainer(
name='tag_container',
namespace='apriltag',
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=[composable_node],
output='screen'
)
argus_node = Node(
name='argus',
package='isaac_ros_argus_camera_mono',
executable='isaac_ros_argus_camera_mono',
remappings=[('/image_raw', '/image')],
parameters=[{'device':0,'sensor':4,'output_encoding':'mono8','camera_info_url':cat_path}]
)
return launch.LaunchDescription([argus_node,rectify_container, apriltag_container])