added launch file
This commit is contained in:
parent
126124c4da
commit
1467525ec5
@ -89,7 +89,13 @@ install(TARGETS
|
||||
DESTINATION lib/${PROJECT_NAME})
|
||||
|
||||
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
install(PROGRAMS
|
||||
launch/find-pose-node.py
|
||||
DESTINATION lib/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
31
ros2_ws/src/find-pose/launch/find-pose-node.py
Normal file
31
ros2_ws/src/find-pose/launch/find-pose-node.py
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
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():
|
||||
|
||||
return LaunchDescription([
|
||||
|
||||
SetEnvironmentVariable('RCUTILS_LOGGING_USE_STDOUT', '1'),
|
||||
SetEnvironmentVariable('RCUTILS_LOGGING_BUFFERED_STREAM', '0'),
|
||||
|
||||
# Launch arguments
|
||||
DeclareLaunchArgument('object_prefix', default_value='object', description='TF prefix of objects.'),
|
||||
|
||||
DeclareLaunchArgument('rgb_topic', default_value='camera/rgb/image_rect_color', description='Image topic.'),
|
||||
DeclareLaunchArgument('depth_topic', default_value='camera/depth_registered/image_raw', description='Registered depth topic.'),
|
||||
DeclareLaunchArgument('camera_info_topic', default_value='camera/rgb/camera_info', description='Camera info topic.'),
|
||||
|
||||
# Nodes to launch
|
||||
Node(
|
||||
package='find-pose', executable='find_pose_node', output='screen',
|
||||
parameters=[{
|
||||
'object_prefix':LaunchConfiguration('object_prefix'),
|
||||
}],
|
||||
remappings=[
|
||||
('rgb/image_rect_color', LaunchConfiguration('rgb_topic')),
|
||||
('depth_registered/image_raw', LaunchConfiguration('depth_topic')),
|
||||
('depth_registered/camera_info', LaunchConfiguration('camera_info_topic'))]),
|
||||
])
|
||||
@ -30,6 +30,7 @@
|
||||
<exec_depend>message_filters</exec_depend>
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
<exec_depend>ros2launch</exec_depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user