Comments (2)
I spoke to @wjwwood and we suspect that things are getting hung here
The lifecycle node checks that a service is available and then tries to call it apparently without a timeout. If the service goes away after the check but before the call, we can maybe hang forever.
I'm trying to reproduce my issue again with additional instrumentation to confirm this hypothesis
from launch_ros.
@wjwwood It looks like you were right. I added some print statements to LifecycleNode:
def _call_change_state(self, request, context: launch.LaunchContext):
while not self.__rclpy_change_state_client.wait_for_service(timeout_sec=1.0):
if context.is_shutdown:
self.___logger.warning(
"Abandoning wait for the '{}' service, due to shutdown.".format(
self.__rclpy_change_state_client.srv_name),
)
return
import time; time.sleep(0.5)
print("Calling the service {}".format(request))
response = self.__rclpy_change_state_client.call(request)
print("Finished calling service got response {}".format(response))
if not response.success:
self.__logger.error(
"Failed to make transition '{}' for LifecycleNode '{}'".format(
ChangeState.valid_transitions[request.transition.id],
self.node_name,
)
)
And finally got this to hang:
[lifecycle_listener-2] [INFO] [listener]: notify callback: Transition from state inactive to cleaningup
[lifecycle_listener-2] [INFO] [listener]: notify callback: Transition from state cleaningup to unconfigured
Finished calling service got response lifecycle_msgs.srv.ChangeState_Response(success=True)
Calling the service lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=5, label=''))
[lifecycle_talker-1] [INFO] [lc_talker]: on shutdown is called from state unconfigured.
[lifecycle_listener-2] [INFO] [listener]: notify callback: Transition from state unconfigured to shuttingdown
[lifecycle_listener-2] [INFO] [listener]: notify callback: Transition from state shuttingdown to finalized
ok
----------------------------------------------------------------------
Ran 1 test in 4.858s
OK
[INFO] [lifecycle_listener-2]: sending signal 'SIGINT' to process[lifecycle_listener-2]
[INFO] [lifecycle_talker-1]: sending signal 'SIGINT' to process[lifecycle_talker-1]
[lifecycle_listener-2] [INFO] [rclcpp]: signal_handler(signal_value=2)
[lifecycle_talker-1] [INFO] [rclcpp]: signal_handler(signal_value=2)
[INFO] [lifecycle_listener-2]: process has finished cleanly [pid 13315]
[INFO] [lifecycle_talker-1]: process has finished cleanly [pid 13314]
As you can see, the final "Calling the service" does not have a matching "Finished calling service" line.
from launch_ros.
Related Issues (20)
- `test_load_composable_nodes.py` flaky on Windows HOT 1
- Action that automatically brings LifecycleNode to active state HOT 5
- Numbers in scientific notation are not tolerated HOT 8
- :man_farmer: `test_launch_ros` test regressions on Foxy `test_launch_ros.test.test_launch_ros.actions.test_node.TestNode.*` HOT 1
- Support for conditional parameter import from yaml file in XML launch file HOT 11
- :man_farmer: Flaky issues with `launch_testing_ros`: `terminate called without an active exception` HOT 13
- LaunchConfiguration is not read from ComposableNode when included inside a group action HOT 11
- how to write a launch file to show .xacro or .urdf file to rviz2 for ros-dashing HOT 1
- IfCondition is ignored in ComposableNode if LoadComposableNodes is used HOT 5
- Is it possible to pass namespace of ComposableContainer? HOT 1
- Accessing numerical parameter causes exception
- Setting name parameter leads to duplicate nodes with same name HOT 1
- YAML-parameters won't read correctly for two or more composable nodes with non-empty root namespace HOT 2
- Get content of topic from `launch_testing_ros::WaitForTopics` HOT 6
- `WaitForTopics`: there is no way to manually trigger a topic HOT 8
- `WaitForTopics`: exit() methods should not reraise the passed-in exception HOT 1
- Component Containers on Different ROS_DOMAIN_IDs Fail to Launch HOT 1
- --ros-args argument is always present in Node HOT 1
- ComposableNodeContainer and respawn=True HOT 14
- FeatureRequest: Add type hints to launch_testing_ros examples. HOT 6
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_ros.