Headless Sim on Linux?

Has anyone run the simulator on a headless linux machine or docker container?

I’ve pulled allwpilib and built everything. Started the example myRobot from the distribution package and had the ENV variable set to include the libhal_ds_socket.so (or something like that)

This starts up but when I connect the driver station from another machine I get a segfault in the Joystick code.

Is it assuming I have X11 or xinput installed during init? Anything special to do init the sim code?

It seems that on the roboRIO a process called netcomm handles the com stuff. The sim stuff replicates it for other platforms I think. I hope to replace the sim hal slowly with a linuxx86-64 hal.

I’ll take a look at what vmx-pi is doing here.

Weird. Do you have a backtrace?

I believe only the sim GUI would be the only HAL extension that looks for a display or physical HIDs.

I believe setting the HALSIM_EXTENSIONS env var will cause the sim HAL to automatically initialise the extensions you want at robot start.

Read the docs.
./gradlew simulateJava/simulateCpp from a robot project should take care of everything, there’s no reason to build allwpilib locally.
From my experience running sim on GitHub Action’s CI containers, there aren’t any issues regarding loading the GUI. If there is, you can disable the GUI by changing a flag in the build.gradle.

I am attempting to create a new HAL for running bot code directly on a Pi or Jetson without a Rio.

I was trying to get the DriverStation working from a laptop to a headless machine with code I built for “proof of life”.

The networking on a Rio itself is handled by a netcomm process.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.