필터 지우기
필터 지우기

Store data using the "To File" or " to workspace" block when using the PX4 toolbox on Simulink performing code generation

조회 수: 2 (최근 30일)
I want to store the data coming from the vehicle_odometry message(positions,velocities,accelerations,euler angles etc...). I'm using the read block to read this message and then a selector to select the messages I want to read. Then I'm using the "To File" or "To workspace" to store it but it doesn't work. When I'm launching the simulation pressing on "Build,deploy and run", (the "Monitor and Tune" does not work, the simulation doesn't even start, I think becouse of my PC hardware(?)) no file is creaded in the home directory and nothing appears on the MATLAB workspace even if the drone is flying in jmavsim simulator.
Above you can see the simulink block that should be able to strore the odometry data "to file" or "to workspace"
How can I fix this problem? How can I read the odometry of the drone after performing simulation on jmavsim?

채택된 답변

Ankur Bose
Ankur Bose 2023년 6월 27일
Logging data using To workspace block is only supported when you deploy to Pixhawk hardware. In SITL or PX4 Host Target, To workspace wont generate a MAT file. You can log data in Monitor & Tune for PX4 Host Target and using Signal Data Inspector export the data to a MAT file
  댓글 수: 3
Ankur Bose
Ankur Bose 2023년 6월 27일
편집: Ankur Bose 2023년 6월 27일
What is the error you face while running "Monitor & Tune" ?
Salvatore Matteo Mennea
Salvatore Matteo Mennea 2023년 6월 27일
External Mode Open Protocol Connect command failed
Caused by:
  • Could not connect to target application: XCP TCP/IP error: Connect failed
Component:Simulink | Category:Block diagram error
Unable to connect to the 'PX4 Host Target' target for 'openloop_tesi'.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by