Skip to content

The RPC call returns immediately without execution on Windows11 #125

@ZhengXinyue

Description

@ZhengXinyue

I encountered an issue where some control commands (e.g., moveByVelocityBodyFrameAsync) have no effect and return immediately on Windows 11, while position-based commands work as expected. Interestingly, the same velocity command works correctly on Ubuntu 22.04.

Environment:

  • OS: Windows11
  • Unreal Engine version: 5.5.4
  • Cosys-AirSim version: Main branch(3.3.0)
  • Vehicle: Multirotor (SimpleFlight)

Steps to Reproduce:

  • Run the standard Blocks environment in UE 5.5.4.
  • Execute the Python script provided below.
  • Observe the drone behavior and terminal logs.

Expected Behavior:
The drone should move by velocity for the specified duration (e.g., 5 seconds), and the .join() method should block until completion.

Actual Behavior:
The RPC call returns instantly. Logs show identical timestamps for Start and Finish.

settings.json:

{
  "SeeDocsAt": "https://cosys-lab.github.io/Cosys-AirSim/settings/",
  "SettingsVersion": 2.0,
  "SimMode": "Multirotor",
  "ViewMode": "FlyWithMe",

  "Vehicles": {
    "Drone1": {
      "VehicleType": "SimpleFlight"
    }
  }
}

Test code:

import setup_path
import cosysairsim as airsim
from loguru import logger


client = airsim.MultirotorClient()
client.confirmConnection()
client.enableApiControl(True)

airsim.wait_key('Press any key to takeoff')
logger.info("Taking off...")
client.armDisarm(True)
client.takeoffAsync().join()


airsim.wait_key('Press any key to move vehicle')
logger.info('Start')
# client.moveToPositionAsync(-10, 10, -10, 5).join()
# client.moveToZAsync(-10, 2).join()

client.moveByVelocityBodyFrameAsync(
    0, 0, -3, 5,
    airsim.YawMode(True, 0),
).join()


# client.moveByVelocityZBodyFrameAsync(
#     1, 1, 3, 5,
#     airsim.YawMode(True, 0),
# ).join()


# client.moveByVelocityZAsync(
#     1, 1, 3, 5,
#     airsim.YawMode(True, 0),
# ).join()

# client.moveByVelocityAsync(
#     1, 1, -3, 5,
#     airsim.YawMode(True, 0),
# ).join()

logger.info('Finish')
client.hoverAsync().join()

airsim.wait_key('Press any key to reset to original state')

client.reset()
client.armDisarm(False)

client.enableApiControl(False)

Logs & Evidence:
Scenario A: moveToPositionAsync and moveToZAsync commands (Working correctly)

(all) E:\Cosys-AirSim\PythonClient\multirotor>python hello_drone.py
Connected!
Client Ver:4 (Min Req: 4), Server Ver:4 (Min Req: 4)

Press any key to takeoff
2026-01-28 23:26:47.541 | INFO     | __main__:<module>:11 - Taking off...
Press any key to move vehicle
2026-01-28 23:26:51.959 | INFO     | __main__:<module>:17 - Start
2026-01-28 23:26:56.010 | INFO     | __main__:<module>:43 - Finish
Press any key to reset to original state

As you can see the command takes about 5 seconds.

Scenario B: moveByVelocityBodyFrameAsync and other commands (Buggy)

(all) E:\Cosys-AirSim\PythonClient\multirotor>python hello_drone.py
Connected!
Client Ver:4 (Min Req: 4), Server Ver:4 (Min Req: 4)

Press any key to takeoff
2026-01-28 23:28:21.020 | INFO     | __main__:<module>:11 - Taking off...
Press any key to move vehicle
2026-01-28 23:28:27.013 | INFO     | __main__:<module>:17 - Start
2026-01-28 23:28:27.013 | INFO     | __main__:<module>:43 - Finish
Press any key to reset to original state

The RPC call returns immediately even if I add .join() method. It seems the rpc call fails internally? I don't know what happened.

And I have also built the project in Ubuntu22.04, there are also some control functions that have no effect. But I tried the 'moveByVelocityBodyFrameAsync' function and succeeded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions