MATLAB Answers

Matlab and ROS communication

12 ビュー (過去 30 日間)
Le
Le 2016 年 10 月 15 日
回答済み: Tohru Kikawada 2019 年 5 月 2 日
Dear,
I am studying how to use Robotics System Toolbox in Matlab 2016a. I setup the program in two separate computers: one is a single board computer (Ubuntu 14.04, IP 10.10.10.101), and one is a laptop with Matlab (Window 7, IP 10.10.10.102). I used wifi for the communication. I have an issue with the network setup and I hope that you could help me to figure out.
I run roscore and a node in single board computer to collect data from an IMU and the following commands to setup the ROS_IP and ROS_MASTR_URI:
export ROS_IP=10.10.10.101
export ROS_MASTER_URI=http://10.10.10.101:11311
And in Matlab, I declare the following command to setup the connection:
setenv('ROS_MASTER_URI','http://10.10.10.101:11311')
setenv('ROS_IP',10.10.10.102')
rosinit(’10.10.10.101’)
Then, I run “rostopic list” to check the connection and it shows all topics. However, when I run “rostopic echo” it does not display any data. I cannot use "receive" to get data either. I have verified the network connection by successfully sending the ping signals between two computers.
Do I miss any step?
Thank you for your help
Regards

  0 件のコメント

サインインしてコメントする。

回答 (1 件)

Tohru Kikawada
Tohru Kikawada 2019 年 5 月 2 日
Security software often blocks the communication between the host and the target enven if the pings are successful. Please make sure the firewall tunrns off again.

  0 件のコメント

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by