Struggling to get communication from windows to PX4 on Ubuntu working properly #136
Unanswered
Edmonds1997
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello I have a windows PC running an Unreal Project with IP address: 192.168.2.100. I have another Ubuntu PC running PX4 SITL (via the "sudo make px4_sitl_default none_iris" command) with IP address: 192.168.2.200. The two computers can ping each other but when I try to run the simulation I get the following in Unreal Engine:
"Disconnecting mavlink vehicle"
"Waiting for mavlink vehicle..."
"Wating for TCP connection on port 4560, local IP 192.168.2.100"
PX4 shows this:

I tried editing ~/.bashrc to have the following lines at the bottom
export PX4_SIM_HOST_ADDR=192.168.2.100
export PX4_SIM_HOSTNAME=192.168.2.100
I do find it quite weird PX4 still shows [init] PX4_SIM_HOSTNAME: localhost and not 192.168.2.100...
If anybody could point out what I'm doing wrong I would greatly appreciate it. I haven't been able to find many examples not using WSL2.
I've heard this can also be firewall related, but I tried with it off and got the same results. I used Wireshark on on the windows PC and saw some TCP packets.
My settings.json file looks like this:
{
"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"ClockType": "SteppableClock",
"Vehicles": {
"PX4": {
"VehicleType": "PX4Multirotor",
"UseSerial": false,
"Lockstep": true,
"UseTcp": true,
"QgcHostIp": "",
"TcpPort": 4560,
"ControlIp": "192.168.2.200",
"ControlPortLocal": 14540,
"ControlPortRemote": 14580,
"LocalHostIp": "192.168.2.100",
"Sensors": {
"barometer": {
"SensorType": 1,
"Enabled": true,
"PressureFactorSigma": 0.0001825
}
}
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions