Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Problem with initializing RobotDrive/Talon objects (http://www.chiefdelphi.com/forums/showthread.php?t=154773)

NStr 05-02-2017 10:24

Problem with initializing RobotDrive/Talon objects
 
Hi,

I encountered a unique problem recently, I only found one thread with a similar problem which they didn't manage to solve(or at least they didn't post how).

I managed to reduce the problem to the point where I initialize my SpeedControllers, either through RobotDrive or Talon(we use Talon SR) object. When I initialized the the RobotDrive object I received an error in the driver station:
Error -52010 NIFPGA: Resource not initialized(something like this).

Additionally, the driver station said that there is no robot code. Surprisingly when I tried uploading a basically identical iterative robot there was no problem and the robot worked fine.

I tried initializing the Talons directly, this time I didn't get the previously mentioned error however there was still no robot code.

I get the following error at the breakpoint of the initialization while debugging the robot:
Can't find a source file at "/var/lib/jenkins/workspace/WPILib/WPILib - Release/hal/lib/athena/DigitalInternal.cpp"

I have tried reimaging, repairing the toolchain, reinstalling the plugins yet nothing seems to solve the problem.

Huge thanks to anyone who tried helping!

ozrien 05-02-2017 23:19

Re: Problem with initializing RobotDrive/Talon objects
 
If you are seeing "Error -52010 NIFPGA" in the Driver Station after adding a CANTalon, I would recommend reading section 16.36 in latest Talon SRX Software Reference Manual.

euhlmann 06-02-2017 02:51

Re: Problem with initializing RobotDrive/Talon objects
 
Quote:

Originally Posted by ozrien (Post 1640906)
If you are seeing "Error -52010 NIFPGA" in the Driver Station after adding a CANTalon, I would recommend reading section 16.36 in latest Talon SRX Software Reference Manual.

For the lazy

Quote:

16.36. Adding CANTalon to my C++ FRC application causes the Driver Station log to report: ERROR -52010 NIFPGA: Resource not initialized, GetFPGATime, or similar.
A full example of the crashed call stack is below…
Code:

ERROR -52010 NIFPGA: Resource not initialized GetFPGATime
[Utility.cpp:171]
Error at GetFPGATime [Utility.cpp:171]: NIFPGA: Resource not initialized
at frc::GetFPGATime()
at frc::Timer::GetFPGATimestamp()
at frc::MotorSafetyHelper::MotorSafetyHelper(frc::MotorSafety*)

… this can happen if a CANTalon is constructed before the C++ WPILIB initialization routine is called. At the time of writing, this condition can occur when cleanly creating a C++ Command-based project with the latest Eclipse Plugins. An example workaround can be found here…
https://github.com/CrossTheRoadElec/...74df894f7bbf2d
…demonstrating how to ensure motor controller object is constructed after WPILIB initialization.

C++ Command-based projects generated with latest Robot Builder appears to ensure that motor controller objects are created after WPILIB initialization, and therefore do not cause this failure symptom.

More information on C++ Command-based projects can be found at the FRC screenstepslive page, as this is not maintained by CTRE. https://wpilib.screenstepslive.com

ozrien 06-02-2017 17:34

Re: Problem with initializing RobotDrive/Talon objects
 
Quote:

Originally Posted by euhlmann (Post 1640943)
For the lazy

Hey that's cheating.

NStr 09-02-2017 18:49

Re: Problem with initializing RobotDrive/Talon objects
 
Quote:

Originally Posted by ozrien (Post 1640906)
If you are seeing "Error -52010 NIFPGA" in the Driver Station after adding a CANTalon, I would recommend reading section 16.36 in latest Talon SRX Software Reference Manual.

Wasn't using Talon SRX but I guess the section applies to all Speed Controllers. Anyways this fixed the problem, so thanks a lot!

ozrien 09-02-2017 18:55

Re: Problem with initializing RobotDrive/Talon objects
 
Quote:

Originally Posted by NStr (Post 1642727)
Wasn't using Talon SRX but I guess the section applies to all Speed Controllers. Anyways this fixed the problem, so thanks a lot!

That's how good our support is. ;)


All times are GMT -5. The time now is 04:17.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi