Error in code generation using ROS Toolbox: "Code generation information file does not exist. "

조회 수: 4 (최근 30일)
I'm trying to build a simulink model through code generation and then deploy it on ROS2 as a node, but I have this error:
Top model targets built:
Model Action Rebuild Reason
===============================================================================
ControlUAVUsingROS2 Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 5m 59.943s
No matching files named '/home/matteo/Documents/src/lib/libcudnn.so' were found.
How can I fix this problem?
  댓글 수: 2
Jagadeesh Konakalla
Jagadeesh Konakalla 2023년 5월 24일
Hi,
From the error messages it looks like you are trying to generated CUDA ROS node from Simulink model.
Please follow the below link for setting up your environement.
If you share your Simulink model, i can take a look at it.
Thanks,
Jagadeesh K.
Salvatore Matteo Mennea
Salvatore Matteo Mennea 2023년 5월 24일
Hi, thank you for your help. I'm trying to run this simulink demo https://it.mathworks.com/help/uav/ug/control-simulated-uav-using-ros2-px4-bridge.html#ControlASimulatedUAVUsingROS2AndPX4BridgeExample-3. So I want to convert the simulink file in c++ code to be run in Offboard mode on PX4 firmware as a ROS2 node. I'm getting familiar with this toolbox and I'm trying to learn how it works.
The aim is to create a custum controller on simulink for a quadcopter and then through code generation, simulate it on Gazebe with ROS2 as a node.

댓글을 달려면 로그인하십시오.

채택된 답변

Jagadeesh Konakalla
Jagadeesh Konakalla 2023년 5월 25일
Hi,
In the Simulink model configuration, the check box for the Generate GPU code is selected. Can you generate the code by unseleting this checkbox. This needs to be enabled when you are deploying the code to NVIDIA hardware.
You can find the Option here : Model configuration-> Code generation-> Generate GPU Code.
Let me know if this works for you or not.
Thanks,
Jagadeesh K.
  댓글 수: 2
Salvatore Matteo Mennea
Salvatore Matteo Mennea 2023년 5월 25일
Thank you, I succeeded in building the code. Do you know how can I do to run it as a ROS2 node in a workplace? I'm trying to control a UAV in offboard mode on PX4.
Jagadeesh Konakalla
Jagadeesh Konakalla 2023년 5월 25일
To run the generatd node as is, you can use the Build, Load and Run option with proper settings in the Remote Device details in the Simulink model. Please take alook the following example.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by