Closed loop between Simulink and Autoware

7 views (last 30 days)
Nupur
Nupur on 14 May 2024
Edited: Nupur on 23 May 2024
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

Answers (1)

Josh Chen
Josh Chen on 16 May 2024
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 Comments
Nupur
Nupur on 17 May 2024
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 on 23 May 2024
Edited: Nupur on 23 May 2024
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

Sign in to comment.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!