commit
This commit is contained in:
parent
af973fe0ee
commit
3861ebfc8d
6 changed files with 53 additions and 6 deletions
47
rasms_manipulator/launch/rasms_manipulation.launch.py
Normal file
47
rasms_manipulator/launch/rasms_manipulation.launch.py
Normal file
|
@ -0,0 +1,47 @@
|
|||
import os
|
||||
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, SetEnvironmentVariable
|
||||
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
pkg_dir = get_package_share_directory('rasms_manipulator')
|
||||
namespace = LaunchConfiguration('namespace')
|
||||
|
||||
declare_namespace_cmd = DeclareLaunchArgument(
|
||||
'namespace',
|
||||
default_value='',
|
||||
description='Namespace')
|
||||
|
||||
stdout_linebuf_envvar = SetEnvironmentVariable(
|
||||
'RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED', '1')
|
||||
|
||||
move_1 = Node(
|
||||
package='plansys2_bt_actions',
|
||||
executable='bt_action_node',
|
||||
name='move_1',
|
||||
namespace=namespace,
|
||||
output='screen',
|
||||
parameters=[
|
||||
pkg_dir + '/config/params.yaml',
|
||||
{
|
||||
'action_name': 'move',
|
||||
'bt_xml_file': pkg_dir + '/behavior_trees_xml/move.xml'
|
||||
}
|
||||
])
|
||||
|
||||
ld = LaunchDescription()
|
||||
|
||||
ld.add_action(stdout_linebuf_envvar)
|
||||
ld.add_action(declare_namespace_cmd)
|
||||
|
||||
# Declare the launch options
|
||||
ld.add_action(move_1)
|
||||
|
||||
return ld
|
Loading…
Add table
Add a link
Reference in a new issue