49 Commits

Author SHA1 Message Date
Jade
b91001f504 Add nix files to gitignore (#8894)
Based on discord comments I assume we don't want to support a Nix shell
or flake for use with building allwpilib so we should just ignore these
files so users can have their own
2026-05-14 21:49:01 -07:00
PJ Reiniger
0049c6f23f [py] Add copybara scripts (#8368)
These are the scripts I've been using to sync between mostrobotpy and
here. I debated putting it in the "source of truth" that is
`mostrobotpy` , but I think it makes more sense here since it already
has bazel set up, and I've also recently added the ability to sync the
`commands-v2` repository, so having it all in one copybara script makes
sense.

This includes a helper python script to make it a little bit easier to
run.
2025-12-12 20:06:19 -08:00
Michael Fisher
b2584c6bdf [cmake] Use binary output dir for generated field images code (#7772) 2025-02-09 23:03:15 -08:00
Thad House
3cc541f261 Remove generated google protobuf support (#7371)
It's not used anymore, and cleans up the build.
2024-11-08 18:29:30 -08:00
Thad House
8b8b634f65 [wpiutil] Change C++ protobuf to nanopb (#7309)
The Google C++ protobuf implementation has issues with dynamic linkage across DLL boundaries because it uses global variables.  It also has a compile-time dependency because the protoc version must exactly match the libprotobuf version.  Using nanopb with a customized generator fixes both of these issues.

Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
2024-11-07 22:42:50 -08:00
PJ Reiniger
36e0c9d6db [build] MVP for building with bazel (#6994) 2024-10-19 09:54:49 -07:00
Gold856
69af7785f6 [gitignore] Add .clangd file to gitignore (#7122) 2024-09-24 09:20:21 -07:00
Thad House
a9ac5b8e24 Don't read protobuf static data across shared library lines directly (#6979)
Reading exported data from shared objects on windows is broken. It requires __declspec(dllimport). However, this is problematic, as we use the same static libraries both from a shared and static context. So we can't just blindly apply dllimport.

The linker should have caught this, as data members are exported in a different way. However, due to a bug in native-utils, data member symbols were exposed directly. However, interacting with those data member was completely broken.

The only way we can really solve this is to just not use static data members. We're pretty good about this in WPILib itself. However, protobuf is absolutely terrible at this. There are a ton of inline functions that access global data. For the protobuf library itself, we can solve this easily enough.

However, for the generated protobuf code, this is much more problematic. The member needed to bypass the global data is private. This means using just the stock protobuf code, this problem is not solvable. But, protobuf generated code has insertion points. Those insertion points let us add our own code into the generated code via a protoc plugin. And it just so happens that an insertion point exists to add extra public methodsto the generated protobuf header. There is also an insertion point to let us add to the cpp file.

The methods we need are the getters, for unpacking protobufs. For any protobuf that has a message as a member, we generate a new wpi_x() getter (the existing one is just x(), where x is the field name). We then implement this in the cpp file. A trick we can use is in the cpp file, we can safely call the x() function, as the cpp file is in the same library as the global. Thus we can call that inline method, and not actually need to directly access any internal private state of the protobuf object.

TL;DR, all protobuf classes that have messages as fields now have a wpi_x() accessor that must be used instead of x() if you want the code to work on windows. After wpilibsuite/native-utils#212, the bad code will fail to link, rather then just fail at runtime.
2024-08-21 07:53:20 -07:00
Jade
14af894711 [gitignore] Add testing files from ctest (#6966) 2024-08-15 07:45:39 -07:00
Thad House
3e10f23cf3 [gitignore] Ignore .bck files it git (#6913) 2024-08-02 18:38:46 -07:00
Ryan Blue
96de39ac6a [gitignore] Add ntcore test persistent files to gitignore (#6886) 2024-07-28 17:09:46 -07:00
Gold856
03b332d3cf [gitignore] Add CMakeUserPresets.json to gitignore (#6877) 2024-07-27 16:28:40 -07:00
Jade
19a5e0c49a Add factory path to .gitignore (#6850) 2024-07-18 11:55:17 -07:00
Ryan Blue
65b26738d5 Add CMakeSettings.json to gitignore (#5682) 2023-09-26 20:57:44 -07:00
Ryan Blue
7cd30cffbc Ignore networktables.json (#5006) 2023-01-26 09:21:58 -08:00
Ryan Blue
bc473240ae Add Jetbrains Fleet folder to .gitignore (#4872) 2022-12-27 22:41:13 -06:00
Ryan Blue
ca35a2e097 Add simgui files to .gitignore (#4726) 2022-11-28 08:57:57 -08:00
PJ Reiniger
ab4cb59326 [gitignore] Update gitignore to ignore bazel / clion files (#3524) 2021-08-20 23:18:37 -07:00
Peter Johnson
eae3a6397a gitignore: Ignore .cache directory (#3196)
This is used by newer clangd versions.
2021-02-21 16:35:01 -08:00
Thad House
05701317b4 [build] Make loading sim extensions from MyRobot easier (#2671) 2020-08-31 00:34:34 -07:00
Thad House
b37b68daaf Add JRE deployment to MyRobot Deploy (#2099) 2019-11-18 19:52:56 -08:00
Peter Johnson
d787b5d609 Add more items to .gitignore (#1850)
- compile_commands.json
- .clang
- .clangd/
2019-08-25 23:30:04 -07:00
Jeremy White
ebd41fe0bb Bring back the gazebo plugins (#1063)
The models and meshes are not included. We will need
to find an alternate way to reintegrate these and use them.

* Add simulation/gz_msgs back, and build with Gradle.

* Add back in the frc simulation plugins for gazebo.

* Add a new shared library, halsim_gazebo.

This library will become the interface between the
HAL sim layer and gazebo.

* Preserve the first channel number used in created Encoders in the Sim MockData.

This allows us to use the DIO channel number to connect with simulated encoders.

* Have the HAL Simulator set the reverse direction on creation.

This enables a simulator to be aware of the direction.

* Add a drive_motor plugin.

This is a bit of a 'magic' motor, which allows us to build robot
models that drive in a more realistic fashion.  It does this
by apply forces directly to the chassis, rather than relying on
the complex motion dynamics of a driven wheel.

This in turn allows the model to reduce wheel friction,
reducing scrub, and allowing for a more natural driving experience.
2018-06-30 00:45:21 -07:00
Thad House
954f8c40f5 Adds CMake Builds (#1015) 2018-05-02 21:15:30 -07:00
Thad House
11b99a016a Removes old version files from git ignore (#1003) 2018-04-29 20:28:45 -07:00
Austin Shalit
91151e33bb Add out to gitignore (#988) 2018-04-29 20:14:53 -07:00
Jaci R
0d54772362 Add IDEA plugin to root project (#707) 2017-11-05 19:57:53 -08:00
Thad House
e1195e8b9d Update to 2018_v4 image and new build system. (#598)
* Revert "Force OpenCV to 3.1.0 (#602)"

This reverts commit 50ed55e8e2.

* Removes Simulation

* Removes old build system

* Removes old gtest

* Adds new gmock and gtest

* Updates to new ni-libraries

* removes MyRobot (to be replaced)

* moves files to new location

* Adds new sim backend and new test executables

* updates .styleguide and .gitignore

* Changes cpp WPILibVersion to a function

MSVC throws an AV with the old version.

* Disables USBCamera on all systems except for linux

* 2018 NI Libraries

* New build system
2017-08-18 21:35:53 -07:00
Thad House
182f57216f Adds project and classpath ignores (#425)
VsCode now supports Java, but it creates these files, and there is no
way to turn it off. Will be adding this to a few other repos too.
2017-01-01 00:08:13 -08:00
Fred Silberberg
e5e1a1a4d1 Moved version generation to the WPILib versioning plugin. (#277)
* Moved version generation to the WPILib versioning plugin. This also moves ntcore and wpilib to the latest available version.

* Fixed description string.

* Gave full path for ignored files.
2016-10-20 23:54:04 -07:00
Thad House
5e9fe2f5cb Adds an ignore for Visual Studio Code files (#203) 2016-08-13 14:44:10 -07:00
Peter_Mitrano
70bc630f1f Fixing the frcsim installer script
URL for simulation zip changed as of gerrit 1264
script argument name changed from INSTALLER to INSTALL
fixed jar and logo paths for sim_ds

to use the script, it's now simply:
./frcsim-installer.sh INSTALL

You can optionally supply a promotion status from which to install, such as
./frcsim-installer.sh INSTALL beta
./frcsim-installer.sh INSTALL development

Also added some information to the README

Also allow any type of file install-resources since it may contain
libraries and jars

Change-Id: Ie876a05c88d3d48b8592f1800959988ae66edd04
2016-01-03 02:05:22 -05:00
Fredric Silberberg
729545809e This commit adds documentation generation,
including grabbing ntcore sources, for both
Java and C++. This will need changes made in
the wpilib promotion tasks to copy the generatd
documentation to the correct places.

Change-Id: I64590b5eda001da2cc8ae498b2b1c0fd298da284
2015-12-24 14:43:51 -05:00
Peter Johnson
2cd7bc83c8 Update .gitignore for new tree structure.
Change-Id: I9e0e3e791c31a3f390b6cf7550c4acdb049bf452
2015-11-23 23:53:35 -08:00
peter mitrano
29d029fa61 merged from frcsim branch
verified to work on real robots
adds sim eclipse plugins, fixed JavaGazebo, made wpilibC++Sim build on windows
 - Java and C++ simulation robot programs run on windows
 - simulation eclipse plugin delivers models and gazebo plugins
 - Java Gazebo now respects GAZEBO_IP variables and can work across networks
 - hal and network tables win32 hacked to work on windows
 - smart dashboard broken on windows due to network tables hacks
 - wpilibC++Sim, gz_msgs, and frcsim_gazebo_plugins build with CMake
 - removed constexpr for cross platform compatibility
 - msgs generated using .protos as a part of build process
 - some spare and unused cmake/pom files deleted
 - simulation ubuntu debians removed entirely
 - refactored CMake project flags and macros
 - updated to match non-sim C++ API
 - fixed and updated documentation
 - servo added to simulation

Change-Id: Ia702ff0f1fee10d77f543810ad88f56696443b05
2015-08-18 10:39:25 -04:00
Fredric Silberberg
1e4e0bacde Gradle Build
This adds gradle support for building wpilibj and wpilibc. At this
point, both of these libraries should be fully ready to go.

Gradle should give us a number of improvements, including less
dependencies for getting building up and running, and MUCH faster build
times. I'm noticing significantly faster build times already compared to
Maven, with neither system building the plugins. The changes here should
be pretty straight forward. The basic command for gradle is './gradlew'.
This is the gradle wrapper, and it will find and download the correct
gradle executable for your system. There is no need to install anything
yourself. To see every task available, run './gradlew tasks'. The
important tasks for us are listed under the WPILib header when the tasks
command is run. To generate unit test binaries, the
fRCUserProgramExecutable command will create the C++ tester, and the
wpilibjIntegrationTestJar command will create the Java tester. The Jenkins
deploy scripts have been modified to know the difference between maven
generated and gradle generated jars with an environment variable. Creating
the eclipse plugins still requires Maven, but gradle will handle calling
it correctly and generating the proper dependencies for it. Create the
plugins by calling ./gradlew eclipsePlugins.

Jenkins can now be modified to support the new build system. Unit tests
are run with ./gradlew test. Generating the integration tests uses the
above two commands, and then process proceeds exactly as it did before.
For publishing documentation, a new task has been created, ./gradlew
publishDocs, which handles putting the documentation where Jenkins expects
for publishing.

Change-Id: I9a260d391984f98ef9170993efe933e4026161dc
2015-05-20 16:22:17 -04:00
Peter Johnson
d0258923e8 More Java nivision wrapper fixes.
- Fix sliceByteBuffer, getBytes, and putBytes implementations, which had
  functional errors.  Also, getBytes and putBytes now use the ByteBuffer
  get/put byte[] functions, which should improve performance.

- Don't generate wrappers for functions that are not available in the
  shared library.

Change-Id: Iaf45814b34720d3fdcd58adf99ad9c3ff2703bc3
2015-01-14 23:49:37 -08:00
Peter Johnson
db0b421019 Wrap IMAQdx functions.
Quite a few functions aren't wrapped, but the most critical ones for
vision should be.

This also fixes a couple of issues:
- nivision_arm.ini (and imaqdx_arm.ini) are now generated without need for
  running the output on the RoboRIO.
- enum values are generated even if the value is not directly specified.
2014-12-13 00:32:20 -08:00
Peter Johnson
430722c4a3 Add Java nivision wrappers.
Only very basic testing performed to date.

The wrappers are still a bit incomplete (some structures and functions),
but are much more complete than the old ones.

Fixes artf3796.

Changes from initial changeset:
- Use // for comments.
- Add auto-generate notices to the beginning of each generated file.
- Include error number with error text in exception.
- Add free() function to structures.
- Fix out-of-order / non-array enums.
- Avoid duplicate calls to DisposedStruct.write() as .getAddress() does it.
- Refactor OpaqueStruct.
- Default to no null allowed except when overridden.
- Implement unowned return values.
- Add gen_struct_sizer script.

Change-Id: Ie0d102c45817ea8812d98fe4938d1a2255c61664
2014-12-09 00:48:57 -08:00
Fredric Silberberg
0f825b7179 Added ignore support for intellij
Change-Id: Ia55578c89fadb92d5bd0877d296305081ece0358
2014-10-30 14:48:31 -04:00
Jonathan Leitschuh
47169e0ce1 Adds test scripts to deploy, run and retrieve results from integration tests.
Adds a simple script for jenkins to run to retrieve the test results from.
Adds a script that allows developers to download and run tests from a specific language easily.
Adds a script that allows the tests to be run from within an ssh session on the roborio.

Change-Id: Ibe6ddc4e1dcbb8192e6552c3901e96f6907a8020
2014-08-26 11:20:02 -04:00
Jonathan Leitschuh
7ec8d4e9a3 Updates gitignore to use a file generated using http://www.gitignore.io
Removes more OSX/Windows/Linux files.
Adds gitignores for cmake, Gradle, and Maven

Change-Id: I96ada2ef360770975f4afc068985cd6a21880a5f
2014-08-26 11:05:43 -04:00
Jonathan Leitschuh
9dfd6bde9d Adds a Vagrant configuration file and setup script
Vagrant allows developers to install Vagrant and their choice of virtual box in which to develop.
This provides a consistent environment where anyone can devlop WPIlib without having to go through a lengthy setup process.

Change-Id: Iced863d307f0e6a761441f17c3de377594197c38
2014-08-15 10:56:31 -04:00
Jonathan Leitschuh
c0af235050 Removes the dependency-reduced-pom.xml from the repository.
Also adds this file to the .gitignore

Change-Id: I731c58d4f8a96531e61598e281a769e6b13e2e86
2014-07-30 14:08:21 -04:00
Jonathan Leitschuh
3227e779a1 Adds .cproject to the .gitignore to remove eclipse files
Change-Id: I0ed347905cd29054f88088d42a63b4559d89446d
2014-06-03 10:00:23 -04:00
Jonathan Leitschuh
db940d8c43 Adds Integration tests for WPILib
-Jaguar Speed Controller
-Tallon Speed Controller
-Victor Speed Controller
-Encoder
-Counter
-Timer

Change-Id: Ia0d7e6e05652ea2c5bb004ae5bc59e6e615f8396
2014-05-23 14:19:48 -04:00
Fredric Silberberg
12e811250b Driver Station
Added a java implementation of the FRC Network Communication
Protocol. The majority of network related code was written by
Brendan McLeod, and I have adapted a front end that listens for
input from standard input.

Change-Id: Id9e4d5b52425e56bf8a848b17390fb83b9e75d29
2014-05-12 15:33:54 -04:00
Fredric Silberberg
21074eea4c Added .classpath to the gitignore
Change-Id: I1a6680e6ba0b99fd06649c0a46f02edfc9bf2473
2014-05-12 14:53:16 -04:00
Fredric Silberberg
cdc94f062f Added .gitignore file
Change-Id: Id60a5cb48292950c4819685a3a0c0ab75685d378
2014-05-12 09:27:40 -04:00