microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.04k stars 4.48k forks source link

Message length 37 doesn't match expected length 36 #4906

Open hseysen opened 6 months ago

hseysen commented 6 months ago

Bug report

What's the issue you encountered?

I'm attempting to connect my PX4 to both QGroundControl and AirSim at the same time. Serial connection to AirSim works, but in that case, since the port becomes busy, I cannot open QGroundControl at the same time. And when I set up forwarding with MavProxy, the following error happens on AirSim. image

Settings

Note: I have removed the lines for OriginGeopoint and LPE_LAT and LPE_LON to not publicly say my GPS location.

{
    "SettingsVersion": 1.2,
    "SimMode": "Multirotor",
    "ClockType": "SteppableClock",
    "Vehicles": {
        "PX4": {
            "VehicleType": "PX4Multirotor",
            "LockStep": true,
            "UseSerial": false,
            "Sensors":{
                "Barometer":{
                    "SensorType": 1,
                    "Enabled": true,
                    "PressureFactorSigma": 0.0001825
                }
            },
            "Parameters": {
                "NAV_RCL_ACT": 0,
                "NAV_DLL_ACT": 0,
                "COM_OBL_ACT": 1
            }
        }
    }
}

How can the issue be reproduced?

  1. Configure PX4 in HIL mode.
  2. Ensure that HIL mode over Serial connection to PX4 works normally, and joystick controls can fly the drone in the simulation.
  3. Run the following command with MavProxy:
        mavproxy --master=COM5 --out=127.0.0.1:14540 --out=127.0.0.1:14541
  4. Open QGroundControl and ensure that UDP connection through port 14541 works.
  5. Launch AirSim with settings.json provided above. The error happens.

Include full error message in text form

Exception sending messages to vehicle
MavLinkConnectionImpl: Error sending message on connection 'hil', details: UdpClientPort socket send failed with error: 10038

Message length 37 doesn't match expected length36

not receiving any messages from HIL, please restart your HIL node and try again

During this, I can see the MavProxy output as following:

Got COMMAND_ACK: REQUEST_AUTOPILOT_CAPABILITIES: ACCEPTED

And this keeps repeating forever.

JH-ESCL commented 2 months ago

lower the version of UE