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

The issue is your use of whitespace in the Python launch file. Python cares about whitespace.

I believe what is happening is that the class launch.LaunchDescription is being returned instead of an object instance. To fix your file, move the opening parenthesis for the LaunchDescription constructor next to the type name. It's probably best to do this for the Node as well:

def generate_launch_description():
    return launch.LaunchDescription(
        [
            launch_ros.actions.Node(
                package='simple_test', 
                node_executable='my_test',
                output='screen'
            )
        ]
    )

Generally, I'd recommend following the Python style guide, PEP 8, when writing your launch files.