Closed arthurrichards77 closed 3 years ago
Ah right, this was the issue I mentioned in our meeting, proposal is to have a linux version which runs network host and a windows version (with correct settings) which runs a docker network.
Will push a fix soon
Thanks @mhl787156 - hopefully this is just a matter of folding back in some of the clever addressing that has worked elsewhere. Sorry if the need for Windows support is a pain but I think it's important - part of the appeal of the Starling approach to this project is that we don't need to support students trying to go dual-boot or install VMs on their own laptops, including all the Linux admin that they chose to avoid in the first place. This way, we just have to support Docker for everyone. With Linux only, we have to support Docker AND Linux.
Yeah you are correct there, a requirement for starling was to be multi-platform anyway. I think in this particular case we forgot that net=host via docker (and docker-compose) was only supported on linux with our last update!
Fails for me on Windows - did you have it working...? Looks like it's still looking for the FCU on localhost. Was the old stuff about detecting the right IP address put back in as well as the network?
mavros_1 | [run_ros1.sh-1] [ INFO] [1635493438.164464500]: FCU URL: tcp://127.0.0.1:5760?ids=1,240
mavros_1 | [run_ros1.sh-1] [ INFO] [1635493438.167159500]: tcp0: Server address: 127.0.0.1:5760
mavros_1 | [run_ros1.sh-1] [FATAL] [1635493438.533177500]: FCU: DeviceError:tcp:connect: Connection refused
Note on priority it's fine for the Nov 3rd video to be developed from a Linux deployment, so this can wait until after the other developments for the video.
@rob-clarke when you said you hadn't put in the port stuff, is that for this exact use case when gazebo/sitl/mavros are running in different containers? Or for kubernetes specifically? I think we are going to need the AP equivalents to the following within the SITL container
"PX4_SIM_HOST=simhost"
"PX4_OFFBOARD_HOST=mavros"
The ArduPilot side should be relatively straightforward using the --sim-address
, --sim-port-in
& --sim-port-out
options. I'll have a look this afternoon/evening
The ap-sim-address branch has an initial stab at allowing the configuration. We will need to figure out how to pass the IPs/if we need to do lookup from hostnames in the entrypoints. Haven't looked at port configuration yet as shouldn't be needed for a single instance.
Set AP_SIM_ADDRESS
on the ArduPilot SITL to point to the Gazebo container and AP_SITL_ADDRESS
on the Gazebo container to point to the SITL.
Will likely need to add *_HOST
variations on these as compose files tend not to expose IPs.
OK - we'll talk on Monday about this, but I'm confused for two reasons:
On 1, yes likely the SITL <-> Gazebo problems were hidden by the MAVROS ones. MAVROS_FCU_URL
will need to be adjusted to point to the SITL container. This was not a problem with network host as everything was using loopback IP.
The same thing applies to the SITL -> Gazebo link but some more mechanics need to be in place to make the adjustment. Regarding 2, yes this is ArduPilot specific, we hadn't yet got a method of exposing how to set the IPs used by the SITL to talk to the sim. The new branch adds that.
The SITL, and ArduPilot's Gazebo plug-in, won't be able to cope with plain hostnames so we'll need to add the host -> IP lookups. We've already done something similar for the PX4 images so this shouldn't be a problem.
Can't access localhost:8080 on Windows - just get connection refused, and Docker Desktop shows no ports available. Output messages show Gazebo listening on 8080 though. Suspect problem is that host networking is not permitted on Windows.
Tried with a modified version of the compose file as below. That enabled me to get a Gazebo window up in my browser but also gave lots of error messages from mavros, indicating that it could no longer find the FCU URL, presumably due to the network change,
`version: '3'
services: simhost: image: uobflightlabstarling/starling-sim-iris-ap:latest volumes:
8080:8080
sitl: image: uobflightlabstarling/starling-sim-ardupilot-copter:latest environment:
AP_HOME=51.4233628,-2.671671,100.0,0
mavros: image: uobflightlabstarling/starling-mavros:latest command: ros2 launch launch/mavros_bridge.launch.xml environment: