Main Content

rosshutdown

Shut down ROS system

Since R2019b

Description

example

rosshutdown shuts down the global node and, if it is running, the ROS master. When you finish working with the ROS network, use rosshutdown to shut down the global ROS entities created by rosinit. If the global node and ROS master are not running, this function has no effect.

Note

After calling rosshutdown, any ROS entities (objects) that depend on the global node like subscribers created with rossubscriber, are deleted and become unstable.

Prior to calling rosshutdown, call clear on these objects for a clean removal of ROS entities.

Examples

collapse all

rosinit
Launching ROS Core...
Done in 0.66466 seconds.
Initializing ROS master on http://172.29.194.91:53999.
Initializing global node /matlab_global_node_11848 with NodeURI http://dcc365816glnxa64:44313/ and MasterURI http://localhost:53999.

When you are finished, shut down the ROS network.

rosshutdown
Shutting down global node /matlab_global_node_11848 with NodeURI http://dcc365816glnxa64:44313/ and MasterURI http://localhost:53999.
Shutting down ROS master on http://172.29.194.91:53999.

Version History

Introduced in R2019b

See Also