ROS Logger doesn't show the topics

7 views (last 30 days)
Tai Hoang
Tai Hoang on 21 Jan 2025
Commented: Josh Chen on 27 Jan 2025
I am working with MATLAB R2024b on a Simulink model. I want to publish some topics using ROS2. I added some topics in different place of the model, one of them is at depth 1 from the main system and the rest are at depth 5-6 from the main system (as shown in the 2 images). When I use ROS Logger to create a ROS bag, it only show the one topic at depth 1. I have chosen "Log Selected Signal" to all of the Topic. I am not sure if subsytem depth is the reason, but I need to create a log file for all topics. There is a same discussion, but no solution is shown there.
Depth 1 topic:
Depth 5 topic:
depth 5 topic
Can you suggest the solution?

Answers (1)

Josh Chen
Josh Chen on 22 Jan 2025
Hi Tai,
Messages from nested subsystems should be visible in the ROS Logger App.
I created a dummy model with 6 layers of subsystems, and was able to see all ROS signals from subsystems, no matter they were marked as logging or not.
If this happens on your end, I believe there should be another reason. Can you share a simplified model so we can look closer and identify the culprit?
If this is confidential, please feel free to reach out to our technical support team.
Thanks,
Josh
  4 Comments
Tai Hoang
Tai Hoang on 25 Jan 2025
Dear Josh,
I think it is better to continue with my problems here. When I selected the topics to be logged and run the simulation. It shows 2 errors as below:
Error due to multiple causes.
Caused by:
Error evaluating 'StartFcn' callback of block_diagram 'mySimulation'.
Callback string is '
% Do not delete, this is an auto-generated function to log ROS 2 message.
ros.slros.internal.ROSUtil.loggerStartFcn(bdroot)'
Dot indexing is not supported for variables of this type.
Error evaluating 'StopFcn' callback of block_diagram 'mySimulation'.
Callback string is '
% Do not delete, this is an auto-generated function to log ROS 2 message.
ros.slros.internal.ROSUtil.logROSMessageToBagFile(bdroot);'
Dot indexing is not supported for variables of this type.
I cannot find any related topic related to this error. Do you have any idea how to solve this?
Thanks,
Tai Hoang
Josh Chen
Josh Chen on 27 Jan 2025
Hello Tai,
This is a general error message when Simulink bus parsing failed during logging process after simulation. I know there are few updates been submitted to address similar issues in the past. So I would suggest to upgrade to the latest version of MATLAB.
If that still not resolving the problem, please attach the model and we can take a look.
Thanks,
Josh

Sign in to comment.

Categories

Find more on Publishers and Subscribers in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!