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
esmini OSMP FMU #409
esmini OSMP FMU #409
Conversation
Signed-off-by: ClemensLinnhoff <clemens.linnhoff@persival.de>
Currently the OpenScenario file needs to be hardcoded here. In a next step I want to make it an FMI parameter, so it can be set by the co-simulation (e.g. in the system structure definition (ssd)). |
In a first test I was able to run this esmini FMU together with the OSMPDummySensor using OpenMCx as a co-simulation platform. And it worked like a charm :) |
I currently included FMI as a submodule. Since other 3rd party libraries are included in esmini otherwise, we might do this with FMI similarly. However, I quite like using submodules. |
Signed-off-by: ClemensLinnhoff <clemens.linnhoff@persival.de>
Signed-off-by: ClemensLinnhoff <clemens.linnhoff@persival.de>
edit: This is already implemented now. The xosc file path is set via FMI parameter. |
Signed-off-by: ClemensLinnhoff <clemens.linnhoff@persival.de>
I added an exemplary system structure defintion. This concludes this example from my point of view. |
Signed-off-by: ClemensLinnhoff <clemens.linnhoff@persival.de>
Excellent! I have not much clue about FMI. But it all looks good, and it passes the CI jobs 👍 So next step I think is to merge it and make it available for our additional stakeholder @jdsika to have a look as well. There is basically only one technical concern before merging: Please check this branch: https://github.com/esmini/esmini/tree/feature/esmini_fmu It also passes the CI. So if it looks OK to you I can merge it today. And then I'll close this PR with a reference to that single commit of yours. |
Yes, I also always squash the commits to keep th repository clean. Uploading these binary files in the middle was probably just a mistake. So squashing it makes even more sense. After the merge I will then try to apply this esmini FMU in the test framework at OpenMSL. Then we can see it working together with a sensor model in a co-simulation on the GitHub server. Maybe we can reference the working example in the documentation then. |
How long are links of moved repositories on GitHub valid? I see that ALKS is still pointing to Andreas personal GitHub space. Soon we will move ALKS very likely again to OpenMSL. This is really cool! |
All true! But I wrote "(basically)" because there was some minor hick-ups: 1. LFS handling missing for png image (ref: git-lfs/git-lfs#1939) and 2. Similar issue with two .so files during the rebase/squash. This happened when I did the rebase locally, and it could potentially also happen when squash-and-merge the PR here. By the way, I don't think there is an option to rebase-and-squash for some reason, which I'm more familiar with. Maybe squash and merge would have the same effect, I'm not sure. Anyway, with a new branch I could do squash via git reset operation instead, which smoothly skips any added->deleted files. In addition, we just introduced dev branch as the new top integration point for features and bug fixes. So I wanted to merge it on that one first, to not brake the rules :) (and this was done after you filed the PR, so you couldn't know) |
Alright, that makes sense. Then I am fine with you merging your branch into dev! |
Signed-off-by: ClemensLinnhoff <clemens.linnhoff@persival.de>
Great! It's merged on dev now, commit 5b8f92f
Good finding! I'll look into the ALKS submodule ref tomorrow.
Agree! :) |
Perfect, thanks! Then we can close this PR? |
I updated the remote to https://github.com/asam-oss/OSC-ALKS-scenarios for now (commit 1029fb5). Staying on the latest release tag v0.4.1. Note: This applies to |
Yes, we can. I'll close it now. Just a few last words:
Thanks again for this contribution. |
This example compiles an OSMP FMU with which esmini can be used in an FMU-based co-simulation.
It is based on the OSMPDummySource example.
Esmini is initialized via the API in the doInit function of the FMU.
In the doCalc function (a subsequent function of doStep), the OSI ground truth data is fetched via the API and copied to an OSI SensorView message.
The SensorView is the output of the FMU.
Completed steps:
This PR is related to #341