How to check if global ROS node is already running in MATLAB?
20 views (last 30 days)
Show older comments
Rahul Bhadani on 24 Feb 2016
Commented: Thomas Stubbs on 27 Jan 2023
Hi, I am using Robotics Toolbox to interface MATLAB and ROS. Before doing rosinit('http://220.127.116.11:11311') i want to check whether a Global Ros Node corresponding to it is running. What are the steps to accomplish that?
Marcelino Almeida on 22 Mar 2017
Edited: Marcelino Almeida on 22 Mar 2017
I know it has been a long time, but I decided to post an answer here in case other people might be wondering how to do this.
Although there isn't much documentation on this, and this might not exist in future versions of the Robotics Toolbox, I've been able to check for node running through the following call:
The command above returns 1 if active, 0 if inactive.
Thomas Stubbs on 27 Jan 2023
I was able to do the Marcelino's solution in 2022b with a slight change:
More Answers (0)
Find more on Network Connection and Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!