Ask Your Question
1

How to kill nodes in ROS2?

asked 2019-05-16 06:02:43 -0500

askkvn gravatar image

In ROS we have rosnode kill -a. Do we have something like this in ROS2?

I tried ros2 node kill, but it didn't work.

I am using Ubuntu 18.04 LTS | ROS2 Crystal | Gazebo 9.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2019-05-16 06:27:29 -0500

gvdhoorn gravatar image

updated 2019-05-16 06:27:46 -0500

Afaik there is no rosnode kill in ROS 2.

ROS 2 introduces the concept of managed nodes, which have a node lifecycle (ROS2 Design: Managed nodes).

With nodes that support it you can then use

ros2 lifecycle set <nodename> shutdown

which should make the node with name nodename transition to its shutdown state and consequently shutdown the process.

edit flag offensive delete link more

Comments

Can confirm, there is no feature to kill nodes remotely. This feature was related to enforcing node name uniqueness (duplicate names would cause one of the nodes to be killed), but we haven't addressed that yet.

William gravatar imageWilliam ( 2019-05-17 14:51:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-05-16 06:02:43 -0500

Seen: 232 times

Last updated: May 16