RevoLutioNs
RevoLutioNs

Reputation: 1

AirSim automatically overwrites settings.json and the problem with setWind on the server side of the plugin

I've had some difficult problems for me. I am writing here with the last hope for their solution.

  1. First of all, I had a very interesting moment. Recently, when launching a project in AirSimGameMode mode, I started resetting to the initial Settings Settings.json located in Documents\AirSim. When I run the project, I can see the Settings file.the json changes and becomes
{
"SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/main/docs/settings.md ",
  "SettingsVersion": 1.2
}
  1. Secondly, I have a more serious problem. As far as I understand, when running the Python code (function) with the wind installation, the server returns this error to me:
Traceback (most recent call last):
  File "C:\Users\Egor\PycharmProjects\PythonProject3\test.py", line 16, in <module>
    client.simSetWind(wind)
  File "C:\Users\Egor\.conda\envs\PythonProject3\lib\site-packages\airsim\client.py", line 1065, in simSetWind
    self.client.call('simSetWind', wind)
  File "C:\Users\Egor\.conda\envs\PythonProject3\lib\site-packages\msgpackrpc\session.py", line 41, in call
    return self.send_request(method, args).get()
  File "C:\Users\Egor\.conda\envs\PythonProject3\lib\site-packages\msgpackrpc\future.py", line 46, in get
    raise error.RPCError(self._error)
msgpackrpc.error.RPCError: rpclib: function 'simSetWind' (called with 1 arg(s)) threw an exception. The exception contained this information: bad cast.
# ready to run example: PythonClient/multirotor/hello_drone.py
import airsim

# connect to the AirSim simulator
client = airsim.MultirotorClient()
client.confirmConnection()

client.enableApiControl(True)
client.armDisarm(True)

client.simEnableWeather(True)
wind = airsim.Vector3r(20, 0, 0)
client.simSetWind(wind)

client.takeoffAsync().join()
client.moveToPositionAsync(-10, 10, -10, 5).join()

Unreal Engine magazine in VisualStudio 2022 shows me this:

An exception was raised at address 0x00007FF854AAB699 in UnrealEditor.exe : Microsoft C++ exception: clmdep_msgpack::v1::type_error at memory address 0x0000008cc691fvide0.

I've reviewed the entire code, but I still can't figure out where the error is happening. The problem occurs when trying to convert types, I guess it's the fault of RpcLibServerBase.cpr.

Could it be that the Settnigs file.is json being overwritten because of Microsoft One Drive? Maybe someone has already encountered these problems or can explain how they can be solved? And also maybe someone knows what is the difference between RpcLibServerBase.cpr and RpcLibClientBase.cpr?

Thank you all very much in advance!

Upvotes: 0

Views: 45

Answers (0)

Related Questions