Closed loop between Simulink and Autoware

6 次查看(过去 30 天)
Hello,
I am stuck in a problem for a while now, I have created a closed loop between Autoware and Simulink through ROS2. The idea is to analyse the controller node in Autoware. Thats why I am only launching the controller node Controller Node/Orthisnode. This node requires 4 inputs (Trajectory, current position, current acceleration, current steering angle) and one output (controller command). I am publishing these inputs from simulink and subscribing to the output also in simulink.
The controller in Autoware is publishing the output at 32Hz frequency. The problem I am facing is that, controller is not being able to follow the trajectory I am giving from simulink. My guess is the time synchronization problem between Autoware and Simulink. However, I have tried Simulation Pacing option, changed the sample rate of the topics in simulink, also change the fixed step size in Simulink and nothing has been worked.
I am attaching my simulink model and also the ros2 node files where I have changed the message type, hope you can reproduce the results. I thank in advance for any guidance.
Kind regards,
Nupur

回答(1 个)

Josh Chen
Josh Chen 2024-5-16
Hi Nupur,
Thanks for sharing the model. Unfortunately, it is still very changing to provide valuable suggestions without looking at the complete implementation. We probably need to isolate the system section by section to see what is the bottleneck here during the message delivering.
Could you please create a help ticket through our technical support team so we can get more information on this issue and look into it together?
Thanks,
Josh
  2 个评论
Nupur
Nupur 2024-5-17
Hi @Josh Chen as suggested I have raised a ticket.
The case number: 07023627
I hope you can reproduce the result. Please let me know.
I thank you for your support and time in this matter.
Best regards,
Nupur
Nupur
Nupur 2024-5-23
编辑:Nupur 2024-5-23
Hello @Josh Chen,
I hope you have been able to reproduce the result, I dont know if you notice, the frequency of the subscribing node 'Autoware_Controller_topic_Subscriber' in simulink is different than the publisher node in an Autoware. If you check the frequency of topic /custom/ackermann_drive_stamped in ros2 terminal
ros2 topic hz /custom/ackermann_drive_stamped
its 32Hz, but when you check the 'out.control_sec.signals.values' variable in the workspace, its reduced to 18Hz.
Is it because there's some mistake in the model or is there some time sync issue again?
Please let me know, looking forward to your answer.
Best regards,
Nupur

请先登录,再进行评论。

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by