Unable to Connect MATLAB/Simulink to ROS

Hi,
I am trying to deploy my simulink model on ROS of my linux system. But despite it is pining, it is not establising connection to ROS. I request to help me as soon as possible. I installed ssh server and disable firewall as well. I am attaching the pic rosinit output.

6 Comments

Hi Shivam,
Can you provide more details to help you out ?
Which verison of MATLAB that you are using ? Whta is the IP address 192.168.0.140 ? Is this your linux machine where MATLAB is running ? Or it is the address of the VM machine where ROS is running ? Did you start the roscore on the system where ROS is running ?
Thanks,
Jagadeesh K
Hi,
I am using MATLAB2022b, Yes the IP address is of my LINUX on separate system. Yes, ROS Noetic is running in my LINUX system. It got connected for once two days ago but now it has not been connecting. I request you to kindly help me to fix this issue.
Thanks
Shivam
Hi Shivam,
The MATLAB is running on Linux machine or Windows machine ?
You are also saying that it worked two days ago. What has changed from then to now ?
You need to make sure that IP addresses of MATLAB installed machine and your linux system running Noetic to be in the same subnet domain.
Thanks,
Jagadeesh K
HI,
My MATLAB is running on a different system. Yes, it worked just for once, I ran the command 'rosinit('192.168.0.140')' on MATLAB and checked the node on the LINUX system, it was workingbut after that it is not working, I didn't change anything as much as I know. I have to deploy the simulink model on Turtlebot3 for an experiment but before that I want to run it on GAZEBO but it is not connecting. One more thing, both of them can ping each other. Do you have any idea what could the problem.
Thank you
Shivam
Both of them are connected to same wifi network as well.
Hi Shivam,
Can you run the following command in MATLAB and Share the generated file with me ?
>> ros.internal.generateSupportFile
Thanks,
Jagadeesh K.

Sign in to comment.

 Accepted Answer

Hi,
I have attached the file, since I am not in my lab, so the IP address of my Linux in VMware is '192.168.86.77' and IP address of windows is in the file.
Thank you
Regards
Shivam

7 Comments

Hi Shivam,
If the Liux VMWare address is 192.168.86.77, then why you are entering 192.168.0.140 ?
Let me understand your setup. On your windows machine, you have the 22b MATLAB is installed. In that Windows machine, you have VMWare to launch the ROS noetic installed linux. Is that setup correct ?
Please elaborate and provide the snapshots whereever is required.
Thanks,
Jagadeesh K
Hi,
First, I am sorry for misunderstanding. I was tryingto run in two different ways and facing the same problem:
  1. One in my lab, there I have two separate systems, one for Windows(MATLAB 2022b Installed System) and other for Linux(IP address '192.168.0.140'). The screenshot in the question of that.
  2. But, I was at home yesterday evening,so I was using my laptop in which I have windows(MATLAB 2022b installed in it) and LINUX(in VMware and IP address:'192.168.86.77') in it. So, I was trying to connect them on my laptop as well to figure out the problem. I attached the picture of it when I am trying to connect the MATLAB(WINDOWS) to LINUX(VMWARE) in my laptop.
I am facing the same problem in both cases. I am sure I am missing something or doing something wrong. Once again I am sorry for misunderstanding.
Thank you
Regards
Shivam
I also have attached the picuture of pining test to my LINUX(in VMware, IP Address '192.168.86.77') from MATLAB(in Windows) in my laptop. Username 'tough'.
Hi Shivam,
Looks like everything is good for me. May be it could be issue with Firewall.
Can you send me the snapshot of roscore command running on your VM linux machine ?
Thanks,
Jagadeesh K.
Hi, Jagadeesh,
I apologize for the late reply since I was on vacation. I don't how but now, MATLAB is getting connected to ROS in Linux command. I want to thank you for the help. But now I am facing problem in connecting MATLAB to Gazebo? I am sure, something is wrog with Gazebo plugin(possibly in Linux ). I have attached the images of the error.
This looks like this is different issue. I have already seen that you started a new post on this issue. Please use that. One our collegue will take a look at it and reply to you. You can add this snapshot also there.
Thank you so much, Jagadeesh Sir...

Sign in to comment.

More Answers (1)

On page 7, I don't know what it is but there is mentioned my VMware Linux's IP address along with MATLAB. 2 days ago, it got connected once on that ip address. I am attaching the picture of it as well, the underlined is of LINUX's IP address.

Categories

Products

Release

R2022b

Community Treasure Hunt

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

Start Hunting!