View unanswered posts | View active topics It is currently Fri Oct 31, 2014 6:59 pm






Reply to topic  [ 15 posts ] 
HiTechnic Compass Calibration 
Author Message
Rookie
User avatar

Joined: Sun Jun 17, 2012 11:18 am
Posts: 26
Post HiTechnic Compass Calibration
I have trouble working with the HT compass sensor. I already use Xander's calibration code to calibrate it. But still it gives biased readings. Then I write a few testing programs and find that: in the relative mode, the negative 180 degrees (0~-180) covers more than a half circle than the positive degrees, i.e. some degrees are distributed more intensively. Does anyone have ideas about the possible causes?


Sat Oct 13, 2012 1:31 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: HiTechnic Compass Calibration
Are there any magnetic fields in the area? Speakers, other electronic equipment, reinforced concrete, etc?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Oct 13, 2012 1:34 pm
Profile WWW
Rookie
User avatar

Joined: Sun Jun 17, 2012 11:18 am
Posts: 26
Post Re: HiTechnic Compass Calibration
There are some ordinary devices in the room, like laptops and mobile phones. I tried not to place my robot next to them. Do they make great disturbance? Sometimes the reading varies up to 10 degrees if I displace it for only 10 cm or so.


Sat Oct 13, 2012 1:51 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: HiTechnic Compass Calibration
Yeah, some of them can make quite a difference. Does this also happen when you calibrate in the same spot as where you calibrate?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Oct 13, 2012 1:58 pm
Profile WWW
Rookie
User avatar

Joined: Sun Jun 17, 2012 11:18 am
Posts: 26
Post Re: HiTechnic Compass Calibration
yep, I do all my work at the same place. Is there any tips for the calibration? say, if i run the calibration for longer time, will it be better?

Although reading errors are predictable, the current inaccuracy seems unexpected. I was doubting if I did sth wrong.


Sat Oct 13, 2012 2:07 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: HiTechnic Compass Calibration
No, running it for longer won't make a difference. The robot is turning about 540 degrees (or however much it says in the program, I forget)?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Oct 13, 2012 2:15 pm
Profile WWW
Rookie
User avatar

Joined: Sun Jun 17, 2012 11:18 am
Posts: 26
Post Re: HiTechnic Compass Calibration
Actually I use a different design from the standard TriBot mentioned in your code. But I follow the two requirements: the robot should rotate no faster than 360 degree/20s and totally have rotated more than 360 degrees. I don't quite understand its principles of calibration.


Sat Oct 13, 2012 2:36 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: HiTechnic Compass Calibration
Well, I don't know how it works exactly with the HT one, but with the Dexter Industries one, my driver does all the calibration work. What it does, it tries to get the minimum and maximum field values as it rotates and get an average. This allows it to calculate the amount of magnetic field disturbance. The calibration value is subtracted from the magnetic field strengths before the heading is calculated. I can only assume the HT sensor does something similar.
I would suggest turning the robot about 540 degrees, or so.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Oct 13, 2012 2:51 pm
Profile WWW
Rookie
User avatar

Joined: Sun Jun 17, 2012 11:18 am
Posts: 26
Post Re: HiTechnic Compass Calibration
Do you think the Dexter one behaves better than HT one?


Sun Oct 14, 2012 7:40 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: HiTechnic Compass Calibration
If it's an external influence, I am not sure it would, tbh. Can you replicate this issue in NXT-G?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sun Oct 14, 2012 7:44 am
Profile WWW
Rookie
User avatar

Joined: Sun Jun 17, 2012 11:18 am
Posts: 26
Post Re: HiTechnic Compass Calibration
Let me try it in a few days~


Sun Oct 14, 2012 7:51 am
Profile
Expert

Joined: Sun Aug 19, 2007 2:43 pm
Posts: 138
Location: New Jersey
Post Re: HiTechnic Compass Calibration
yike... the hitechnic compass does not seem to do tilt compensation!? I assumed it did as a compass will not be much useful without tilt compensation. It looks like one will have to get an accel sensor to work with this hitechnic compass to make it really any close to be reliable for a robot to use.

Well, for academic purpose, it is cool to do it yourself; but .... :-(

So, If I want to stay with completely NXT devices, I guess I'll look at the one from mindsenosrs.com instead - AbsoluteIMU http://www.mindsensors.com/index.php?mo ... tion=30:30

Well, $50 for the tilt compensated compass is not bad at all... considering it will cost me over $30 to implement a more generic solution (my center's development head proved it works):
- LSM303DLHC 3D Compass and Accelerometer Carrier, http://www.pololu.com/catalog/product/2124...
- a very nice small Breadboard connector from mindsensors: http://www.mindsensors.com/index.php?mo ... AGE_id=148
- or strip one end of the cable hooking onto a tiny breadboard I want to get cheap on the cost.

Thought!?


Thu Jan 24, 2013 10:34 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: HiTechnic Compass Calibration
No, the HT compass has no 3D accelerometer inside. So you need to make sure it's mounted horizontally, as indicated on the product page :)
Quote:
The HiTechnic compass sensor will only operate correctly in a horizontal plane so you must keep the compass level for it to read correctly. This is very important so remember this when you build it into your robot.

You also cannot access the raw field data, as far as I am aware of, so combining a HT compass with an accelerometer, will not help you compensate, you'll need all 3 field strengths.

If you have the math to make it work with the Mindsensors one, I'll be happy to include it in my Suite and make it available to everyone.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Jan 24, 2013 11:06 am
Profile WWW
Expert

Joined: Sun Aug 19, 2007 2:43 pm
Posts: 138
Location: New Jersey
Post Re: HiTechnic Compass Calibration
mightor wrote:
The HiTechnic compass sensor will only operate correctly in a horizontal plane so you must keep the compass level for it to read correctly. This is very important so remember this when you build it into your robot.


Yea... it is my fault. I just assumed it did without reading it carefully. Well, bummer. :-[

mightor wrote:
If you have the math to make it work with the Mindsensors one, I'll be happy to include it in my Suite and make it available to everyone.
= Xander


According to the developer at Mindsensors, the tilt compensation is also built-in. Well, I'll test it when i get one.


Thu Jan 24, 2013 4:43 pm
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3240
Location: Rotterdam, The Netherlands
Post Re: HiTechnic Compass Calibration
I had no idea, you learn something new every day :)

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Jan 24, 2013 4:50 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 15 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.