Skip to content

Commit

Permalink
Update networktables to ntcore 2019.2.1 (#916)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
SamCarlberg authored Apr 18, 2019
1 parent f7da679 commit 73884fe
Show file tree
Hide file tree
Showing 9 changed files with 141 additions and 655 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ As a result, many teams with minimal computer vision knowledge successfully used
- Extensible!
- Deploys and runs headless.
- Supports various network protocols
- [Network Tables](https://github.com/PeterJohnson/ntcore)
- [Network Tables](https://github.com/wpilibsuite/allwpilib/tree/master/ntcore/)
- [Robot Operating System (ROS)](http://www.ros.org/)
- HTTP
- OS Support:
- Windows
- OSX
- Linux
- Linux (minimum Ubuntu 18.04 or libc version 2.27+)
- Embedded Linux ARM (NI RoboRIO)


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

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

## Building GRIP From Source

Expand Down
19 changes: 8 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,26 @@
trigger:
- master

resources:
containers:
- container: wpilib2019
image: wpilib/roborio-cross-ubuntu:2019-18.04

jobs:
- job: Linux
pool:
vmImage: 'Ubuntu 16.04'

container: wpilib2019

steps:
- script: |
mkdir build
$ProgressPreference = 'SilentlyContinue'
wget "https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz" -O "build/jdk.tar.gz"
displayName: 'Download JDK'
- script: |
$ProgressPreference = 'SilentlyContinue'
mkdir build
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"
sudo mkdir /opt/java
sudo tar -xzvf build/jdk-13.tar.gz -C /opt/java
displayName: 'Download JDK 13'
- task: JavaToolInstaller@0
inputs:
jdkSourceOption: localDirectory
jdkFile: 'build/jdk.tar.gz'
jdkDestinationDirectory: 'build/jdkinst'
jdkArchitectureOption: x64
- task: Gradle@2
inputs:
workingDirectory: ''
Expand Down
5 changes: 3 additions & 2 deletions core/core.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ dependencies {
api(group = "org.ros.rosjava_bootstrap", name = "message_generation", version = "+")
api(group = "org.ros.rosjava_messages", name = "std_msgs", version = "+")
api(group = "org.ros.rosjava_messages", name = "grip_msgs", version = "0.0.1")
api(group = "edu.wpi.first.wpilib.networktables.java", name = "NetworkTables", version = "3.1.2", classifier = "desktop")
api(group = "edu.wpi.first.wpilib.networktables.java", name = "NetworkTables", version = "3.1.2", classifier = "arm")
api(group = "edu.wpi.first.ntcore", name = "ntcore-java", version = "2019.2.1")
implementation(group = "edu.wpi.first.ntcore", name = "ntcore-jni", version = "2019.2.1", classifier = "all")
implementation(group = "edu.wpi.first.wpiutil", name = "wpiutil-java", version = "2019.2.1")
}

tasks.withType<Jar>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import com.google.inject.AbstractModule;
import com.google.inject.name.Names;

import edu.wpi.first.networktables.NetworkTableInstance;

/**
* Defines any concrete implementation mappings between network managers and their real
* counterparts. This module should not be used in tests as networking protocols can define "Static
Expand Down Expand Up @@ -39,5 +41,8 @@ protected void configure() {
bind(MapNetworkReceiverFactory.class)
.annotatedWith(Names.named("ntManager"))
.to(NTManager.class);

bind(NetworkTableInstance.class)
.toProvider(NetworkTableInstance::getDefault);
}
}
Loading

0 comments on commit 73884fe

Please # to comment.