Giter VIP home page Giter VIP logo

ros1_lifecycle's Introduction

ROS1 Lifecycle

ros1_lifecycle provides a component lifecycle implementation for ROSv1.

  • Lifecycle provides the abstract classes for implementing Life-cycle mechanism to application nodes. See ROS2 Managed Nodes for a comprehensive description of the core concepts of Node life-cycle.
  • Lifecycle_python is similar to Lifecycle but implemented in python.
  • Lifecycle_test_library provides helper templates/classes to test a Life-cycle managed nodes.
  • Mode_manager is responsible for knowing and switching the system's global mode.
  • Lm_monitor provides scripts to monitor the status of the nodes configured using Lifecycle or Lifecycle_python

bosch_arch_lifecycle is currently licensed under the Apache Software License v2, cf. LICENSE.

bosch_arch_lifecycle is hosted at [https://github.com/bosch-robotics-cr/ros1_lifecycle]

Maintainer:

Authors:

ros1_lifecycle's People

Contributors

lucasw avatar iluetkeb avatar scott-robotics avatar

Watchers

James Cloos avatar  avatar

ros1_lifecycle's Issues

Unregistering publishers causes error messages when there are subscribers

Unregistering publishers ideally would go into _on_cleanup() as in managed_node_example.py, but this creates error messages

rosrun lifecycle_test_library managed_node_example.py
# configure
rostopic pub /example_node/lifecycle/goal lifecycle_msgs/LifecycleActionGoal "{goal: {transition: 20}}" -1
rostopic echo /example_node/chatter
# activate
rostopic pub /example_node/lifecycle/goal lifecycle_msgs/LifecycleActionGoal "{goal: {transition: 22}}" -1
# deactivate
rostopic pub /example_node/lifecycle/goal lifecycle_msgs/LifecycleActionGoal "{goal: {transition: 23}}" -1
# cleanup
rostopic pub /example_node/lifecycle/goal lifecycle_msgs/LifecycleActionGoal "{goal: {transition: 21}}" -1
Welcome to the example node
_on_configure 
_on_activate 
_on_deactivate 
_on_cleanup 
[WARN][1586962873.358237 /opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py:349 /example_node]: Could not process inbound connection: [/example_node] is not a publisher of [/example_node/chatter]. Topics are [['/rosout', 'rosgraph_msgs/Log'], ['/example_node/lifecycle_state', 'lifecycle_msgs/Lifecycle'], ['/example_node/lifecycle/result', 'lifecycle_msgs/LifecycleActionResult'], ['/lm_events', 'lifecycle_msgs/lm_events'], ['/example_node/lifecycle/feedback', 'lifecycle_msgs/LifecycleActionFeedback'], ['/example_node/lifecycle/status', 'actionlib_msgs/GoalStatusArray']]{'message_definition': 'string data\n', 'callerid': '/rostopic_12774_1586962724795', 'tcp_nodelay': '0', 'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', 'topic': '/example_node/chatter', 'type': 'std_msgs/String'}
...

Getting rid of false shutdown warning and error messages is a big reason to use lifecycle management. (Are they really false warnings? Does anything leak?)

Not unregistering publishers is one option, but defeats the purpose of cleanup.

A system could be crafted so that subscribers are unregistered everywhere in the system before publishers, for example subscribers could be created in activation and unregistered in deactivation, and publishers in configure and cleanup, and non-lifecycle nodes would have to be shut down entirely. This only works where a system wide cleanup is what is desired as opposed to a single or small set of nodes- but the system wide case is more likely the one where avoiding false error messages is a higher priority.

The root issue is here: ros/ros_comm#111 - it has existed for years. Maybe the warning could be made into a debug message? But there are probably other cases where it is legitimate and important to see.

Additional discussion is here:
RobotWebTools/rosbridge_suite#138 (comment) from RobotWebTools/rosbridge_suite#138

Managed nodelet example

Possibly multiple inheritance will work?

Nodelets already have some trappings of lifecycle management to them, but through a different interface. Conceptually the nodelet management is a lower layer than the lifecycle management, though they overlap.

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.