Communicating from MATLAB to a ROS network

We have worked with some MATLAB commands and we've understood that we can communicate with ROS from MATLAB. But the previous commands were executed in a MATLAB terminal by making MATLAB the ROS master. But what do we do when we need to communicate with a ROS network or a ROS-based robot? The method is simple.

Assuming your PC has MATLAB and the ROS PC/robot is connected to the same network. It can be connected either through LAN or Wi-Fi. If the PC and robot are connected to the same network, both should have identical IP addresses. The first step is to find each device's IP address.

If your MATLAB installation is in Windows, you can open Command Prompt window by simply searching for cmd in the search window; ...

Get ROS Robotics Projects now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.