-
Notifications
You must be signed in to change notification settings - Fork 568
/
Copy pathkinect_xbox_360.launch.py
54 lines (45 loc) · 1.79 KB
/
kinect_xbox_360.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
# Requirements:
# A kinect for xbox 360
# Install kinect_ros2 package (use this fork: https://github.com/matlabbe/kinect_ros2)
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, SetEnvironmentVariable
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def generate_launch_description():
parameters=[{
'frame_id':'camera_link',
'subscribe_depth':True,
'subscribe_odom_info':True,
'approx_sync':True,
'qos':1}]
remappings=[
('rgb/image', '/kinect/rgb/image_raw'),
('rgb/camera_info', '/kinect/rgb/camera_info'),
('depth/image', '/kinect/depth_registered/image_raw')]
return LaunchDescription([
# Nodes to launch
Node(
package='kinect_ros2', executable='kinect_ros2_node', output='screen',
parameters=[{'depth_registration':True}],
namespace="kinect"),
# Optical rotation
Node(
package='tf2_ros', executable='static_transform_publisher', output='screen',
arguments=["0", "0", "0", "-1.57", "0", "-1.57", "camera_link", "kinect_rgb"]),
Node(
package='rtabmap_odom', executable='rgbd_odometry', output='screen',
parameters=parameters,
remappings=remappings,
namespace="rtabmap"),
Node(
package='rtabmap_slam', executable='rtabmap', output='screen',
parameters=parameters,
remappings=remappings,
arguments=['-d'],
namespace="rtabmap"),
Node(
package='rtabmap_viz', executable='rtabmap_viz', output='screen',
parameters=parameters,
remappings=remappings,
namespace="rtabmap"),
])