GithubHelp home page GithubHelp logo

Comments (5)

dhood avatar dhood commented on August 18, 2024

Clarification: this is referring to python scripts that create their own launcher manually and are invoked with python directly.

As @wjwwood noted in ros2/demos#175 (comment) this does NOT happen for "launch files" that are invoked with launch, e.g. https://github.com/ros2/demos/blob/a4d48aa57ba5752122c23bf79e0959052b96337e/lifecycle/launch/lifecycle_demo_launch.py

from launch.

dhood avatar dhood commented on August 18, 2024

I'm at a loss as to why converting the example into the same format as https://github.com/ros2/demos/blob/a4d48aa57ba5752122c23bf79e0959052b96337e/lifecycle/launch/lifecycle_demo_launch.py doesn't fix it.

This still hangs (executed with launch rather than python) on Windows:

import os

from launch.exit_handler import primary_exit_handler

def launch(launch_descriptor, argv):
    
    if os.name == 'nt':
        cmd=['ping', '127.0.0.1', '-n', '60']
    else:
        cmd=['sleep', '60']
    launch_descriptor.add_process(
        cmd=cmd,
    )
    launch_descriptor.add_process(
        cmd=cmd,
        exit_handler=primary_exit_handler,
    )

I have on one occasion seen it exit cleanly so there might be a race condition involved.

from launch.

rhololkeolke avatar rhololkeolke commented on August 18, 2024

I have this same issue on Linux. It seems that loop.run_forever is called, but loop.stop is never called.

If you add a loop.stop to the end of DefaultLaunch._run it fixes the issue. However, I'm not sure if it causes any other issues. I'm not super familiar with the asyncio library.

from launch.

sloretz avatar sloretz commented on August 18, 2024

FYI for future readers, #69 fixed on OSX, but issue still exists on windows.

from launch.

wjwwood avatar wjwwood commented on August 18, 2024

Closing since the legacy launch testing is no longer in use.

from launch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.