フィルターのクリア

Simulink doesn't found ROS2 topic

10 ビュー (過去 30 日間)
Daniel Riyavong
Daniel Riyavong 2024 年 5 月 22 日
編集済み: Daniel Riyavong 2024 年 5 月 24 日
I'm using Matlab 2022b on Windows10 with ROS2 Foxy build from chocolatey.
I want to use ROS Toolbox in Simulink to connect with ROS2 network but it seems like Subscriber block can't find ROS2 topic.
ROS_DOMAIN_ID is not set in ROS2 and is 0 in Configure ROS2 Domain ID.
How to make Simulink found ros2 topic?
Thanks.
UPDATE:
It seems like matlab is able to see topic if it is publish from another pc, but unable to see topic if publish from the host pc.
I'd like to make it can see topic from host pc, Any Idea?
  2 件のコメント
Josh Chen
Josh Chen 2024 年 5 月 22 日
Hi Daniel,
Would you be able to see the topic on MATLAB instead of Simulink?
>> ros2 topic list
>> ros2 node list
Looks like the MATLAB node is visible on your terminal, but terminal node is not visible in MATLAB or Simulink?
-Josh
Daniel Riyavong
Daniel Riyavong 2024 年 5 月 23 日
Hi Josh,
When I run ros2 topic list on MATLAB all I see is /parameters_event and /rosout.
/matlab node in my terminal is actually a node create and publish by terminal not from Simulink.
Sorry if the name make you misunderstood.

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

回答 (1 件)

Venkat Siddarth Reddy
Venkat Siddarth Reddy 2024 年 5 月 22 日
Hi Daniel,
Since you are using Windows operating system, I suspect, the issue might be due to firewall blocking the ROS communications in the system. To verify this, could you temporarily disable the firewall and re-examine the ROS topic?
To learn more about disabling firewall, check out the following article:
Please note that, disabling the firewall poses a security risk, so ensure you reactivate it after your test. If this resolves the issue then configure the firewall to allow ROS network communications.
However if the issue still persists, I would suggest referring to the following documentation on
ROS and Simulink Limitations :
Hope it helps!
  1 件のコメント
Daniel Riyavong
Daniel Riyavong 2024 年 5 月 23 日
Hi Venkat,
I try disable firewall but MATLAB still doesn't found my topic.
From your link it states clearly that ROS2 support Publish/Subscribe.

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

カテゴリ

Help Center および File ExchangeROS 2 Network Access in Simulink についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by