Before running a ROS node, we have to run the roscore command, right? The roscore command will start a ROS master, and other ROS nodes can find each other through it. In MATLAB, instead of the roscore command, we can use the rosinit function to start a ROS master.
The rosinit function can start a ROS master and a global node that is connected to the master. Here, we can see that MATLAB itself can act as a ROS master and other nodes can connect to it. We can also connect to a ROS network from MATLAB. We'll cover that in the next section. In such a setup, the ROS master is running on a different system, either on a ROS robot or ROS PC. Let's try some of the ROS commands in MATLAB to list ROS nodes, topics, and all that. The good thing about the MATLAB - ROS interface is that the commands of Robotics Toolbox are similar to the actual ROS bash commands. Let's go through a few commands to list out ROS parameters.