Go to Post The robot competition is the most obvious, visible, and distilled-media-friendly part of the picture... We shouldn't be surprised that it's all that gets into the news coverage, when that coverage is managed by someone who isn't already well versed in what FIRST is trying to do. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-04-2015, 20:50
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
error with NavX MXP connected to the Serial Port

Hey guys, title pretty much says it all. About two weeks ago, we installed the new NavX MXP and set it up. We downloaded their code from their github repo and we're using that. The only problem is that I'm not sure that I'm using it properly. I'm no expert in using the serial port on the roboRIO, and I have a feeling that something somewhere is going wrong. Does anybody know where this error might be coming from? our code is at https://github.com/Sparky384/Team384Year2015



Code:
Error on line 115 of SerialPort.cpp: HAL - VISA: Resource Locked
	at /home/lvuser/FRCUserProgram() [0x23b4c]
	at /home/lvuser/FRCUserProgram() [0x1194c]
	at startRoutine(void*)
Thanks for your time! If you have any questions about the code feel free to ask them. All the relevant gyro calls are in the drivetrain subsystem file.
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote
  #2   Spotlight this post!  
Unread 15-04-2015, 21:35
slibert slibert is online now
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 334
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: error with NavX MXP connected to the Serial Port

Quote:
Originally Posted by Sparkyshires View Post
Hey guys, title pretty much says it all. About two weeks ago, we installed the new NavX MXP and set it up. We downloaded their code from their github repo and we're using that. The only problem is that I'm not sure that I'm using it properly. I'm no expert in using the serial port on the roboRIO, and I have a feeling that something somewhere is going wrong. Does anybody know where this error might be coming from? our code is at https://github.com/Sparky384/Team384Year2015



Code:
Error on line 115 of SerialPort.cpp: HAL - VISA: Resource Locked
	at /home/lvuser/FRCUserProgram() [0x23b4c]
	at /home/lvuser/FRCUserProgram() [0x1194c]
	at startRoutine(void*)
Thanks for your time! If you have any questions about the code feel free to ask them. All the relevant gyro calls are in the drivetrain subsystem file.
Took a quick look at the code you've linked to. Looked around and couldn't find any code attempting to initialize the navX MXP. Looked in Subsystems\DriveTrain.cpp, but didn't see anything there except a Gyro instance.

Note that you need to use one of the classes in the navX MXP folder, not the Gyro class from the WPI Library (that only works w/the kit-of-parts gyro). See the example Robot.cpp file in the navX MXP folder for an example.

Perhaps the latest code is not checked in - or I'm looking in the wrong place. Can you please point me to the exact file and line number where the navX MXP initialization is occuring? Also, I didn't see a RobotMap.cpp file anywhere, though I did see RobotMap.h - maybe a sign not everything is checked in?
Reply With Quote
  #3   Spotlight this post!  
Unread 15-04-2015, 22:45
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,543
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: error with NavX MXP connected to the Serial Port

Quote:
Originally Posted by Sparkyshires View Post
Hey guys, title pretty much says it all. About two weeks ago, we installed the new NavX MXP and set it up. We downloaded their code from their github repo and we're using that. The only problem is that I'm not sure that I'm using it properly. I'm no expert in using the serial port on the roboRIO, and I have a feeling that something somewhere is going wrong. Does anybody know where this error might be coming from? our code is at https://github.com/Sparky384/Team384Year2015



Code:
Error on line 115 of SerialPort.cpp: HAL - VISA: Resource Locked
	at /home/lvuser/FRCUserProgram() [0x23b4c]
	at /home/lvuser/FRCUserProgram() [0x1194c]
	at startRoutine(void*)
Thanks for your time! If you have any questions about the code feel free to ask them. All the relevant gyro calls are in the drivetrain subsystem file.
Code:
sPort = new SerialPort(57600,SerialPort::kMXP);
navX = new AHRS(sPort, 60);
imu = new IMU(sPort, 60);
You should choose either AHRS or IMU, not both.

Quote:
Originally Posted by slibert View Post
Perhaps the latest code is not checked in - or I'm looking in the wrong place.
It's in the gyro branch.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-04-2015, 09:26
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
Re: error with NavX MXP connected to the Serial Port

Ok, thanks. Which one would you recommend? and if I delete the double initialization do you think that'll fix the error?
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote
  #5   Spotlight this post!  
Unread 16-04-2015, 17:44
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
Re: error with NavX MXP connected to the Serial Port

Hey guys, it worked! I deleted the AHRS initialization and it worked. The only other thing is that there is this other error message that I wasn't seeing cause it was drowned out by the first. It is this:

Code:
Error on line 143 of Command.cpp: A pointer parameter to a method is NULL: subsystem
	at /home/lvuser/FRCUserProgram() [0x38884]
	at /home/lvuser/FRCUserProgram() [0x1b078]
	at /home/lvuser/FRCUserProgram() [0x17b34]
	at /home/lvuser/FRCUserProgram() [0x1f6f4]
	at /home/lvuser/FRCUserProgram() [0x16b78]
	at /home/lvuser/FRCUserProgram() [0x1fa88]
	at /home/lvuser/FRCUserProgram() [0x20ca8]
	at /home/lvuser/FRCUserProgram() [0x16acc]
	at __libc_start_main
Would you know what might be causing this?
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:05.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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