Comments (6)
Yes, the get_node_names()
(https://docs.ros2.org/galactic/api/rclpy/api/node.html#rclpy.node.Node.get_node_names) method should return all running nodes. I am not sure, though, how quickly a node is removed after it dies. Maybe you have to test this.
from diagnostics.
You can publish the results similar to how it is done here https://github.com/ros/diagnostics/blob/ros2/diagnostic_updater/diagnostic_updater/example.py
from diagnostics.
Hi @TZECHIN6. I agree that this may be a common use case. Currently, there is no pre-made node for that. Please feel free to add one to: https://github.com/ros/diagnostics/tree/ros2/diagnostic_common_diagnostics :)
from diagnostics.
To verify a node is dead or not, what is the best way to do so, a very simple method is to publish a heartbeat message say every single second, but this come to creating a whole bunch of messages if there are many nodes.
is there any build in function in ros2 can directly access its state?
get_node_names() Function in rclpy will list out all node within ROS2 environment, I am not sure does a node can be seen mean that node is alive and functioning…
from diagnostics.
I can come up with a very quick way to test it using python list element check, but this come down to hardcoding the node name needed to be checked... which some time the launch file can rename the node. So I am not so sure is there any dynamic way to solve this if using get_node_names()
.
I can share it to the common diagnostics, do you expect the output of the diagnostics result in a form of this /diagnostic
topic? Acutally I havent use this before, so have to understand the structure of it..
from diagnostics.
I just spotted that there is a class (here) actually doing something to what i want, check a node is alive or not. but I am not so sure how to use it. I will rise another issue about that. Thanks
from diagnostics.
Related Issues (20)
- diagnostic_updater warning: Implicit conversions on humble HOT 1
- Deprecate ntpdate usage, replace with ntpd in NTP Monitor HOT 1
- Add tests for NTP Monitor HOT 2
- Humble diagnostic_common_diagnostics build error HOT 4
- Change default branch to Rolling HOT 3
- Incorrect dependency export of pluginlib HOT 5
- Why is the /diagnostics_toplevel_state ERROR when one of the diagnostics is STALE HOT 7
- Use Diagnostics aggregator node with other topic names HOT 1
- [Question] How to disable "individual" diagnostic messages HOT 4
- [ros2] Diagnostics aggregator base path HOT 2
- Logging error when running Python `Updater` in `verbose == True` mode HOT 1
- Python DiagnosedPublisher crashes on publishing headerless topic HOT 2
- Updater::add to take ownership of FunctionDiagnosticTask HOT 2
- CI issues with ntp_monitor test
- [Feature request] Add possibility to load further aggregator configurations after node was started HOT 1
- How to implement heartbeat diagnostic in ros2 system
- Aggregator and updater with fully qualified node name
- Migrate hd_monitor.py to ROS2 HOT 2
- Make diagnostic aggregator composable HOT 1
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 diagnostics.