Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

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:
image

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
}
}
}
}
}

You must be logged in to vote

Replies: 1 comment · 1 reply

Comment options

hii im facing the same problem too. did u manage to solve it alr

You must be logged in to vote
1 reply
@katy-ho
Comment options

i tried to add the port in my windows too but it doesnt help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.