Info

This question is locked. Reopen it to edit or answer.

Simulink ROS2 subscriber transport stopped

11 views (last 30 days)
Renzo
Renzo on 27 Oct 2022
Locked: Jagadeesh Konakalla on 10 Jun 2024
Hello,
I am trying to subscribe to a ros2 topic, but I get the following error:
STD exception 'mwboost::wrapexcept<std::runtime_error>': 'Transport stopped.' was caught.
My Simulink model is the same as the example given in the tutorial, except I changed the subscriber topic to /controller_output to match my code.Inside the subsystem block at the bottom of my screenshot, I changed the bus assignment from the tutorial from x,y to torque, delta according to my message definition.
In my Linux terminal, I can see the messages being posted by using ros2 topic echo /controller_output
ROS2 subscriber block with sample time 0.01, topic /controller_output, message /custom_msgs/ControllerCommand
QoS: Reliable and Volatile
My setup:
Ubuntu 20.04
Matlab R2022b
ROS2 Humble
My message definition in ControllerCommand.msg
float64 torque
float64 delta
  1 Comment
Prabeen Sahu
Prabeen Sahu on 27 Oct 2022
Edited: Prabeen Sahu on 27 Oct 2022
Hello Renzo,
Please restart the model and see if the issue still exists.
I need some more information to help you on this issue.
  • Does the original example work fine in your PC ?
  • Do you see this issue only with custom_msgs/ControllerCommand message or with other standard messages also ? Instead of custom_msgs/ControllerCommand please publish standard messages(geometry_msgs/Point) from "Ubuntu 20.04 ROS2 Humble" to a different topic(/location1). Please change the subscriber topic to /location1 and change the bus assignment to x,y in the Simulink model. Please run the model with these changes and check if this works.
  • Please also attach the support file generated by the command ros.internal.generateSupportFile
- Prabeen

Answers (0)

This question is locked.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!