Ejemplo n.º 1
0
def generate_launch_description():
    use_sim_time = LaunchConfiguration('use_sim_time', default='False')
    world_file_name = 'empty_' + TURTLEBOT3_MODEL + '.model'
    world = os.path.join(get_package_share_directory('subscriber'), 'worlds',
                         world_file_name)
    launch_file_dir = os.path.join(
        get_package_share_directory('turtlebot3_gazebo'), 'launch')
    pkg_gazebo_ros = get_package_share_directory('gazebo_ros')

    return LaunchDescription([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')),
            launch_arguments={'world': world}.items(),
        ),

        #  IncludeLaunchDescription(
        #      PythonLaunchDescriptionSource(
        #          os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py')
        #      ),
        #  ),
        ExecuteProcess(cmd=[
            'ros2', 'param', 'set', '/gazebo', 'use_sim_time', use_sim_time
        ],
                       output='screen'),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [launch_file_dir, '/robot_state_publisher.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),
    ])
Ejemplo n.º 2
0
def generate_launch_description():
    turtlebot3_gazebo = get_package_share_directory('turtlebot3_gazebo')
    my_robot_slam = get_package_share_directory('my_robot_slam')
    return LaunchDescription([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(turtlebot3_gazebo, 'launch/turtlebot3_house.launch.py')
            ),
        ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(my_robot_slam, 'localization.launch.py')
            ),
        ),
        Node(
            package='my_vacuum_cleaner',
            executable='coverage',
            name='coverage',
            output='screen'),
        Node(
            package='my_vacuum_cleaner',
            executable='set_initial_pose',
            name='set_initial_pose',
            output='screen'),
    ])
Ejemplo n.º 3
0
def generate_launch_description():
    # Path
    nb2_launch_dir = os.path.join(
        get_package_share_directory('neuronbot2_bringup'), 'launch')
    autodock_launch_dir = os.path.join(
        get_package_share_directory('apriltag_docking'), 'launch')
    rviz_path = os.path.join(
        get_package_share_directory('napp_apriltag_docking'), 'rviz',
        'default_tag_bot.rviz')
    open_rviz = LaunchConfiguration('open_rviz', default='True')

    neuron_app_bringup = GroupAction([
        DeclareLaunchArgument('open_rviz',
                              default_value='true',
                              description='Launch Rviz?'),
        IncludeLaunchDescription(PythonLaunchDescriptionSource(
            os.path.join(nb2_launch_dir, 'bringup_launch.py')),
                                 launch_arguments={'use_camera':
                                                   'top'}.items()),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(autodock_launch_dir,
                             'autodock_neuronbot.launch.py'))),
        Node(package='rviz2',
             executable='rviz2',
             name='rviz2',
             arguments=['-d', rviz_path],
             condition=IfCondition(LaunchConfiguration("open_rviz"))),
    ])

    ld = LaunchDescription()
    ld.add_action(neuron_app_bringup)
    return ld
Ejemplo n.º 4
0
def generate_launch_description():
    # Path
    nb2_launch_dir = os.path.join(get_package_share_directory('neuronbot2_bringup'), 'launch')
    nb2nav_launch_dir = os.path.join(get_package_share_directory('neuronbot2_nav'), 'launch')
    your_map_path = str(Path.home())+'/neuron_app_slam/yourmap.yaml'

    if not os.path.isfile(your_map_path):
        raise RuntimeError('\x1b[0;37;41m'+'Please run Neuron APP SLAM to create your own map first.'+'\x1b[0m')

    # Parameters
    open_rviz = LaunchConfiguration('open_rviz', default='True')
    map_path = LaunchConfiguration('map', default=your_map_path)

    neuron_app_bringup = GroupAction([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(os.path.join(nb2_launch_dir, 'bringup_launch.py'))),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(os.path.join(nb2nav_launch_dir, 'bringup_launch.py')),
            launch_arguments={'open_rviz': open_rviz,
                              'map': map_path}.items()),
    ])

    ld = LaunchDescription()
    ld.add_action(neuron_app_bringup)
    return ld
Ejemplo n.º 5
0
def generate_launch_description():

    return LaunchDescription([

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [ThisLaunchFileDir(), '/rs_face_d415.launch.py']),
        ),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [ThisLaunchFileDir(), '/rs_scene_d435.launch.py']),
        ),

        Node(
            package='tf2_ros',
            node_executable='static_transform_publisher',
            node_name='static_transform_publisher_face_d415_to_scene_d435',
            node_namespace='',
            output='screen',
            parameters=[],
            # Parallel
            arguments=['-0.05938306', '-0.0375', '0.0',
                       '3.14159265', '0.0', '0.0',
                       'face_d415', 'scene_d435'],
            # # # 15 deg offset
            # arguments=['-0.0212582', '-0.06153793', '0.0',
            #            '-3.40339204', '0.0', '0.0',
            #            'face_d415', 'scene_d435'],
            remappings=[],
        ),
    ])
Ejemplo n.º 6
0
def generate_launch_description():

    return LaunchDescription([
        SetEnvironmentVariable('RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED', '1'),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [ThisLaunchFileDir(), '/hardware_2wd.launch.py'])),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [ThisLaunchFileDir(), '/sensors.launch.py'])),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [ThisLaunchFileDir(), '/ps4_teleop.launch.py'])),
        Node(
            package="tf2_ros",
            executable="static_transform_publisher",
            output='screen',
            arguments=[
                '0', '0', '0.25', '0', '0', '0', 'base_footprint', 'base_link'
            ],
        ),
        Node(
            package="tf2_ros",
            executable="static_transform_publisher",
            output='screen',
            arguments=[
                '0', '0', '0.05',
                str(pi), '0', '0', 'base_link', 'laser'
            ],
        ),
    ])
Ejemplo n.º 7
0
def generate_launch_description():
    user = LaunchConfiguration('user', default=os.path.join(get_package_share_directory(
        'ecard'), 'users', 'user0.yaml'))

    return LaunchDescription([
        DeclareLaunchArgument(
            'user',
            default_value=user,
            description='Path to config for RGB-D Gaze user'),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [os.path.join(get_package_share_directory('ecard'), 'launch',
                              'rs', 'rs.launch.py')]),
        ),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [os.path.join(get_package_share_directory('ecard'), 'launch',
                              'rgbd_gaze', 'rgbd_gaze.launch.py')]),
            launch_arguments=[('user', user)],
        ),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [os.path.join(get_package_share_directory('ecard'), 'launch',
                              'gpf', 'gpf.launch.py')]),
        ),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [os.path.join(get_package_share_directory('ecard'), 'launch',
                              'gaze_correlation', 'gaze_correlation.launch.py')]),
        ),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [os.path.join(get_package_share_directory('ecard'), 'launch',
                              'manipulation.launch.py')]),
        ),

        # IncludeLaunchDescription(
        #     PythonLaunchDescriptionSource(
        #         [os.path.join(get_package_share_directory('ecard'), 'launch',
        #                       'rviz2.launch.py')]),
        # ),

        Node(
            package='tf2_ros',
            node_executable='static_transform_publisher',
            node_name='static_transform_publisher_world_face_d415',
            node_namespace='',
            output='screen',
            parameters=[],
            arguments=['0.1', '0.4', '0.25',
                       '0.0', '3.14159265', '3.14159265',
                       'world', 'face_d415'],
            remappings=[],
        ),
    ])
def generate_launch_description():
    main_package_name = 'lobot_control_main'
    # Get gazebo_ros package path
    gazebo_ros_share_path = get_package_share_directory('gazebo_ros')
    lobot_desc_share_path = get_package_share_directory('lobot_description')
    control_main_share_path = get_package_share_directory(main_package_name)
    lobot_urdf_path = os.path.join(lobot_desc_share_path, 'robots/biped.urdf')
    # Launch gzserver
    params_server = IncludeLaunchDescription(PythonLaunchDescriptionSource(
        os.path.join(control_main_share_path, 'launch', 'params_server.launch.py')))

    gzserver = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(os.path.join(gazebo_ros_share_path, 'launch',
                                                   'gzserver.launch.py')))

    # Launch main executable
    main_exec = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(os.path.join(control_main_share_path, 'launch',
                                                   'launch_main_exec.launch.py')))

    # GAZEBO_MODEL_PATH has to be correctly set for Gazebo to be able to find the model
    spawn_entity = Node(package='gazebo_ros', node_executable='spawn_entity.py',
                        arguments=['-entity', 'lobot', '-file',
                                   lobot_urdf_path, '-z', "0.2"],
                        output='screen')

    # Launch gzclient
    gzclient = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(os.path.join(gazebo_ros_share_path, 'launch',
                                                   'gzclient.launch.py')),
    )

    ld = LaunchDescription([params_server, gzserver,spawn_entity, gzclient, main_exec])
    return ld
def generate_launch_description():
    # Path
    nb2_launch_dir = os.path.join(
        get_package_share_directory('neuronbot2_bringup'), 'launch')
    nb2nav_launch_dir = os.path.join(
        get_package_share_directory('neuronbot2_slam'), 'launch')

    # Parameters
    open_rviz = LaunchConfiguration('open_rviz', default='True')

    neuron_app_bringup = GroupAction([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(nb2_launch_dir, 'bringup_launch.py'))),
        IncludeLaunchDescription(PythonLaunchDescriptionSource(
            os.path.join(nb2nav_launch_dir, 'gmapping_launch.py')),
                                 launch_arguments={'open_rviz':
                                                   open_rviz}.items()),
    ])

    # Run mouse teleop
    mouse_teleop = Node(package='mouse_teleop',
                        executable='mouse_teleop',
                        remappings=[('mouse_vel', 'cmd_vel')],
                        output='screen')

    ld = LaunchDescription()
    ld.add_action(neuron_app_bringup)
    ld.add_action(mouse_teleop)
    return ld
def generate_launch_description():

    use_sim_time = LaunchConfiguration('use_sim_time', default='false')
    rviz_config_dir = os.path.join(
        get_package_share_directory('testbot_description'), 'rviz',
        'testbot.rviz')

    return LaunchDescription([
        DeclareLaunchArgument(
            'use_sim_time',
            default_value=use_sim_time,
            description='Use simulation (Gazebo) clock if true'),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [ThisLaunchFileDir(), '/testjoint_state_publisher.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [ThisLaunchFileDir(), '/testrobot_state_publisher.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),
        Node(package='rviz2',
             node_executable='rviz2',
             node_name='rviz2',
             arguments=['-d', rviz_config_dir],
             output='screen'),
    ])
Ejemplo n.º 11
0
def generate_launch_description():
    package_dir = get_package_share_directory('webots_ros2_epuck')

    use_nav = LaunchConfiguration('nav', default=False)
    use_rviz = LaunchConfiguration('rviz', default=False)
    use_mapper = LaunchConfiguration('mapper', default=False)
    synchronization = LaunchConfiguration('synchronization', default=False)
    world = LaunchConfiguration('world', default='epuck_world.wbt')

    # Webots
    webots_launch = IncludeLaunchDescription(PythonLaunchDescriptionSource(
        os.path.join(package_dir, 'robot_launch.py')),
                                             launch_arguments={
                                                 'synchronization':
                                                 synchronization,
                                                 'use_sim_time': 'true'
                                             }.items())

    # Base configuration
    tools_launch = IncludeLaunchDescription(PythonLaunchDescriptionSource(
        os.path.join(package_dir, 'robot_tools_launch.py')),
                                            launch_arguments={
                                                'nav': use_nav,
                                                'rviz': use_rviz,
                                                'mapper': use_mapper,
                                                'use_sim_time': 'true',
                                                'world': world
                                            }.items())

    return LaunchDescription([webots_launch, tools_launch])
def generate_launch_description():
    params1 = duplicate_params(rs_launch.configurable_parameters, '1')
    params2 = duplicate_params(rs_launch.configurable_parameters, '2')
    return LaunchDescription(
        rs_launch.declare_configurable_parameters(local_parameters) +
        rs_launch.declare_configurable_parameters(params1) +
        rs_launch.declare_configurable_parameters(params2) + [
            IncludeLaunchDescription(
                PythonLaunchDescriptionSource(
                    [ThisLaunchFileDir(), '/rs_launch.py']),
                launch_arguments=set_configurable_parameters(params1).items(),
            ),
            IncludeLaunchDescription(
                PythonLaunchDescriptionSource(
                    [ThisLaunchFileDir(), '/rs_launch.py']),
                launch_arguments=set_configurable_parameters(params2).items(),
            ),
            # dummy static transformation from camera1 to camera2
            launch_ros.actions.Node(package="tf2_ros",
                                    executable="static_transform_publisher",
                                    arguments=[
                                        "0", "0", "0", "0", "0", "0",
                                        "camera1_link", "camera2_link"
                                    ]),
        ])
Ejemplo n.º 13
0
def generate_launch_description():

    ld = LaunchDescription()

    gazebo = IncludeLaunchDescription(PythonLaunchDescriptionSource(
        get_package_share_directory('triton_gazebo') +
        '/launch/gazebo_launch.py'),
                                      launch_arguments={
                                          'world': 'uc_gendata.world',
                                          'headless': 'true'
                                      }.items())

    ld.add_action(gazebo)

    underwater_camera = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            get_package_share_directory('triton_gazebo') +
            '/launch/underwater_camera_launch.py'))

    ld.add_action(underwater_camera)

    bounding_box_image_saver = Node(package="triton_gazebo",
                                    executable='bounding_box_image_saver.py',
                                    name='bounding_box_image_saver')

    ld.add_action(bounding_box_image_saver)

    return ld
Ejemplo n.º 14
0
def generate_launch_description():
    use_sim_time = LaunchConfiguration('use_sim_time', default='true')
    world_file_name = 'atp_office/atpbot.model'
    world = os.path.join(get_package_share_directory('atpbot_simulation'),
                         'worlds', world_file_name)
    launch_file_dir = os.path.join(
        get_package_share_directory('atpbot_simulation'), 'launch')
    pkg_gazebo_ros = get_package_share_directory('gazebo_ros')
    print(launch_file_dir)
    return LaunchDescription([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')),
            launch_arguments={'world': world}.items(),
        ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch',
                             'gzclient.launch.py')), ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [launch_file_dir, '/robot_state_publisher.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [launch_file_dir, '/navigation2.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),
    ])
Ejemplo n.º 15
0
def generate_launch_description():
    use_sim_time = LaunchConfiguration('use_sim_time', default='True')
    world_file_name = 'warehouse/warehouse.model'
    # world_file_name = 'empty_world/empty_world.model'
    world = os.path.join(get_package_share_directory('robot_simulation'),
                         'worlds', world_file_name)

    launch_file_dir = os.path.join(
        get_package_share_directory('robot_description'), 'launch')
    pkg_gazebo_ros = get_package_share_directory('gazebo_ros')

    return LaunchDescription([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')),
            launch_arguments={'world': world}.items(),
        ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch',
                             'gzclient.launch.py')), ),
        ExecuteProcess(cmd=[
            'ros2', 'param', 'set', '/gazebo', 'use_sim_time', use_sim_time
        ],
                       output='screen'),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [launch_file_dir, '/robot_description.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),
    ])
Ejemplo n.º 16
0
def generate_launch_description():
    # Get gazebo_ros package path
    gazebo_ros_share_path = get_package_share_directory('gazebo_ros')
    lobot_desc_share_path = get_package_share_directory('lobot_description')
    lobot_urdf_path = os.path.join(lobot_desc_share_path, 'robots/biped.urdf')
    # Launch gzserver
    gzserver = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(gazebo_ros_share_path, 'launch',
                         'gzserver.launch.py')),
        launch_arguments={'extra_gazebo_args': '__log_level:=debug'}.items())

    # GAZEBO_MODEL_PATH has to be correctly set for Gazebo to be able to find the model
    spawn_entity = Node(
        package='gazebo_ros',
        node_executable='spawn_entity.py',
        arguments=['-entity', 'lobot', '-file', lobot_urdf_path, '-z', "0.22"],
        output='screen')

    # Launch gzclient
    gzclient = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(gazebo_ros_share_path, 'launch',
                         'gzclient.launch.py')), )
    return LaunchDescription([
        gzserver,
        spawn_entity,
        gzclient,
    ])
def generate_launch_description():
    executable = "executable" if ROS_DISTRO == ROS_DISTRO_FOXY else "node_executable"
    pkg_share = get_package_share_directory("tennis_court")
    gazebo_ros_share = get_package_share_directory("gazebo_ros")

    # Gazebo Server
    gzserver_launch_file = os.path.join(gazebo_ros_share, "launch",
                                        "gzserver.launch.py")
    world_file = os.path.join(pkg_share, "worlds", "court.world")
    gzserver_launch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(gzserver_launch_file),
        launch_arguments={
            "world": world_file,
            "verbose": "false",
            "pause": LaunchConfiguration("paused")
        }.items())

    # Gazebo Client
    gzclient_launch_file = os.path.join(gazebo_ros_share, "launch",
                                        "gzclient.launch.py")
    gzclient_launch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(gzclient_launch_file),
        condition=IfCondition(LaunchConfiguration("gui")))

    static_tf_node = Node(package="tf2_ros",
                          arguments=[
                              "0", "0", "8", "3.14159", "1.57079", "3.14159",
                              "map", "zenith_camera_link"
                          ],
                          **{executable: "static_transform_publisher"})

    # Ball Manager
    ball_manager_node = Node(package="tennis_court",
                             condition=IfCondition(
                                 LaunchConfiguration("manager")),
                             parameters=[{
                                 "use_sim_time": True
                             }],
                             output="screen",
                             emulate_tty=True,
                             **{executable: "ball_manager.py"})

    # Rviz
    rviz_config_file = os.path.join(pkg_share, "config", "config.rviz")
    rviz_node = Node(package="rviz2",
                     arguments=["-d", rviz_config_file],
                     condition=IfCondition(LaunchConfiguration("rviz")),
                     parameters=[{
                         "use_sim_time": True
                     }],
                     **{executable: "rviz2"})

    return LaunchDescription([
        DeclareLaunchArgument(name="gui", default_value="true"),
        DeclareLaunchArgument(name="paused", default_value="false"),
        DeclareLaunchArgument(name="rviz", default_value="false"),
        DeclareLaunchArgument(name="manager",
                              default_value="true"), gzserver_launch,
        gzclient_launch, static_tf_node, ball_manager_node, rviz_node
    ])
def generate_launch_description():

    this_prefix = get_package_share_directory('random_nav')
    bricks_world = os.path.join(this_prefix, 'worlds', 'bricks.world')
    bricks_map = os.path.join(this_prefix, 'maps', 'bricks_map.yaml')

    # python launch file for turtle bot 3 doesnt exist
    tb_prefix = get_package_share_directory('turtlebot3_gazebo')
    worldLaunch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            [tb_prefix, '/launch/turtlebot_world_launch.py']), [
                ('world_file', bricks_world),
            ])

    tbviz_prefix = get_package_share_directory('turtlebot3_rviz_launchers')
    viewNavLaunch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            [tbviz_prefix, '/launch/view_navigation_launch.py']))

    moveBaseLaunch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            [this_prefix, '/launch/gazebo_launch.py']), [
                ('map_file', bricks_map),
            ])

    return LaunchDescription([worldLaunch, viewNavLaunch, moveBaseLaunch])
def generate_launch_description():
    use_sim_time = LaunchConfiguration('use_sim_time', default='true')
    world_file_name = 'turtlebot3_worlds/' + TURTLEBOT3_MODEL + '.model'
    world = os.path.join(get_package_share_directory('turtlebot3_gazebo'),
                         'worlds', world_file_name)
    launch_file_dir = os.path.join(
        get_package_share_directory('turtlebot3_gazebo'), 'launch')
    pkg_gazebo_ros = get_package_share_directory('gazebo_ros')

    return LaunchDescription([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')),
            launch_arguments={'world': world}.items(),
        ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch',
                             'gzclient.launch.py')), ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [launch_file_dir, '/robot_state_publisher.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),
    ])
Ejemplo n.º 20
0
def generate_launch_description():
    """
    Launch a minimal joystick + LGSVL demo.

    Under the default configuration, the joystick
    translator outputs and the LGSVL interface expects RawControlCommand. Controlling the vehicle
    can happen via the gamepad triggers and left joystick.
    """
    # --------------------------------- Params -------------------------------

    # Default joystick translator params
    joy_translator_param = DeclareLaunchArgument(
        'joy_translator_param',
        default_value=[
            get_share_file('joystick_vehicle_interface', 'param/logitech_f310.default.param.yaml')
        ],
        description='Path to config file for joystick translator')

    # Default lgsvl_interface params
    lgsvl_interface_param = DeclareLaunchArgument(
        'lgsvl_interface_param',
        default_value=[
            get_share_file('lgsvl_interface', 'param/lgsvl.param.yaml')
        ],
        description='Path to config file for lgsvl interface')

    # -------------------------------- Nodes-----------------------------------

    # Include Joystick launch
    joystick_launch_file_path = get_share_file('joystick_vehicle_interface',
                                               'launch/joystick_vehicle_interface.launch.py')
    joystick = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(joystick_launch_file_path),
        launch_arguments=[
            (
                "joy_translator_param",
                LaunchConfiguration("joy_translator_param")
            )
        ]
    )

    # Include LGSVL interface launch
    lgsvl_launch_file_path = get_share_file('lgsvl_interface',
                                            'launch/lgsvl.launch.py')
    lgsvl = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(lgsvl_launch_file_path),
        launch_arguments=[
            (
                "lgsvl_interface_param",
                LaunchConfiguration("lgsvl_interface_param")
            )
        ]
    )

    return LaunchDescription([
      joy_translator_param,
      lgsvl_interface_param,
      joystick,
      lgsvl
    ])
Ejemplo n.º 21
0
def generate_launch_description():
    # Get gazebo_ros package path
    gazebo_ros_share_path = get_package_share_directory('gazebo_ros')
    lobot_desc_share_path = get_package_share_directory('lobot_description')
    zero_g_world_path = os.path.join(lobot_desc_share_path,
                                     'worlds/zero_g_world.sdf')
    # Launch gzserver
    gzserver = IncludeLaunchDescription(PythonLaunchDescriptionSource(
        os.path.join(gazebo_ros_share_path, 'launch', 'gzserver.launch.py')),
                                        launch_arguments={
                                            'extra_gazebo_args':
                                            '__log_level:=info',
                                            'world': zero_g_world_path,
                                            'pause': 'true'
                                        }.items())

    return LaunchDescription([
        DeclareLaunchArgument(
            'gui',
            default_value='True',
            description=
            'Bool to specify if gazebo should be launched with GUI or not'),
        gzserver,
        IncludeLaunchDescription(PythonLaunchDescriptionSource(
            os.path.join(gazebo_ros_share_path, 'launch',
                         'gzclient.launch.py')),
                                 condition=IfCondition(
                                     LaunchConfiguration('gui'))),
    ])
Ejemplo n.º 22
0
def generate_launch_description():
    return LaunchDescription([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource([
                get_package_share_directory('velodyne_driver'),
                '/launch/velodyne_driver_node-VLP16-launch.py'
            ])),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource([
                get_package_share_directory('velodyne_pointcloud'),
                '/launch/velodyne_convert_node-VLP16-launch.py'
            ])),
        Node(package='robot_state_publisher',
             executable='robot_state_publisher',
             name='robot_state_publisher',
             parameters=[{
                 'robot_description':
                 Command([
                     'xacro', ' ',
                     get_package_share_directory('AkulaPackage') +
                     '/model/akula.urdf'
                 ])
             }]),
        Node(package='BaslerROS2', executable='BaslerNode', name='Basler'),
        Node(package='akula_package',
             executable='AkulaEncoderNode',
             name='AkulaEncoders'),
        #Node(
        #    package='AkulaPackage',
        #    executable='AkulaImuNode',
        #    name='AkulaIMU'
        #)
    ])
Ejemplo n.º 23
0
def generate_launch_description():
    return LaunchDescription([
        SetEnvironmentVariable('RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED', '1'),
		#Launch from Same Package
		#Launch Rviz
		IncludeLaunchDescription(PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/rviz.launch.py'])),
    	#Launch SLAM
		#TODO
		#Launch Controller
		IncludeLaunchDescription(PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/controller.launch.py'])),
		#Launch Localization
		#IncludeLaunchDescription(PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/localization.launch.py'])),
		#Launch Navigation
    	#IncludeLaunchDescription(PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/navigation.launch.py'])),
		#Launch SLAM
		#IncludeLaunchDescription(PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/slam.launch.py'])),


		#Pull from different packages
		#IncludeLaunchDescription(
        #    PythonLaunchDescriptionSource(os.path.join(launch_dir,
        #                                               'bringup_launch.py')),
        #    launch_arguments={
        #                      'map': "/home/ros/willmap.yaml"}.items()),
        #IncludeLaunchDescription(PythonLaunchDescriptionSource(os.path.join(launch_dir, 'localization_launch.py')),
    ])
Ejemplo n.º 24
0
def generate_launch_description():
    use_sim_time = LaunchConfiguration('use_sim_time', default='True')

    world_path = os.path.join(get_package_share_directory('tello_gazebo'),
                              'worlds', 'no_roof_small_warehouse.world')
    launch_file_dir = os.path.join(get_package_share_directory('tello_gazebo'),
                                   'launch')

    pkg_gazebo_ros = get_package_share_directory('gazebo_ros')

    urdf_path = os.path.join(get_package_share_directory('tello_description'),
                             'urdf', 'tello.urdf')

    rviz_path = os.path.join(get_package_share_directory('tello_gazebo'),
                             'rviz', 'main.rviz')

    return LaunchDescription([
        # Gazebo envs
        SetEnvironmentVariable(name='GAZEBO_RESOURCE_PATH',
                               value=['/usr/share/gazebo-11']),

        # Gazebo Server
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')),
            launch_arguments={'world': world_path}.items(),
        ),

        # Gazebo Client
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch',
                             'gzclient.launch.py')), ),

        # Spawn urdf
        Node(package='gazebo_ros',
             executable='spawn_entity.py',
             arguments=['-entity', 'tello', '-file', urdf_path, '-z', '1']),

        # Robot State Publisher
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [launch_file_dir, '/robot_state_publisher.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),

        # Tello Driver
        Node(package='tello_driver',
             executable='tello_joy_main',
             namespace="drone"),

        # Joystick
        Node(package='joy', executable='joy_node', namespace="drone"),

        # RViz2
        Node(package='rviz2',
             executable='rviz2',
             name='rviz2',
             arguments=['-d', rviz_path]),
    ])
Ejemplo n.º 25
0
def generate_launch_description():
    user = LaunchConfiguration('user',
                               default=os.path.join(
                                   get_package_share_directory('ecard'),
                                   'users', 'user0.yaml'))
    config_rviz2 = os.path.join(get_package_share_directory('ecard'), 'config',
                                'rgbd_gaze', 'calibration', 'rviz2.rviz')

    return LaunchDescription([
        DeclareLaunchArgument(
            'user',
            default_value=user,
            description='Path to config for RGB-D Gaze user'),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource([
                os.path.join(get_package_share_directory('ecard'), 'launch',
                             'rs', 'rs.launch.py')
            ]), ),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource([
                os.path.join(get_package_share_directory('ecard'), 'launch',
                             'rgbd_gaze', 'accuracy.launch.py')
            ]),
            launch_arguments=[('user', user)],
        ),
        IncludeLaunchDescription(PythonLaunchDescriptionSource([
            os.path.join(get_package_share_directory('ecard'), 'launch',
                         'rviz2.launch.py')
        ]),
                                 launch_arguments=[('config_rviz2',
                                                    config_rviz2)]),
    ])
def generate_launch_description():
    rviz_config_dir = os.path.join(get_package_share_directory('navi_sim'),
                                   'config', 'navi_sim.rviz')
    description_dir = os.path.join(
        get_package_share_directory('wamv_description'), 'launch')
    simulator = ComposableNodeContainer(
        name='navi_sim_bringup_container',
        namespace='sensing',
        package='rclcpp_components',
        executable='component_container',
        composable_node_descriptions=[
            getNaviSimComponent(),
            getLidarSimComponent('front_lidar'),
            getLidarSimComponent('rear_lidar'),
            getLidarSimComponent('right_lidar'),
            getLidarSimComponent('left_lidar'),
            getCameraSimComponent('front_left_camera'),
            getCameraSimComponent('front_right_camera'),
            getCameraSimComponent('rear_left_camera'),
            getCameraSimComponent('rear_right_camera'),
            getCameraSimComponent('left_camera'),
            getCameraSimComponent('right_camera')
        ],
        output='screen')

    hermite_path_planner_package_path = get_package_share_directory(
        'hermite_path_planner_bringup')
    hermite_path_planner_launch_dir = os.path.join(
        hermite_path_planner_package_path, 'launch')
    perception_bringup_package_path = get_package_share_directory(
        'perception_bringup')
    perception_bringup_launch_dir = os.path.join(
        perception_bringup_package_path, 'launch')
    return LaunchDescription([
        simulator,
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [description_dir, '/wamv_description.launch.py']), ),
        Node(package='rviz2',
             executable='rviz2',
             name='rviz2',
             arguments=['-d', rviz_config_dir],
             output='screen'),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [hermite_path_planner_launch_dir, '/bringup.launch.py'])),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource([
                perception_bringup_launch_dir, '/perception_bringup.launch.py'
            ])),
        Node(package='robotx_bt_planner',
             executable='robotx_bt_planner_node',
             name='robotx_bt_planner_node',
             parameters=[{
                 'config_package': 'robotx_bt_planner',
                 'config_file': 'config/qualifytask.yaml',
                 'update_rate': 20.0
             }])
    ])
Ejemplo n.º 27
0
def generate_launch_description():
    turtlebot3_cartographer_prefix = get_package_share_directory(
        'turtlebot3_cartographer')
    turtlebot3_cartographer_launch_dir = os.path.join(
        turtlebot3_cartographer_prefix, 'launch')
    cartographer_config_dir_path = os.path.join(turtlebot3_cartographer_prefix,
                                                'config')
    param_file_name = TURTLEBOT3_MODEL + '.yaml'
    nav2_launch_file_dir_path = os.path.join(
        get_package_share_directory('nav2_bringup'), 'launch')
    navigation_param_file_path = os.path.join(
        get_package_share_directory('turtlebot3_navigation2'), 'param',
        param_file_name)
    wall_follower_pack_share_directory = get_package_share_directory(
        "wall_follower")
    wall_follower_launch_dir = os.path.join(wall_follower_pack_share_directory,
                                            'launch')

    use_sim_time = LaunchConfiguration('use_sim_time', default='true')
    cartographer_occupancy_grid_dir = LaunchConfiguration(
        'cartographer_occupancy_grid',
        default=turtlebot3_cartographer_launch_dir)
    cartographer_config_dir = LaunchConfiguration(
        'cartographer_config_dir', default=cartographer_config_dir_path)
    configuration_basename = LaunchConfiguration(
        'configuration_basename', default='turtlebot3_lds_2d.lua')
    resolution = LaunchConfiguration('resolution', default='0.05')
    publish_period_sec = LaunchConfiguration('publish_period_sec',
                                             default='1.0')
    nav2_launch_file_dir = LaunchConfiguration(
        'navigation_launch_dir', default=nav2_launch_file_dir_path)
    navigation_param_dir = LaunchConfiguration(
        'params', default=navigation_param_file_path)

    return LaunchDescription([
        IncludeLaunchDescription(PythonLaunchDescriptionSource(
            [wall_follower_launch_dir, '/start_navigation.launch.py']),
                                 launch_arguments={
                                     'use_sim_time': use_sim_time,
                                     'navigation_launch_dir':
                                     nav2_launch_file_dir,
                                     'params': navigation_param_dir
                                 }.items()),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                [wall_follower_launch_dir, '/start_cartographer.launch.py']),
            launch_arguments={
                'use_sim_time': use_sim_time,
                'resolution': resolution,
                'publish_period_sec': publish_period_sec,
                'cartographer_occupancy_grid': cartographer_occupancy_grid_dir,
                'cartographer_config_dir': cartographer_config_dir,
                'configuration_basename': configuration_basename
            }.items(),
        ),
        Node(package='wall_follower',
             executable='nav2_wall_follower',
             name='nav2_wall_follower')
    ])
Ejemplo n.º 28
0
def generate_launch_description():
    return launch.LaunchDescription(
        [
            IncludeLaunchDescription(
                PythonLaunchDescriptionSource(
                    [get_package_share_directory(robot), "/launch/interfaces.py"]
                ),
                launch_arguments={
                    "namespace": robot,
                    "params_file": os.path.join(
                        get_package_share_directory(robot), "param", f"{robot}.yml"
                    ),
                }.items(),
            )
            for robot in robots
        ]
        + [
            IncludeLaunchDescription(
                PythonLaunchDescriptionSource(
                    [
                        get_package_share_directory("assurancetourix"),
                        "/launch/launch.py",
                    ]
                ),
                launch_arguments={
                    "namespace": "assurancetourix",
                    "params_file": os.path.join(
                        get_package_share_directory("assurancetourix"),
                        "param",
                        "assurancetourix.yml",
                    ),
                }.items(),
            )
        ]
        + [
            GroupAction(
                [
                    Node(
                        package="strategix",
                        executable="strategix",
                        output="screen",
                    ),
                    WebotsLauncher(
                        mode="realtime",
                        world="tools/simulation/worlds/cdr2022.wbt",
                    ),
                ]
            )
        ]
        + [
            RegisterEventHandler(
                event_handler=OnProcessExit(
                    on_exit=[
                        EmitEvent(event=Shutdown()),
                    ]
                )
            )
        ]
    )
Ejemplo n.º 29
0
def generate_launch_description():
    # ROS Packages
    pkg_mammoth_gazebo = get_package_share_directory('mammoth_gazebo')
    pkg_slam_toolbox = get_package_share_directory('slam_toolbox')

    # Arguments
    use_sim_time = LaunchConfiguration('use_sim_time', default='true')
    slam_params_file_path = os.path.join(pkg_mammoth_gazebo, 'config/slam',
                                         'mapper_params_online_async.yaml')
    slam_params_file = LaunchConfiguration('slam_params_file',
                                           default=slam_params_file_path)

    nav2_params_file_path = os.path.join(pkg_mammoth_gazebo,
                                         'config/navigation',
                                         'nav2_params.yaml')
    nav2_params_file = LaunchConfiguration('nav2_params_file',
                                           default=nav2_params_file_path)

    # Nodes
    slam_toolbox = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(pkg_slam_toolbox, 'launch',
                         'online_async_launch.py')),
        launch_arguments={
            'namespace': '',
            'use_sim_time': use_sim_time,
            'params_file': slam_params_file
        }.items(),
    )

    nav2_stack = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(pkg_mammoth_gazebo, 'launch/include/navigation/nav2',
                         'nav.launch.py')),
        launch_arguments={
            'namespace': '',
            'use_sim_time': use_sim_time,
            'params_file': nav2_params_file,
            'autostart': 'true'
        }.items(),
    )

    return LaunchDescription([
        # Launch Arguments
        DeclareLaunchArgument(
            'slam_params_file',
            default_value=slam_params_file_path,
            description='The file path of the params file for slam ToolBox'),
        DeclareLaunchArgument(
            'nav2_params_file',
            default_value=nav2_params_file_path,
            description='The file path of the params file for Navigation2'),
        DeclareLaunchArgument('use_sim_time',
                              default_value='true',
                              description='Use simulation clock if true'),
        slam_toolbox,
        nav2_stack,
    ])
Ejemplo n.º 30
0
def generate_launch_description():
    use_sim_time = LaunchConfiguration('use_sim_time', default='true')

    tb_launch_file_dir = os.path.join(get_package_share_directory('turtlebot3_gazebo'), 'launch')
    nav2_launch_file_dir = os.path.join(get_package_share_directory('turtlebot3_navigation2'), 'launch')

    default_world_path = os.path.join(get_package_share_directory('random_nav'), 'worlds', 'room.world')
    default_map_path = os.path.join(get_package_share_directory('random_nav'), 'maps', 'room.yaml')

    launch_file_dir = os.path.join(get_package_share_directory('turtlebot3_gazebo'), 'launch')
    pkg_gazebo_ros = get_package_share_directory('gazebo_ros')

    return LaunchDescription([
        DeclareLaunchArgument('map', default_value=default_map_path),
        # START SIMULATOR
        #ExecuteProcess(
        #    cmd=['gazebo', '--verbose', LaunchConfiguration('world'), '-s', 'libgazebo_ros_init.so'],
        #    output='screen'),
        #   
        #ExecuteProcess(
        #    cmd=['ros2', 'param', 'set', '/gazebo', 'use_sim_time', use_sim_time],
        #    output='screen'),
        #
        #Node(
        #    package="jmu_turtlebot3_bringup",
        #    executable="tb_fixer",
        #    name="tb_fixer",
        #    output="screen",
        #),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')
            ),
            launch_arguments={'world': default_world_path}.items(),
        ),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(
                os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py')
            ),
        ),

        IncludeLaunchDescription(
            PythonLaunchDescriptionSource([launch_file_dir, '/robot_state_publisher.launch.py']),
            launch_arguments={'use_sim_time': use_sim_time}.items(),
        ),

        # START NAV SYSTEM
        
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource([nav2_launch_file_dir, '/navigation2.launch.py']),
            launch_arguments=[
                ('map', LaunchConfiguration('map')),
                ('use_sim_time', use_sim_time)
            ],
        ),
        
    ])