ROS2 Simulink Toolbox not publishing

22 次查看(过去 30 天)
Hi,
I am creating a simple example of publish/subscribe using the ROS2 Simulink toolbox to test connecting to a ROS2 Network. I have two computers on the same subnet mask: an Ubuntu 20.04 running ROS2 Foxy and a Windows 10 running the Matlab 2020b ROS Toolbox.
I can publish from my Ubuntu and view the message in Simulink, but when I use Simulink to publish something, I receive nothing on my Ubuntu computer.
I receive no error during the execution. And also, I have configured the ROS_DOMAIN_ID on both machines.
Would anyone have any idea for a possible workaround for this problem?
Thanks!

采纳的回答

Cam Salzberger
Cam Salzberger 2020-10-25
编辑:Cam Salzberger 2021-5-25
Hello Natasha,
Changes to the way communication through ROS 2 is done in Foxy that results in it being incompatible with earlier releases of ROS by default. This occurs in standard ROS 2 installations as well (outside of MATLAB). R2020b is using ROS 2 Dashing and the default DDS implementation of Fast-RTPS, so it is also affected by this issue. Here are some workarounds:
Use Dashing
The easiest solution would be to install Dashing on Ubuntu, if that is possible for your use of ROS 2.
Use Cyclone DDS with Foxy
Another workaround would be to switch the Foxy installation to use the Cyclone DDS implementation that comes packages with the Foxy binary installation. See these instructions on how to install Cyclone DDS, if required, and these instructions on how to specify the RMW implementation to use.
Change Profiles XML for RTI Connext DDS with Foxy
In the Foxy release note, there is a similar incompatibility noted, specific to the RTI Connext back-end. There is a workaround suggested in that note.
-Cam
  13 个评论
Cam Salzberger
Cam Salzberger 2022-1-21
编辑:Cam Salzberger 2022-1-21
ROS 2 Foxy is supported by R2022a, along with ROS Noetic. If your license enables you to do so, you can download the prerelease and try it out now.
Please note that both ROS and ROS 2 in R2022a will require Python 3.9 for custom message generation, codegen deployment, and ROS Master creation (in ROS 1). See the release notes for details on other changes.
-Cam
Shipeng Liu
Shipeng Liu 2022-2-25
编辑:Shipeng Liu 2022-2-25
thanks, this problem blocks me whole day.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 ROS 2 Network Access in Simulink 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by