Skip to content

Commit 73884fe

Browse files
authored
Update networktables to ntcore 2019.2.1 (#916)
* Update networktables to ntcore 2019.2.1 Removes dependency on old networktables Increase update rate to 100Hz (from 10Hz) to keep latencies low Call flush after entire pipeline runs to keep all published values synchronized as much as possible * Use WPILib docker image on azure
1 parent f7da679 commit 73884fe

File tree

9 files changed

+141
-655
lines changed

9 files changed

+141
-655
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ As a result, many teams with minimal computer vision knowledge successfully used
2222
- Extensible!
2323
- Deploys and runs headless.
2424
- Supports various network protocols
25-
- [Network Tables](https://github.com/PeterJohnson/ntcore)
25+
- [Network Tables](https://github.com/wpilibsuite/allwpilib/tree/master/ntcore/)
2626
- [Robot Operating System (ROS)](http://www.ros.org/)
2727
- HTTP
2828
- OS Support:
2929
- Windows
3030
- OSX
31-
- Linux
31+
- Linux (minimum Ubuntu 18.04 or libc version 2.27+)
3232
- Embedded Linux ARM (NI RoboRIO)
3333

3434

@@ -41,7 +41,8 @@ As a result, many teams with minimal computer vision knowledge successfully used
4141
Check out the release notes and [the wiki](https://github.com/WPIRoboticsProjects/GRIP/wiki) for more information.
4242

4343
Note for Linux users: GRIP requires GTK2 to be installed. Most Ubuntu-based distributions include it,
44-
but some other distros such as Arch may require it to be manually installed.
44+
but some other distros such as Arch may require it to be manually installed. GRIP also requires libc version 2.27
45+
or higher; for Ubuntu-based distributions, this requires Ubuntu 18.04 or newer.
4546

4647
## Building GRIP From Source
4748

azure-pipelines.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,26 @@
66
trigger:
77
- master
88

9+
resources:
10+
containers:
11+
- container: wpilib2019
12+
image: wpilib/roborio-cross-ubuntu:2019-18.04
13+
914
jobs:
1015
- job: Linux
1116
pool:
1217
vmImage: 'Ubuntu 16.04'
1318

19+
container: wpilib2019
20+
1421
steps:
15-
- script: |
16-
mkdir build
17-
$ProgressPreference = 'SilentlyContinue'
18-
wget "https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz" -O "build/jdk.tar.gz"
19-
displayName: 'Download JDK'
2022
- script: |
2123
$ProgressPreference = 'SilentlyContinue'
24+
mkdir build
2225
wget "https://download.java.net/java/early_access/jpackage/30/openjdk-13-jpackage+30_linux-x64_bin.tar.gz" -O "build/jdk-13.tar.gz"
2326
sudo mkdir /opt/java
2427
sudo tar -xzvf build/jdk-13.tar.gz -C /opt/java
2528
displayName: 'Download JDK 13'
26-
- task: JavaToolInstaller@0
27-
inputs:
28-
jdkSourceOption: localDirectory
29-
jdkFile: 'build/jdk.tar.gz'
30-
jdkDestinationDirectory: 'build/jdkinst'
31-
jdkArchitectureOption: x64
3229
- task: Gradle@2
3330
inputs:
3431
workingDirectory: ''

core/core.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ dependencies {
5454
api(group = "org.ros.rosjava_bootstrap", name = "message_generation", version = "+")
5555
api(group = "org.ros.rosjava_messages", name = "std_msgs", version = "+")
5656
api(group = "org.ros.rosjava_messages", name = "grip_msgs", version = "0.0.1")
57-
api(group = "edu.wpi.first.wpilib.networktables.java", name = "NetworkTables", version = "3.1.2", classifier = "desktop")
58-
api(group = "edu.wpi.first.wpilib.networktables.java", name = "NetworkTables", version = "3.1.2", classifier = "arm")
57+
api(group = "edu.wpi.first.ntcore", name = "ntcore-java", version = "2019.2.1")
58+
implementation(group = "edu.wpi.first.ntcore", name = "ntcore-jni", version = "2019.2.1", classifier = "all")
59+
implementation(group = "edu.wpi.first.wpiutil", name = "wpiutil-java", version = "2019.2.1")
5960
}
6061

6162
tasks.withType<Jar>().configureEach {

core/src/main/java/edu/wpi/grip/core/operations/network/GripNetworkModule.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import com.google.inject.AbstractModule;
1212
import com.google.inject.name.Names;
1313

14+
import edu.wpi.first.networktables.NetworkTableInstance;
15+
1416
/**
1517
* Defines any concrete implementation mappings between network managers and their real
1618
* counterparts. This module should not be used in tests as networking protocols can define "Static
@@ -39,5 +41,8 @@ protected void configure() {
3941
bind(MapNetworkReceiverFactory.class)
4042
.annotatedWith(Names.named("ntManager"))
4143
.to(NTManager.class);
44+
45+
bind(NetworkTableInstance.class)
46+
.toProvider(NetworkTableInstance::getDefault);
4247
}
4348
}

0 commit comments

Comments
 (0)