Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Failed to acquire device error for HID touchpad #61

Open
clrozeboom opened this issue Jan 31, 2019 · 0 comments
Open

Failed to acquire device error for HID touchpad #61

clrozeboom opened this issue Jan 31, 2019 · 0 comments

Comments

@clrozeboom
Copy link

Describe the bug
Using SnobotSim from VSCode with GradleRio. I do a WPILib command: Run a command in Gradle, then type runJavaSnobotSim.
This works when I have the example robot class defined, but not frc.robot.Robot.
When using the real class it fails to acquire my touch-pad device.
I'm wondering if there is a work-around.

Quick Glance Configuration
Please provide the following information

  1. SnobotSimPlugin version : "2019-0.2.0"
  2. SnobotSim version 2019
  3. GradleRIO version "2019.2.1"
  4. Your Operating System: Windows x86-64
  5. If your project is open source and you don't mind, a link to your repository
    I could add you to the project if needed, or send you a zip.

To Reproduce
Please information on when the issue occurs, and/or what you did to cause the issue to surface. i.e.

  • Does the issue happen during compilation (gradlew build)?
    No
  • Does the issue happen when simulating from the command line (gradlew runSnobotSim)?
    Actually, runJavaSnobotSim
  • Does the issue happen on startup (unsatisfied link, class not found, NPE, etc)?
    Yes
  • Does the issue happen while running (When we try to use a joystick..., when we put it in auton..., etc)?
    No

Expected behavior
To be able to run SnobotSim

Detailed Setup
Please provide your full build.gradle file, and a stack trace if applicable. Please put them in code or quote blocks so it is easier to read (put the text in ``)
"
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2019.2.1"
id "com.snobot.simulator.plugin.SnobotSimulatorPlugin" version "2019-0.2.0" apply false // Should point to the latest version at https://login.gradle.org/plugin/com.snobot.simulator.plugin.SnobotSimulatorPlugin
}

def ROBOT_MAIN_CLASS = "frc.robot.Main"

// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project EmbeddedTools.
deploy {
targets {
roboRIO("roborio") {
// Team number is loaded either from the .wpilib/wpilib_preferences.json
// or from command line. If not found an exception will be thrown.
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
// want to store a team number in this file.
team = frc.getTeamNumber()
}
}
artifacts {
frcJavaArtifact('frcJava') {
targets << "roborio"
// Debug can be overridden by command line, for use with VSCode
debug = frc.getDebugOrDefault(false)
}
// Built in artifact to deploy arbitrary files to the roboRIO.
fileTreeArtifact('frcStaticFileDeploy') {
// The directory below is the local directory to deploy
files = fileTree(dir: 'src/main/deploy')
// Deploy to RoboRIO target, into /home/lvuser/deploy
targets << "roborio"
directory = '/home/lvuser/deploy'
}
}
}

// Set this to true to enable desktop support.
def includeDesktopSupport = false

// Maven central needed for JUnit
repositories {
mavenCentral()
}

apply plugin: com.snobot.simulator.plugin.SnobotSimulatorPlugin

configurations {
snobotSimCompile
}

// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 4.
dependencies {
compile wpi.deps.wpilib()
compile wpi.deps.vendor.java()
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
testCompile 'junit:junit:4.12'

// SnobotSim
snobotSimCompile snobotSimJava()

}

// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
// in order to make them all available at runtime. Also adding the manifest so WPILib
// knows where to look for our Robot Class.
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
}
"
Additional context
2019-01-31 10:40:30 INFO com.snobot.simulator.config.v1.SimulatorConfigReaderV1:71 - Loading C:\Users\crozeboom\Documents\GitHub\DeepSpace-2019\DeepSpace-2019\simulator_config\simulator_config.yml
Jan 31, 2019 10:40:31 AM net.java.games.input.ControllerEnvironment log
INFO: Failed to initialize device Synaptics HID-Compliant Touch pad Device because of: java.io.IOException: Failed to acquire device (8007001e)

2019-01-31 10:40:31 INFO com.snobot.simulator.Simulator:216 - Starting Robot Code
2019-01-31 10:40:31 INFO com.snobot.simulator.Simulator:307 - Starting simulator

FAILURE: Build failed with an exception.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant