Go to Post Engineering literature? Is that like jumbo shrimp, military intelligence, or legal brief? You know, an oxymoron? - Richard Wallace [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 01-20-2016, 12:17 PM
XaoS XaoS is offline
Registered User
FRC #4590
 
Join Date: Jan 2014
Location: Israel
Posts: 3
XaoS is an unknown quantity at this point
Question HITechnicCompass implementation

As part of our robot design for this season, we have decided to use a compass to orientate and get an absolute angle for the robot.

We have chose to use the HiTechnic Compass, as we figured (based on this article) that it is supported by WPILib - only to later discover that the relevant classes are not included in this year's WPILib C++ library.

How can we implement a similar classes and functionality into our project for this year? Is there any other way to use this compass in our code?

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-20-2016, 12:54 PM
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: HITechnicCompass implementation

The documentation you found was for the 2009-2014 control system, which had a NXT port on the digital sidecar, so you could directly plug the sensor into the control system. The new roboRIO does not have this port, which is why the class was removed.

On the other hand, it is still probably possible to make the sensor work, because digital NXT sensors use the standard I2C protocol, which is supported on the roboRIO. You would have splice your own connection into a NXT cable and port the driver from the old control system (probably not that difficult).

You may also want to consider using a different sensor than a compass to measure orientation because of interference from the magnets in the robot's motors. You will likely only be able to get an accurate orientation reading when no motors are running on the robot. IMO, a better option is an IMU such as the NavX MXP, or the ADIS16448 (still available in FIRST Choice). I have not yet used either of these, but I have heard a lot of praise for the NavX. The ADIS16448 is new, but it is likely also very good.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
Reply With Quote
  #3   Spotlight this post!  
Unread 02-17-2016, 05:17 PM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: HITechnicCompass implementation

Quote:
Originally Posted by lopsided98 View Post
The documentation you found was for the 2009-2014 control system, which had a NXT port on the digital sidecar, so you could directly plug the sensor into the control system. The new roboRIO does not have this port, which is why the class was removed.

On the other hand, it is still probably possible to make the sensor work, because digital NXT sensors use the standard I2C protocol, which is supported on the roboRIO. You would have splice your own connection into a NXT cable and port the driver from the old control system (probably not that difficult).

You may also want to consider using a different sensor than a compass to measure orientation because of interference from the magnets in the robot's motors. You will likely only be able to get an accurate orientation reading when no motors are running on the robot. IMO, a better option is an IMU such as the NavX MXP, or the ADIS16448 (still available in FIRST Choice). I have not yet used either of these, but I have heard a lot of praise for the NavX. The ADIS16448 is new, but it is likely also very good.
NavX MXP no longer functions with the roboRIO. My team purchased a couple to use this year, but the 2016 firmware for the roboRIO breaks it. We have contacted the creators to ask if they are planning on fixing this, but the understanding we have is that no, it will not be updated in the foreseeable future which means it can't really be used this year...
__________________
Isaac
Chief of Programming and Head of Autonomous Control
FRC Team 1410
Reply With Quote
  #4   Spotlight this post!  
Unread 02-17-2016, 07:13 PM
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 337
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: HITechnicCompass implementation

Quote:
Originally Posted by King Nerd III View Post
NavX MXP no longer functions with the roboRIO. My team purchased a couple to use this year, but the 2016 firmware for the roboRIO breaks it. We have contacted the creators to ask if they are planning on fixing this, but the understanding we have is that no, it will not be updated in the foreseeable future which means it can't really be used this year...
Please note: this statement is largely inaccurate.

The navX-MXP does work w/the RoboRIO. However, I believe what is being referred to here is that the USB interface between RoboRIO and navX-MXP is not working (it stopped working once the new 2016 RoboRIO firmware was released).

However, the navX-MXP has a total of four electrical interfaces: SPI, I2C, TTL UART as well as USB.

Therefore, the navX-MXP works very well with SPI, I2C and TTL UART w/the 2016 RoboRIO.

King Nerd III, please feel free to contact us directly at support@kauailabs.com and we'll help you get your boards working on one of these three other interfaces.
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 09:21 AM.

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