Servers by jDrones

Tutorial for running SITL Simulator on MacOS with Vagrant + XQuartz


(Dr Nic Williams) #1

I wanted to see the SITL simulator running on my MacOS. The wiki vagrant instructions got me a fair way, but I discovered I needed some extra flags (vagrant ssh -- -X) and dependencies (XQuartz).

I’ve written up a short guide to installing & running SITL on MacOS:

If anyone has any optimizations/improvements, please let me know. I’m still learning how all the ground control + SITL + firmware works together.

(Dr Nic Williams) #2

Towards running SITL within Docker, looks to be a good set of instructions for X11 forwarding + docker.

And for some OS X instructions for socat.

To run firefox, as per the blog post, I needed to first run socat:

socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" &

The run the X11 app in a docker container, passing thru $DISPLAY to that socat port:

docker run -d --name firefox -e DISPLAY=$IP:0 -v /tmp/.X11-unix:/tmp/.X11-unix jess/firefox

(Mike Boland) #3

Am I missing something with vagrant?
It complains about a default provider when vagrant up is initiated.

(Dr Nic Williams) #5

@mboland I’m sorry if I’ve missed some “getting started with vagrant” steps. Can you let me know what the error output looks like and I’ll help hunt down how to setup vagrant etc and fix up the instructions for you.

(Mike Boland) #6

Thanks for taking the time.
the error message is:
No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
“providers”, to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn’t working by forcing usage with
vagrant up --provider=PROVIDER, which should give you a more specific
error message for that particular provider.

So which provider do I need to specify?
Have I neglected to install something?

(Dr Nic Williams) #7

Ok I’ve added a link to download VirtualBox.

AFAIK you shouldn’t need to pass vagrant up --provider virtualbox – I’m not seeing that on any of their “getting started” guides

From this page it seems to confirm that Virtualbox is the default

So try installing VirtualBox and running vagrant up aagain.