Add option to select networkinterface for libwmros2server

조회 수: 8 (최근 30일)
Andrei Alexeev
Andrei Alexeev 2021년 7월 27일
댓글: Andrei Alexeev 2021년 7월 27일
Hello everyone,
I recently encountered a problem where my Matlab ROS2 would not connect to my ROS2 node on another machine. I had found out that the ROS2Server "libwmros2server" had selected a wrong network interface and therefore the DDS did not work.
My research on the internet and browsing the Matlab settings showed that it was not possible to select a network interface. Would it be possible to add an option to achieve this?
At this point, my solution is to turn off network adapters using powershell. (see Disable-NetAdapter)
With kind regards
Andrei

답변 (1개)

Cam Salzberger
Cam Salzberger 2021년 7월 27일
Hello Andrei,
ROS 2 itself doesn't currently provide an easy way to select a particular network interface to use (like an environment variable). However, you can pass settings to the underlying Fast-RTPS DDS implementation in the DEFAULT_FASTRTPS_PROFILES.xml file. There are some useful links in this answer here on how to whitelist network interfaces, and here for an example XML file in its more common use to extend the network outside the subnet. Have that file in the current directory when starting your ROS 2 nodes to have it affect the underlying implementation.
-Cam

카테고리

Help CenterFile Exchange에서 Network Connection and Exploration에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by