crichardson332 / homebrew-crich_brews

Homebrew tap
0 stars 0 forks source link

Failed to open motion model plugin: JSBSimModel #5

Open jharrison opened 5 years ago

jharrison commented 5 years ago

When I try to run straight_jsbsim.xml (or any other missions that use JSBSimModel) I get the following error:

$ scrimmage ./missions/straight_jsbsim.xml
Failed to open motion model plugin: JSBSimModel
Failed to parse entity at start position: x=-1000, y=0
Failed to generate entity
crichardson332 commented 5 years ago

Unfortunately, at this time the JSBSim project does not support macOS, so JSBSim plugins in scrimmage can't be built if you're running on macOS. If JSBSim isn't specifically required, you could use one of the simple motion models in scrimmage core like Unicycle3D or SimpleAircraft. There's also a nonlinear 6DOF model called FixedWing6DOF, but right now the controller for it is not implemented so you'd have to do that yourself.

I am planning on forking JSBSim and creating a homebrew package for it, but that will take some time.

jharrison commented 5 years ago

We do need 6DOF, though it doesn't necessarily need to be JSBSim. We tried using FixedWing6DOF models controlled with AircraftPIDController, but they wandered around like drunken bats. If there's an easy way to get a well-behaved 6DOF model, I would love to know.

crichardson332 commented 5 years ago

Did you change the model params of FixedWing6DOF before trying it? If so then the default gains in AircraftPIDController won't be any good, and you'll have to tune them for your specific aircraft model.

jharrison commented 5 years ago

No, we didn't change any params. Is there an example mission that uses the FixedWing6DOF? I see missions/fixed_wing_6dof.xml but when I try to run it, I get:

Failed to find configuration: cessna
crichardson332 commented 5 years ago

That just means it's not finding the 3D model for visuals. It will still run, but it will show a sphere instead of an aircraft model, so it will be hard to tell what it's doing.

You can just change the cessna xml tag to zephyr-blue, which comes with scrimmage. In the mission file make this change:

- <visual_model>cessna</visual_model>
+ <visual_model>zephyr-blue</visual_model>

You can also add your own aircraft models (or any 3D model) to your project under data/ and use them in your missions.

FYI I just ran the fixed_wing_6dof mission, and it's behavior is not good. The gains need to be tuned, which is not trivial for a full nonlinear 6DOF aircraft.

jharrison commented 5 years ago

It's looking like we're going to need JSBSim. What's the prospect of getting a homebrew package?