|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#241
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
The issue seems to be happening much more often now, in our last practice match we had to restart robot code 3 times. I checked the log data, the 'Opened' indicator is false when we don't get data. I'm going to switch to I2C and see what happens.
|
|
#242
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
I'd be curious to know if the MXP TTL UART exhibits the same symptom. Last edited by slibert : 02-04-2015 at 20:37. |
|
#243
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
I spent some time today messing with our NavX, and I think I've found a solution to the problem, or at least a workaround.
The SPI port open seems to be silently failing - there is no error information at the error output or in the SPI device reference. As far as I can tell, it's just outputting 255 for every read byte, and the 'opened' indicator being false seems to come from a checksum failure rather than due to an actual error code. I tried switching to I2C, and the issue still happens with the same frequency, but there's an actual error message: ![]() With both protocols, when communication with the NavX is working, just restarting the robot code will sometimes cause it to stop working, so it doesn't only happen on robot boot. I then connected the SPI header on the NavX board to the roboRIO onboard SPI port, and switched to communicate through the onboard SPI rather than the MXP SPI, and it seems to work fine now. Looks like the issue is specifically related to opening the MXP ports. I spent a good 20-30 minutes repeatedly restarting the robot without issue, so it seems pretty solid to me. TL;DR: If you're having intermittent issues communicating with the NavX, try connecting it to the onboard SPI port. |
|
#244
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
|
|
#245
|
|||||
|
|||||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
|
|
#246
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Yes, we have 2 quadrature encoders on MXP DIO 0, 1, 8, and 9, and a Banner sensor connected to MXP DIO 3.
|
|
#247
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
In addition to the onboard Roborio I2C/SPI interfaces indicated in randandtor's suggestion, the MXP TTL UART interface may also not be impacted by this issue. We'll post any more relevant info as we get it. Last edited by slibert : 11-04-2015 at 15:20. |
|
#248
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
Two teams have now reported success connecting the RoboRio on-board SPI connector to the navX MXP SPI Expansion connector, and changing the LabView library to specify the on-board SPI port rather than the MXP. Sounds like this has the potential to be a workaround in your case, too. Also, as we continue to chase down this SPI issue, one detail (thanks to Kevin Sevcik for bringing it up) that could be helpful is: when you were experiencing this issue, did you have any other devices connected to the navX MXP Expansion IO ports (digital or analog I/O)? |
|
#249
|
||||
|
||||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
This week, the sensor failed to initialize in 2 out of the 19 matches played.
Is there any documentation on how to connect the navX to the onboard SPI port? I'm not sure how that works. Also: we're running a motor from the MXP DIO/PWM 0 Last edited by cjl2625 : 14-04-2015 at 01:02. |
|
#250
|
||||
|
||||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
Pin one is the pin closest to the MXP port on this connector. http://www.kauailabs.com/store/image..._annotated.jpg What we did is connected SCK, MOSI, and MISO to the port on the roboRIO with a female to female pwm cable. Then you have to connect the CS pin to one of the 4 CS pins on the RoboRIO. That pin is the one you select when you select the spi port in LV. |
|
#251
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
In addition to Thad's post on this topic, you may find the following helpful. You will need to connect a total of 4 wires between two sets of connectors which are shown in the navX MXP RoboRio installation photo. The RoboRio SPI connector is at the top left of the photo. The navX MXP SPI connector is the middle row of 6 pins, just above the white arrowhead indicating the Y (Roll) axis. First, carefully connect the following pins between the RoboRio SPI Connector and the navX MXP SPI Connector: (Note: Don't connect the RoboRio SPI Connector's CS1, CS2, CS3, GND, 3.3V and 5.V pins) Look closely at the silkscreen on the navX MXP, and you'll see the pin names labelled directly underneath each of the SPI pins. Second, in your code, select the correct SPI port. In LabView, you'll need to modify the "navX Open.vi" and change the SPI Bus constant (this is an input parameter to the WPI Library SPI Open vi) to "SPI Onboard, CS0". By default, this constant is "SPI MXP". Last edited by slibert : 14-04-2015 at 02:15. |
|
#252
|
||||
|
||||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
Unfortunately, the examples fail to build in the 2016 control system betas. The compiler complains about: "invalid new expression of abstract class type 'AHRS'" and dies a horrible death. |
|
#253
|
|||
|
|||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Quote:
Work is underway to update the NavX-MXP C++ and Java libraries and sample code to work with the as-yet-unreleased 2016 WPI Libraries. A post on this forum will announce when that 2016 WPI Library-compatibility is available, and will occur sometime before kickoff. |
|
#254
|
||||
|
||||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
Thanks! We're looking forward to seeing the updates!
|
|
#255
|
||||
|
||||
|
Re: ANNOUNCING: navX MXP Robotics Navigation Sensor
If you need someone to help test the updates with the 2016 Beta libraries, we'd be happy to help.
Mike A. FRC #116 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|