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

The JSBSim path problem #36

Open
saj237 opened this issue Oct 14, 2022 · 8 comments
Open

The JSBSim path problem #36

saj237 opened this issue Oct 14, 2022 · 8 comments

Comments

@saj237
Copy link

saj237 commented Oct 14, 2022

image
How to modify the jsbsim path of this jsbsim_simulator.py?
I moved the model file to the corresponding location according to the operation, but since the path of jsbsim is different from yours, run main.py reported the following error:
RuntimeError: JSBSim could not find specified model name: x8

@AOS55
Copy link
Owner

AOS55 commented Oct 14, 2022

I need to go in and refactor this when I get the time.

  • For now the x8 path is in the JSBSim ID key
  • This is loaded in with fdm.load_model
  • Perhaps look at where the aircraft folder is in your JSBSim path, also I'm not sure if the double JSBSim path \JSBSim\JSBSim has an impact.
  • You could also see where the location of the JSBSim package loaded is by running:
    print(os.path.dirname(jsbsim.__file__)) as I think it is looking for the aircraft file one level up.

@saj237
Copy link
Author

saj237 commented Oct 14, 2022

Thank you! I will try.

@saj237
Copy link
Author

saj237 commented Oct 14, 2022

image
Sorry, I can't find the electric800w.xml file in your Fixedwing-Airsim-master file. Did I miss something? I can only find the electric800.xml file in the x8 folder.

@AOS55
Copy link
Owner

AOS55 commented Oct 14, 2022

Hey yep file had wrong name it should be electric800W.xml you can see it in the x8.xml file for JSBSim

@AOS55
Copy link
Owner

AOS55 commented Oct 14, 2022

I have now changed the name

@zclyaya
Copy link

zclyaya commented Nov 28, 2022

Traceback (most recent call last):
File "D:\Fixedwing-Airsim-master\src\main.py", line 3, in
import airsim

hi ,how to solve this problem?

@zclyaya
Copy link

zclyaya commented Nov 29, 2022

Thank you! I will try. hi,I meet same problem, can you help me ? I modify the jsbsim path to "d:\JSBSim", run main.py in pycharm reported the following error:

C:\Users\zcl.conda\envs\zclpytorch\python.exe D:\Fixedwing-Airsim-master\src\main.py

In file d:/JSBSim/aircraft/x8/x8.xml: line 80
Engine location ignored, only thruster location is used.

In file d:/JSBSim/aircraft/x8/x8.xml: line 85
Engine orientation ignored, only thruster orientation is used.
Traceback (most recent call last):
File "D:\Fixedwing-Airsim-master\src\main.py", line 217, in
run_simulator()
File "D:\Fixedwing-Airsim-master\src\main.py", line 195, in run_simulator
env.simulation_loop(rectangle)
File "D:\Fixedwing-Airsim-master\src\main.py", line 92, in simulation_loop
image.get_np_image(image_type=airsim.ImageType.Scene)
File "D:\Fixedwing-Airsim-master\src\image_processing.py", line 44, in get_np_image
False)])
File "C:\Users\zcl.conda\envs\zclpytorch\lib\site-packages\airsim\client.py", line 295, in simGetImages
responses_raw = self.client.call("simGetImages", requests, vehicle_name)
File "C:\Users\zcl.conda\envs\zclpytorch\lib\site-packages\msgpackrpc\session.py", line 41, in call
return self.send_request(method, args).get()
File "C:\Users\zcl.conda\envs\zclpytorch\lib\site-packages\msgpackrpc\future.py", line 45, in get
raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: client error C0002: Function 'simGetImages' was called with an invalid number of arguments. Expected: 2, got: 3

 JSBSim Flight Dynamics Model v1.1.11 [GitHub build 741/commit 10e077b486c42d38e76d1dd7f0aeb744f92d96a0] Feb 13 2022 12:30:25
        [JSBSim-ML v2.0]

JSBSim startup beginning ...

Connected!
Client Ver:1 (Min Req: 1), Server Ver:1 (Min Req: 1)

Process finished with exit code 1

@nechtobolshee
Copy link

Thank you! I will try. hi,I meet same problem, can you help me ? I modify the jsbsim path to "d:\JSBSim", run main.py in pycharm reported the following error:

C:\Users\zcl.conda\envs\zclpytorch\python.exe D:\Fixedwing-Airsim-master\src\main.py

In file d:/JSBSim/aircraft/x8/x8.xml: line 80 Engine location ignored, only thruster location is used.

In file d:/JSBSim/aircraft/x8/x8.xml: line 85 Engine orientation ignored, only thruster orientation is used. Traceback (most recent call last): File "D:\Fixedwing-Airsim-master\src\main.py", line 217, in run_simulator() File "D:\Fixedwing-Airsim-master\src\main.py", line 195, in run_simulator env.simulation_loop(rectangle) File "D:\Fixedwing-Airsim-master\src\main.py", line 92, in simulation_loop image.get_np_image(image_type=airsim.ImageType.Scene) File "D:\Fixedwing-Airsim-master\src\image_processing.py", line 44, in get_np_image False)]) File "C:\Users\zcl.conda\envs\zclpytorch\lib\site-packages\airsim\client.py", line 295, in simGetImages responses_raw = self.client.call("simGetImages", requests, vehicle_name) File "C:\Users\zcl.conda\envs\zclpytorch\lib\site-packages\msgpackrpc\session.py", line 41, in call return self.send_request(method, args).get() File "C:\Users\zcl.conda\envs\zclpytorch\lib\site-packages\msgpackrpc\future.py", line 45, in get raise error.RPCError(self._error) msgpackrpc.error.RPCError: rpclib: client error C0002: Function 'simGetImages' was called with an invalid number of arguments. Expected: 2, got: 3

 JSBSim Flight Dynamics Model v1.1.11 [GitHub build 741/commit 10e077b486c42d38e76d1dd7f0aeb744f92d96a0] Feb 13 2022 12:30:25
        [JSBSim-ML v2.0]

JSBSim startup beginning ...

Connected! Client Ver:1 (Min Req: 1), Server Ver:1 (Min Req: 1)

Process finished with exit code 1

The same problem. Have u fixed it?
@AOS55

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

4 participants