This article details known issues (and workarounds) for FRC Control System Software.
macOS Simulation fails to launch in Visual Studio Code¶
The first time launching simulation in VS Code on macOS using the
WPILib: Simulate Robot Code on Desktop task will fail with a warning similar to the one below.
java.io.IOException: wpiHaljni could not be loaded from path or an embedded resource. attempted to load for platform /osx/x86-64/ at edu.wpi.first.wpiutil.RuntimeLoader.loadLibrary(RuntimeLoader.java:78) at edu.wpi.first.hal.JNIWrapper.<clinit>(JNIWrapper.java:38) at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:316) at frc.robot.Main.main(Main.java:27)
This is a bug in VS Code being tracked by WPILib in vscode-wpilib#334.
Workaround: Attempt to launch the simulation once using the
WPILib: Simulate Robot Code on Desktop task and let the task fail. Without closing the console that opens at the bottom of the VS Code window, launch the simulator again using the
WPILib: Simulate Robot Code on Desktop task. The second time the simulator will launch properly.
C++ Intellisense - Files Open on Launch Don’t Work Properly¶
Issue: In C++, files open when VS Code launches will have issues with Intellisense showing suggestions from all options from a compilation unit and not just the appropriate ones or not finding header files. This is a bug in VS Code.
Close all files in VS Code, but leave VS Code open
Delete c_cpp_properties.json file in the .vscode folder, if it exists
Run the “Refresh C++ Intellisense” command in vscode.
In the bottom right you should see something that looks like a platform (linuxathena or windowsx86-64 etc). If it’s not linuxathena click it and set it to linuxathena (release)
Wait ~ 1 min
Open the main cpp file (not a header file). Intellisense should now be working
SmartDashboard and Simulation fail to launch on Windows N Editions¶
Issue: WPILib code using CSCore (dashboards and simulated robot code) will fail to launch on Education N editions of Windows.
Solution: Install the Media Feature Pack
There is currently an issue with inter-operating C++/Java Network Tables clients (dashboards or co-processors) with LabVIEW servers (LV robot code). In some scenarios users will see updates from one client fail to be replicated across to other clients (e.g. data from a co-processor will not be properly replicated out to a dashboard). Data still continues to return correctly when accessed by code on the server.
Workaround: Write code on the server to mirror any keys you wish to see on other clients (e.g. dashboards) to a separate key. For example, if you have a key named
targetX being published by a co-processor that you want to show up on a dashboard, you could write code on the robot to read the key and re-write it to a key like
Issue: PathWeaver exports paths using the length unit that was used for the project. However, the WPILib trajectory tools expects paths with the length units of meters. If different units are selected in PathWeaver, the paths will be scaled incorrectly.
Workaround: Use meters within PathWeaver.
Fixed in 2020.2.2¶
Java predefined colors are all zero¶
The predefined (static) colors from the WPILib Color class have all zero red, green, blue values.
This issue is being tracked by WPILib in allwpilib#2269.
RobotBuilder extensions use the frc namespace (C++)¶
When using RobotBuilder to create a C++ robot program, extensions will generate code prepended with the
frc:: namespace which will not compile.
Workaround: After generating C++ robot code with RobotBuilder, where appropriate, replace
frc:: with the correct namespace for that device.
This issue is being tracked by WPILib in RobotBuilder#194.
Fixed in 2020.1.2¶
WPILib Projects created with 2020.1.1 have a project version of Beta2020-2¶
Any projects created have a project version of Beta2020-2 set in wpilib_preferences.json. This is not an issue, everything will still work properly. This will be fixed and update your projects in the 2nd release.