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

Loading a custom aircraft model to jsbsim bridge #58

Open
oricabel opened this issue Jun 22, 2022 · 5 comments
Open

Loading a custom aircraft model to jsbsim bridge #58

oricabel opened this issue Jun 22, 2022 · 5 comments

Comments

@oricabel
Copy link

Hello,
I have an aerodynamic model that I wrote in .XML format and I want to simulate it using the bridge, but I don't understand how.
I tried to copy the model's folder into a folder with the rest of the models that work (Rascal, Malolo, etc..), but when I try to run it the same way I run the others, it doesn't even recognize the model exists.

It is obvious I'm missing a few steps... can anyone please help?

@Jaeyoung-Lim
Copy link
Contributor

@oricabel Could you elaborate exactly how you were trying to run your custom model and how it is failing?

@oricabel
Copy link
Author

oricabel commented Jul 1, 2022

I tried to find the locations of other, working models (rascal, malolo) and add my model in the location, now I am sure this is not enough, perhaps the program needs to "know" that there is a new model, and if we ask to run it, it should use the models files. When I try to run my model, it just says that it does not recognize it, as if I wanted to run somthong that doesn't exist.

@Jaeyoung-Lim
Copy link
Contributor

@oricabel Please share exactly how you "tried" and what the "not recognized" error is. Otherwise it is hard to know what is missing from what you are describing

@oricabel
Copy link
Author

oricabel commented Jul 2, 2022

I took the model's folder named "Aeolus" (which contains it Aero model, setup file, engine, etc...) and pasted it to the following paths:
~/PX4-Autopilot/Tools/jsbsim_bridge/models/
~/PX4-Autopilot/src/px4-jsbsim-bridge/models/
~/PX4-Autopilot/Tools/flightgear_bridge/models/
These paths are where I found folders of other models (rascal, etc...).

I tried to run the simulation with the custom model using:
"make px4_sitl jsbsim_aeolus"

And received:
"ninja: error: unknown target 'jsbsim_aeolus'
Makefile:235: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 1"

For reference, if I just write some letters:
"make px4_sitl jsbsim_dgf"
I get the same error.

I hope the description here is sufficient.

@tayyabkhalil-313
Copy link

@oricabel You also have to add the custom model name in the cmake target list in the file PX4-Autopilot/platforms/posix/cmake/sitl_target.cmake in the portion set(models_jsbsim. After this, you have to add a airframe for the model in the airframes directory.

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