Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error instantiating complex CoSim FMU #12

Open
rubix18 opened this issue Sep 27, 2022 · 4 comments
Open

Error instantiating complex CoSim FMU #12

rubix18 opened this issue Sep 27, 2022 · 4 comments

Comments

@rubix18
Copy link

rubix18 commented Sep 27, 2022

When attempting to initialise a Co-Simulation FMU (with CVode solver) using the fmi_adapter an error occurs during the fmi2_import_instantiate() call (part of the FMIAdapter constructor). This FMU runs in other packages without error, but in this package it throws the error below which has been tracked to the sundials library relating to a missing Linear Solver:
[CVLS ERROR] CVodeSetLinearSolver: LS must be non-NULL

I propose that this is occurring because the fmuLocation in the FMIAdapter script is set to NULL and is causing the resource folder of the CoSim FMU to not be found:
jmStatus = fmi2_import_instantiate(fmu_, instanceName, fmi2_cosimulation, fmuLocation, visible);

Is it possible that the fmu passed into this function would not be fully unzipped and is therefore causing an error in the CVode library?

@rubix18
Copy link
Author

rubix18 commented Oct 6, 2022

Here is an example of a Co-Simulation FMU that has been created by converting the Model Exchange version of the FMU with the cswrapper from FMPy. If run with the FMI Adapter it should produce the above error.

DampedPendulum_CVodeSolver.zip

@githubfrond
Copy link

Is anyone able to resolve this issue, offer a workaround, or indicate why it can be ignored please? @ralph-lange @Zarnack
Thanks in advance for any advice :-)

@ralph-lange
Copy link
Collaborator

ralph-lange commented Nov 11, 2022

Please excuse my late reply. I have inherited several open-source projects from colleagues and can hardly keep up. But we will soon get more manpower for our open-source projects on ROS :-)

I've just tested your zip file but could not reproduce the error. On my Ubuntu 20.04 and ROS 2 Galactic, the FMU was simulated without any error messages and /revolute1_angle was published correctly. (Of course, I unzipped your zip file first and then called the resulting FMU file with ros2 launch fmi_adapter fmi_adapter_node.launch.py fmu_path:=/home/ralph/DampedPendulum_CVodeSolver.fmu.) Which Linux and ROS distributions are you using?

@githubfrond
Copy link

Hi Ralph, thanks for looking at it. No rush, just chasing to keep things moving :-)
I'll follow up with my colleagues to see what problems may be occurring their end, as it would appear to be the issue lies there.
cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants