www.gusucode.com > robotics 案例源码程序 matlab代码 > robotics/RunAROSCoreOnAROSDeviceExample.m
%% Run ROS Core on ROS Device % 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 = '192.168.154.131'; d = rosdevice(ipaddress,'user','password') %% % Run a ROS core and check if it is running. runCore(d) running = isCoreRunning(d) %% % Stop the ROS core and confirm that it is no longer running. stopCore(d) running = isCoreRunning(d)