Comments (5)
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.
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.
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.
FYI for future readers, #69 fixed on OSX, but issue still exists on windows.
from launch.
Closing since the legacy launch testing is no longer in use.
from launch.
Related Issues (20)
- Launch.py from another launcher HOT 2
- Substitutions for string manipulations and xacro HOT 1
- Bug or feature? PushRosNamespace is not forwarded to managed actions HOT 4
- XMLLaunchDescriptionSource: Unknown substitution: find HOT 1
- [FeatureRequest] Is it possible to skip argument checking in include_launch_description
- Launch doesn't stop running nodes when exception thrown HOT 2
- Can't include [launch_testing_ament_cmake] in a launch only package HOT 1
- Bug when setting launch arguments of included descriptions HOT 1
- Requirement:Only start all nodes and then this ros2 launch process exit HOT 2
- `ExecuteProcess` with `shell=True` gets incorrect exit code from the executed process HOT 2
- Add an option to disable creating log files by the launch system HOT 1
- Unexpected YAML parsing with get_attr and List[Entity] type HOT 1
- pytest 8.1 incompatibility: TypeError: import_path() missing 1 required keyword-only argument: 'consider_namespace_packages' HOT 3
- Tests on Windows falsely positive reporting passed due to SIGINT handling HOT 1
- ThisLaunchFileDir throws error in debug mode
- Change ISSUE_TEMPLATE.md HOT 1
- Return Code not set on SIGINT HOT 3
- RegisterEventHandler: action_matcher must be an 'ExecuteProcess' instance or a callable HOT 2
- Request for Release in Iron HOT 2
- Feature request: run multiple tests in parallel with `colcon test` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from launch.