ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To include an XML file, you need to use FrontendLaunchDescriptionSource instead of PythonLaunchDescriptionSource, which can be imported with from launch.launch_description_sources import FrontendLaunchDescriptionSource.

So the correct code would be:

def generate_launch_description():
    return LaunchDescription([ 
        IncludeLaunchDescription(FrontendLaunchDescriptionSource(
        os.path.join(get_package_share_directory('rosbridge_server'),
         'launch/rosbridge_websocket_launch.xml')))
    ])