“保存”函数在simulink fmu中无法使用

发布于 2025-02-01 09:25:20 字数 764 浏览 3 评论 0原文

我正在为机器人轨迹创建Simulink FMU。我正在使用MATLAB R2022A。

我的FMU的输入是targetPos,即机器人的目标点坐标(x,y,z)。输出为:

  • exitflag - (非)到达点
  • 配置 - 操纵器的关节角度
  • info> info - IK求解器详细信息

我旨在保存在所有模拟迭代中,轨迹中的所有路点的关节角度,即config。我更喜欢在.csv中进行以后的兼容性,但是.mat也可以。我在Simulink中包含了保存块,直接连接到config。 我已经将模型导出为独立的FMU,并成功生成。

在此保存为fmu中时,请检查Simulink模型和追溯 screenShot

然后,我已经用

ros2 launch fmi_adapter fmi_adapter_node.launch.py fmu_path:=FMI/Trajectory/RobotMARA_SimulinkFMU_v3.fmu

那么,是否在FMU中与“保存”块有不相容性?欢迎解决这个问题的任何工作。

谢谢,

乔恩

I'm creating a Simulink FMU for robot trajectories. I'm using MATLAB R2022a.

The input of my FMU is targetPos, i.e., the target point coordinates (x,y,z) of the robot. The outputs are:

  • ExitFlag - (not) reachable point
  • config - joint angles of the manipulator
  • info - IK solver details

I'm aiming to save the joint angles of all waypoints in the trajectory, i.e., config in all Simulink iterations. I prefer to do it in .csv for later compatibility, but .mat is also fine. I've included the Save block in Simulink directly connected to config.
I've exported the model as standalone FMU and it's generated successfully.

Check the Simulink model and traceback when saving as FMU in this screenshot.

Then, I've tested the FMU in ROS 2 with the fmi_adapter, but the .mat is not being generated.

ros2 launch fmi_adapter fmi_adapter_node.launch.py fmu_path:=FMI/Trajectory/RobotMARA_SimulinkFMU_v3.fmu

So, is there an incompatibility with the "Save" block in an FMU? Any work around to solve this problem is welcome.

Thank you,

Jon

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

说不完的你爱 2025-02-08 09:25:20

在FMI API中未定义写入文件系统,请参见 https:// github。 com/modelica/fmi-standard/essugy/326

是否可以定义可以通过FMI API从导入工具访问的本地变量或输出?

在FMI 3.0中,您可以定义二进制流以输出数据。

Writing to a file system is not defined in the FMI API, see https://github.com/modelica/fmi-standard/issues/326

Is it possible to define local variables or output that you can access from the the importing tool via the FMI API?

In FMI 3.0 you could define a binary stream to output your data.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文