There are some bugs with projects that have a space in their filepath. Try moving it outside of “Code Projects” and into a path without spaces.
My path was changed so it doesn’t have spaces in it, however it’s still not working.
I can’t get the connection to the driver station to work. I am up to date with the NI software and the WPIlib. I downloaded the libraries (halsim_ds_socket.dll, libhalsym_ds_socketd.dylib, libhalsim_ds_socketd.so) and put them in a folder called “libs” in my project folder. I added the dependencies in build.gradle. When I started up the simulation it asks me if I want to use the extension called “halsim_lofi.dll”, but not the one you gave before “halsim_ds_socketd.dll”. Is there something else I need to do? Since I am using 2019.3.2 is there anything differently I need to do?
For people who’s simulation doesn’t work, adding this line to build.gradle under dependencies worked for us
WPILIB Simulation Doesn't Work with Driver Station
OK, I need some basic help getting simulations to even launch. I am guessing I am missing something basic, but since I can’t find any guides at all other than this thread on running simulations it could really be anything.
So, when I click “simulate robot code on desktop” my code compiles, then the terminal sits for a few minutes then eventually I get an error box stating “Failed to launch debuggee in terminal. Reason : com.sun.jdi.connect. TransportTimeoutException”.
Got it, excellent.
I am currently trying to get Snobot simulation working with our code and the above mentioned Driver Station HAL.
I am getting REALLY close, but not quite there yet and believe the comment above is related to my current issue, but not sure how to use the solution suggested (not really a Gradle/Java programmer, although 40+ years of software experience with micro-controllers/C/assembler etc…)
Here is what I have…
Compiled Snobot sim & extensions, made Jaci’s changes to build.gradle. Copied the required HAL DLLs to the project libs directory.
Everything compiles fine and desktop simulations start as expected. I get simulation feedback from the motor controller we are using as expected.
Our code has a drivetrain sub-system that has a default command that reads the joystick analogs and buttons to allow controlling the drive train when our semi-auto helper commands are not running, and this works great too. We get the joystick data for analogs and buttons and can correctly ‘control’ the motors. Note, the drivetrain default command calls methods in OI to retrieve joystick data, hence uses the same, single instance of the joysticks.
Now, we also have joystick button command trigger events in OI (whileHeld etc…) but these don’t seem to fire in simulation.
I know the joystick buttons are actually being sensed/read since I see specific button actions in the drivetrain default command, but the OI events attached to the same buttons don’t fire. (also have alternate buttons, no action either. In fact we normally don’t have duplicate button usage but added this for testing)
My guess is that the joystick button events are not causing interrupts and/or we need to manually do something to force them to trigger the OI events, and the comment above seems to be the solution, but I have no idea how to implement it.
Any help would be greatly appreciated.