Main Content

Start and Stop ROS Master on Raspberry Pi

This section shows how to use the raspberrypi object function to start or stop a ROS master on your Raspberry Pi® hardware board.

To start a ROS master on your Raspberry Pi hardware board, execute these commands in the MATLAB® Command Window.

r = raspberrypi;
startroscore(r, 'catkin_ws');

Replace the second argument catkin_ws with the path of the Catkin workspace on your Raspberry Pi.

r = raspberrypi;
startroscore(r, '/home/pi/my_catkin_ws');

To stop the ROS master on your Raspberry Pi hardware board, execute this command in the MATLAB Command Window.

stoproscore(r);

See Also

Related Topics