“保存”函数在simulink fmu中无法使用
我正在为机器人轨迹创建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 pointconfig
- joint angles of the manipulatorinfo
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在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.