batuhan3526 / AirSim-PyTorch-Drone-DDQN-Agent

This code is the result of the collaboration of RL Turkey team.
MIT License
25 stars 9 forks source link

msgpackrpc.error.RPCError: rpclib: client error C0002: Function 'simGetImages' was called with an invalid number of arguments. Expected: 3, got: 2 #2

Open mvtkurd opened 2 years ago

mvtkurd commented 2 years ago

hi @batuhan3526 I'm trying to use your project but I cope with this error.

Using CPU Traceback (most recent call last): File "E:/projects about dqn and drone/AirSim-PyTorch-Drone-DDQN-Agent-main/run.py", line 7, in <module> ddqn_agent = DDQN_Agent(useDepth=False) File "E:\projects about dqn and drone\AirSim-PyTorch-Drone-DDQN-Agent-main\ddqn_agent.py", line 116, in __init__ obs, _ = self.env.reset() File "E:\projects about dqn and drone\AirSim-PyTorch-Drone-DDQN-Agent-main\env.py", line 69, in reset obs, image = self.get_obs() File "E:\projects about dqn and drone\AirSim-PyTorch-Drone-DDQN-Agent-main\env.py", line 86, in get_obs responses = self.client.simGetImages( File "C:\Users\Milad\anaconda3\envs\droneProject\lib\site-packages\airsim\client.py", line 266, in simGetImages responses_raw = self.client.call('simGetImages', requests, vehicle_name, external) File "C:\Users\Milad\anaconda3\envs\droneProject\lib\site-packages\msgpackrpc\session.py", line 41, in call return self.send_request(method, args).get() File "C:\Users\Milad\anaconda3\envs\droneProject\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: 3, got: 2

batuhan3526 commented 2 years ago

Hello, sorry for my late reply. This is the first time I see this error. After researching the error a bit, it should most likely be related to the airsim version. @mvtkurd

zclyaya commented 1 year ago

hello,I meet this problem, but i do not konw how to solve it,can yu help me D:\Anaconda3\envs\Airsim\python.exe E:\computer\GitHub\Fixedwing-Airsim-master\src\main.py

In file D:/Anaconda3/envs/Airsim/Lib/site-packages/jsbsim/aircraft/x8/x8.xml: line 80 Engine location ignored, only thruster location is used.

In file D:/Anaconda3/envs/Airsim/Lib/site-packages/jsbsim/aircraft/x8/x8.xml: line 85 Engine orientation ignored, only thruster orientation is used. Traceback (most recent call last): File "E:\computer\GitHub\Fixedwing-Airsim-master\src\main.py", line 218, in run_simulator() File "E:\computer\GitHub\Fixedwing-Airsim-master\src\main.py", line 196, in run_simulator env.simulation_loop(rectangle) File "E:\computer\GitHub\Fixedwing-Airsim-master\src\main.py", line 93, in simulation_loop image.get_np_image(image_type=airsim.ImageType.Scene) File "E:\computer\GitHub\Fixedwing-Airsim-master\src\image_processing.py", line 44, in get_np_image False)]) File "D:\Anaconda3\envs\Airsim\lib\site-packages\airsim\client.py", line 295, in simGetImages responses_raw = self.client.call("simGetImages", requests, vehicle_name) File "D:\Anaconda3\envs\Airsim\lib\site-packages\msgpackrpc\session.py", line 41, in call return self.send_request(method, args).get() File "D:\Anaconda3\envs\Airsim\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.13 [GitHub build 986/commit a09715f01b9e568ce75ca2635ba0a78ce57f7cdd] Dec  3 2022 12:36:17
        [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