Subscribing to ROS joint_states issue

3 ビュー (過去 30 日間)
Jason Michel Lambert
Jason Michel Lambert 2019 年 11 月 7 日
回答済み: Jason Michel Lambert 2019 年 11 月 21 日
Hello,
I'm migrating a Simulink model from R2017b to R2019b. The model subscribes to the "joint_states" topic of a ROS robot. Although I'm getting the right size and the right data values when calling rostopic echo (see first image) from the Matlab prompt, the output of the Simulink block gives me something different entirely (see second image). This only seems to happen with the "joint_states" topic. This used to work fine in R2017b.
Matlab_bug.png
Simulink_bug2.png
  1 件のコメント
Philippe Lebel
Philippe Lebel 2019 年 11 月 20 日
have you tried to verify if the paths were the good ones in simulink. (i dont know how to do that though)
I've had a problem where the LD_LIBRARY_PATH was over written by matlab, preventing me from launching .launch files and using ROS in matlab, i had to manually re-export the right path in the matlab script i was using. Maybe this is a similar issue that you are facing with simulink.

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

採用された回答

Jason Michel Lambert
Jason Michel Lambert 2019 年 11 月 21 日
Found the problem, the variable array size setting was reset to default after upgrading to the latest Matlab version. This does not apply to all topics but the one I am subscribing to can indeed have different sizes depending on the robot's number of dof.

その他の回答 (1 件)

Jason Michel Lambert
Jason Michel Lambert 2019 年 11 月 20 日
I'll check anyways but I don't think this would be the problem. I can access ROS from Matlab/Simulink, it's just that there seems to be a problem with data transfer in Simulink, whereas data coming from ROS displayed in the Matlab prompt is fine.

カテゴリ

Help Center および File ExchangePublishers and Subscribers についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by