WSL2/Docker container/ROS from Matlab in Win10

9 ビュー (過去 30 日間)
Goupil56
Goupil56 2021 年 12 月 10 日
回答済み: Josh Chen 2021 年 12 月 13 日
Hello,
I want to use Matlab in Win10 to communicate with ROS nodes in a docker container under WSL2.
In docker under WSL2, the IP adress is completely different from IP adress in Win10.
How to find a way to do this with Matlab (Vscode is able to connect directly to docker container under WSL2 so I think there is a way to do it from Matlab).
Thanks.

回答 (1 件)

Josh Chen
Josh Chen 2021 年 12 月 13 日
Hello @Goupil56,
The key for enabling the communication between WSL2 ROS and MATLAB/Simulink is to make sure the environment variable "ROS_IP" being set correctly on both MATLAB and WSL2 sides.
In this post, I've tested and posted a workflow for enabling such communication. However, since you are unsing a docker instead of only WSL2, the setup process might be a bit different.
Hope this helps,
Josh

カテゴリ

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

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by