Issue: Create ROS master on Matlab

조회 수: 2 (최근 30일)
MATHEUS QUEMELLI
MATHEUS QUEMELLI 2019년 7월 29일
답변: Sebastian Castro 2019년 10월 3일
Hello. I'm facing some problem to create a ROS master on Matlab R2017b on Windows 10, first of all I cannot even create a rosdevice in Matlab.
This is my test code:
%rosinit(master);
ip = 'localhost';
user = 'nero';
key = '123';
%% Set ros device
d = rosdevice(ip,user,key);
d.ROSFolder = '/opt/ros/kinetic';
% Start Core
runCore(d);
%% Star Ros master
rosinit(d.DeviceAddress);
But right after running "rosdevice" I get this error:
Error using robotics.codertarget.internal.ssh2client (line 72)
Error connecting to SSH server at localhost
Error in rosdevice (line 165)
obj.Ssh = robotics.codertarget.internal.ssh2client(hostname,
...
I have no idea what is wrong, could someone help me?

답변 (1개)

Sebastian Castro
Sebastian Castro 2019년 10월 3일
Two things.
First, if all you want to do is create a ROS master on the localhost, all you need is the following
rosinit
Secondly, rosdevice is used to create an SSH connection from MATLAB to a machine with a ROS installation -- which is typically only needed if your MATLAB instance is on a different machine than your ROS install and you want to control deployed ROS nodes from MATLAB. In your case it seems you're just on one machine.
However, if you want the error to go away, you'll need your Linux machine to have OpenSSH-Server installed. Though it's a little pointless to SSH into the same machine you're SSHing from ;)
sudo apt-get install openssh-server
- Sebastian

카테고리

Help CenterFile Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by