Main Content


Determine if ROS core is running

Since R2019b



running = isCoreRunning(device) determines if the ROS core is running on the connected device.


collapse all

Connect to a remote ROS device and start a ROS core. The ROS core is needed to run ROS nodes to communicate via a ROS network. You can run and stop a ROS core or node and check their status using a rosdevice object.

Create a connection to a ROS device. Specify the address, user name, and password of your specific ROS device. The device contains information about the ROS device, including the available ROS nodes that can be run using runNode.

ipaddress = '';
d = rosdevice(ipaddress,'user','password')
d = 
  rosdevice with properties:

      DeviceAddress: ''
           Username: 'user'
          ROSFolder: '/opt/ros/indigo'
    CatkinWorkspace: '~/catkin_ws'
     AvailableNodes: {'voxel_grid_filter_sl'}

Run a ROS core and check if it is running.

Another roscore / ROS master is already running on the ROS device. Use the 'stopCore' function to stop it.
running = isCoreRunning(d)
running = logical

Stop the ROS core and confirm that it is no longer running.

running = isCoreRunning(d)
running = logical

Input Arguments

collapse all

ROS device, specified as a rosdevice object.

Output Arguments

collapse all

Status of whether ROS core is running, returned as true or false.

Version History

Introduced in R2019b