-
Notifications
You must be signed in to change notification settings - Fork 64
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
Compare different crowd models #91
Comments
ORCA and PEDVO are the only models that are "built in" to Menge. The other models are all plugins. If you execute menge with the
|
Thanks. I am running the demo (4 squares) in Unity. I tried two built in models (orca and pedvo), and both of them work fine. However, just passing the name of methods in plugin to "Initialize" function doesn't work. I have build both Menge and Plugin projects. Is there something I could do to make the plugin model works in Unity? ps: I don't think it should be the problem of scenario, each model should work in 4 square scenario. |
Hmm...I don't think I've explicitly tried that. There may be an error in the bindings (such that the core library gets loaded, but the plugins doesn't.) I won't be able to dig into that into much later. When you run it, do you get a log html file generated? That might give you some insight (again, I don't remember if that happens or not.) |
Unfortunately, there is no log file. The unity project is based on MengeCore.dll which was generated here (https://github.com/MengeCrowdSim/MengeCS). Does it already include the models from plugin (if you can remember)? |
ps: there are two .dll files: MengeCore.dll and MengeCS.dll. Will there be another .dll file like Plugin.dll that I can get from somewhere? |
Correct. There would need to be more dlls. Command-line menge works by having a plug-ins directory full of dlls. The directory gets introspected at runtime and the plugins get loaded. There should be some ability to parallel that in the unity set up; I just haven't done it. Menge's C api includes the ability to specify a plugin path, so that suggests that it would work as long as the path is initialized properly. |
I am trying to add plugin path but I have issue as shown in the repository MengeCS (MengeCrowdSim/MengeCS#7). I think it is the right place to add plugin lib, right? Here is how I did: Since the original project (https://github.com/MengeCrowdSim/MengeCS/) failed in build, I cannot see how to make the plugin work for Unity. Any help would be appreciated! |
I won't be able to look into this in more detail until later. |
This is what I have done to utilize Menge plugins in Unity:
Make sure to modify the wrapper in MengeCS to accept the plugins path parameter. Hope this will help. |
Thanks @alafi , I got stuck in the last step on passing the pluginsPath. Since "Initialize" is from MengeCS.dll and defined only to pass in three parameters. I think I need to recompile this project (https://github.com/MengeCrowdSim/MengeCS) to get MengeCS.dll. However, I failed in build this project. Or do you have an available MengeCS.dll which accepts pluginsPath that you could share with me? |
Just copy the source code for MengaCS to your Unity scripts folder then modify it and build it as part of your Unity project. |
Thanks @alafi , I copied all scripts from "MengeCS" project, and now it accepts four parameters. However, it still failed in initializing simulator, i.e. |
I see that you're using the Debug version of the binaries. Build the plugins and Menge core in Release configuration and try. |
@alafi I've tried couple of ways, but still no luck. Here is what I did.
|
@alafi Is it possible for you to share the folder "\MengeUnity-master\Assets\Plugins" with me to try? |
I may look at it if you make a very minimal Unity project with Menge plugins and share it. |
@alafi I share the Unity project here (https://goo.gl/FufvKP). You may change the file directory in SimController.cs to fit your local directory. Great thanks! |
@alafi Thanks so much for tackling this. I've added an issue for this in MengeUnity. This is really an issue on that repo and not on Menge, per se. |
OK... It seems like Windows is looking for the dependencies of the plugin's DLL everywhere except in the DLL's folder :S |
Right. Some of the plugins also depend on |
@alafi Thanks for the feedback. I started with the Unity project I shared in the google drive link. I copy all the DLLs in I am sorry for asking these long questions, but this problem drives me mad. |
@keanudicap Your project updated and shared. Please check it. |
As it has been shown here (http://gamma.cs.unc.edu/Menge/intro_vids.html#crowdmodels), Menge is able to use different crowd models. But I look into the Core folder, I can find only two methods: ORCA and PEDVO. Are there any other methods available now? If there exist other methods, how can I call it in the simulator? e.g. for ORCA, the model label is "orca".
The text was updated successfully, but these errors were encountered: