How to resolve error "The ROS master is already running on port 11311"?
32 views (last 30 days)
Show older comments
MathWorks Support Team
on 19 Apr 2021
Answered: MathWorks Support Team
on 20 May 2021
The following error is thrown
The ROS master is already running on port 11311. Try connecting to this master or creating a new ROS master
that uses a different port.
when running
core = ros.Core;
How can I resolve this error?
Accepted Answer
MathWorks Support Team
on 19 Apr 2021
One reason for this error might be an external process, which is already using this port. If you can determine which process exactly is causing this issue, you may be able to change its settings to use a different port. If not, or if it does not have settings, any computer-wide setting to block programs from using 11311 would also block ROS.
Port 11311 is the default port for ROS, but you can use any other port, as long as your other ROS machines target it, as shown in the example below
core = ros.Core(11312);
rosinit(core.MasterURI) ;
0 Comments
More Answers (0)
See Also
Categories
Find more on Network Connection and Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!