Skip to content

Commit

Permalink
Added kinect for xbox 360 example (introlab/rtabmap#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Nov 23, 2023
1 parent 097cab0 commit bf5b3ef
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions rtabmap_examples/launch/kinect_xbox_360.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,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"),
])

0 comments on commit bf5b3ef

Please sign in to comment.