What am I doing wrong when using matlab and ros?

I want start roscore in terminal ubuntu and creat node in matlab. I have "Error creating the node /matlab_global_node_" when use rosinit. What am I doing wrong? Thanks

댓글 수: 2

bio lim
bio lim 2016년 11월 26일
편집: bio lim 2016년 11월 26일
Have you checked that you installed the Robotics Toolbox correctly? Can you see it in the list of the toolboxes you installed? If so, are the MATLAB and the roscore running on different platforms?
Serj Titov
Serj Titov 2016년 11월 29일
when i use command "ver" in the list of installed toolboxes is "Robotics System Toolbox". MATLAB and roscore running on the same computer. if i start "rosinit" in matlab like master - global node created correctly. But when i start "roscore" in terminal and use "rosinit" in matlab - "Error creating the node /matlab_global_node_".

댓글을 달려면 로그인하십시오.

답변 (1개)

bio lim
bio lim 2016년 11월 30일

0 개 추천

When you start ROS on your terminal using roscore, check out the section:
ROS_MASTER_URI=http://XXXX:11311/
where XXXX is your computer name.
Then on your MATLAB, try setting as follows:
setenv('ROS_MASTER_URI', 'http://XXXX:11311/');
rosinit('NodeName', '/Matlab');

댓글 수: 4

Serj Titov
Serj Titov 2016년 11월 30일
편집: Serj Titov 2016년 11월 30일
I tried to do as you have written and received an error: "Error creating the node /Matlab." I do not have an important part: my PK located in a local network and connected to the router. If I disconnect PK from the router roscore in terminal and rosinit in MATLAB work OK. Is it possible to realize the connection between MATLAB and roscore without disconnetc from the router? Thank you for your help
Have you tried perhaps initializing your node directly to your IP by:
rosinit('http://IPDADDRESS')
If not, could it be possible that the global node is already running, and you have not shut down the global node? Did you check the list of nodes that are running in your ROS with rosnode list?
If the above doesn't help, could you give me the entire information about your experimental setup?
I started roscore in terminal. Started MATLAB. Use in MATLAB:
rosinit('http://192.168.42.105')
and I have error "Port -1 is invalid. It needs to be positive. Check if it is correctly defined."
It my terminal with running roscore (may be it's help you):
run rosinit('http://192.168.42.105:46565')

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Network Connection and Exploration에 대해 자세히 알아보기

태그

질문:

2016년 11월 24일

댓글:

2018년 6월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by