ROS simulink controller is slow
이전 댓글 표시
I am trying to build a controller in simulink to interact with ROS and custom simulation of my robot. The controller is rather complex, and involves communication with several topics.
When I try to publish the setpoints to the controller the controller runs very slowly to the point it cannot be used. Is there a way I can speed up the controller to make it run in real time? Should I be exported the code to C++ then tuning my model parameters from there? I know that this is very vague question, I apperate any help.
댓글 수: 3
Jagadeesh Konakalla
2021년 5월 29일
Hi,
The Simulink Simlation may be slower. Can you try the generated code from Simulink model ?
By the way, which version of MATLAB you are using ?
Thanks,
Jagadeesh K.
Nathaniel Goldfarb
2021년 5월 29일
Jagadeesh Konakalla
2021년 6월 4일
Hi,
Let me elaborate on my suggestion.
My understanding is that you are trying to publish messages from Simulink model in Simulation. This is because of necessary message conversions from Simulink but to MATLAB structure to ROS message.
Instead, i am suggesting you to try the code generation workflow. You can build and deploy code from simulink model and run the generated node in the ROS environment where your controller is running. This workflow is faster than the simulation workflow.
Let me know if this helps.
Jagadeesh K
답변 (1개)
Nathaniel Goldfarb
2021년 6월 4일
이동: Jagadeesh Konakalla
2024년 4월 23일
0 개 추천
카테고리
도움말 센터 및 File Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!