Absolute IMU compass, gyro and accelerometer
 Software and Programming Related   Started by Demarcoo S   2015-09-11 11:47:54 -04:00   Comments: 13    Viewed: 1794

  1. Demarcoo S
    Demarcoo S Member

    Postby demarco » Sat Nov 24, 2012 2:11 pm

    I just bought the absolute IMU and i guess its kind of a new sensor right ? I cant find a discussion , a topic or any experience on the net in a way i could learn more . I really want o try it with a segway, but since im new to robotics im just trying to program with the compass, to learn more about the axis programing.
    If anyone could help me , first question is : i made the segway robot, installed extra weels so it could be upright by itself (no gyro for now), installed the sensor on port 1 and want to make a program for the robot to go along a square pathway. For that i made a loop and defined a numerical variable called OBJECTIVE that marks the final degree (starts as 90 degrees). Theres a switch that turns the robot in 1 degree steps for one way or the other if the current orientation is more or less than the OBJECTIVE value. Once it reaches the OBJECTIVE value, it walks for 2 seconds and the OBJECTIVE value is increased 90 degrees, unless its biger than 359, when its attributed the value zero.
    The problem is i am not sure wich value should i be reading on the sensor ? its magnetic field ? its orientation ? I have put the value on the display and it does not goes from 0 to 360. It gets negative too (like -240) ? Please help, i tryied the documentation but found it very poor. Im clueless
    Demarcoo S, 2015-09-11 11:47:54 -04:00
  2. Mindsensors Support
    Mindsensors Support Member Richmond
    Postby support » Sat Nov 24, 2012 6:40 pm
    You should read Gyro values, (there are three of them, x, y, z), choose the appropriate axis based on how you mounted the Gyro.
    The values could print negative if the variable data type is signed byte (or short) such variables will roll-over when
    the value reached 255 (and shows as negative 1).
    What is the data type of your variable OBJECTIVE? (use int).
    Also, which programming environment are you using? NXC/RobotC?
    Take a look at Laurens Valk's site http://robotsquare.com for guidance on developing Segway program.
    Mindsensors Support, 2015-09-11 11:49:01 -04:00
  3. Mindsensors Support
    Mindsensors Support Member Richmond

    Postby demarco » Wed Aug 14, 2013 3:11 pm

    Hi again. And how about drivers for Robot C. Can i use the 3 sensors (gyro, acc and compass) in RobotC or only NXTG and NXC ?
    Mindsensors Support, 2015-09-11 11:49:23 -04:00
  4. Mindsensors Support
    Mindsensors Support Member Richmond
    Mindsensors Support, 2015-09-11 11:50:12 -04:00
  5. Mirecc S
    Mirecc S Member

    Postby MirecXP » Sat Feb 01, 2014 12:58 pm

    Hello, i just bought AbsoluteIMU-ACG sensor and I would like to use it with EV3.

    Could someone guide me, please, how to implement a simple program which will control the rotation of the robot in 90 degrees?

    I have tried to integrate the gyro values of one axis, but it doesn't give me expected results.
    What is also strange, that the reading of sensor value results in the error quite often and after some time it just stops reading, program must be restarted or the sensor must be reconnected to make it work again...
    I have not tried to calibrate the sensor as the manual says it is not necessary.
    Mirecc S, 2015-09-11 11:53:03 -04:00
  6. Mindsensors Support
    Mindsensors Support Member Richmond
    Postby support » Sat Feb 01, 2014 2:51 pm
     
    f you just need to know turn in 90 degrees, it might be easier to read the compass values, and decide based on that.
     
    Sometimes EV3 firmware has data errors, it is likely that you are encountering such data error.
    To reduce the errors, add a small delay in your program loop, so that EV3 gets a breather between your read requests.
    The programming block has a plug indicating data error, you should look at that value and based on that decide what to do.
    Alternately, consider using LeJOS firmware (it has better implementation for i2c sensors).
    http://www.lejos.org/ev3.php
    http://www.lejos.org/ev3/docs/lejos/har ... teIMU.html
    Mindsensors Support, 2015-09-11 11:56:29 -04:00
  7. Demarcoo S
    Demarcoo S Member

    Postby demarco » Wed Sep 10, 2014 3:05 pm

    So many time and i still cant use the sensor properly.
    Please, answer me :
    1 - what is the 1st "plug" on the NXT-G block - operation - . Whats the use for that ?
    2 - is any of those reading supposed to go between 0 and 359 (compass degrees) ? I made the reading for x gyro as you suggested but thats realy for the Gyro as i would expect, and not for direction , right ?
    As anyone can imagine, the compass should be the easyiest data to be used there because accelerometer and gyro , and even magnetic field should be more complex information to use in any program. In compass, i could work on directions for the robot, but i cant implement that since when i read the Heading value (the second "plug" on the NXTG-block) it shows like 140 north, 150 east , 160 south and than 150 west again. And i tried every possible orientation on the sensor, fixing it to the robot. so in others it could show like 130 -> 220 -> 330 and in the other direction 140 (???).
    Please , help.
    What am i doing wrong ?
    Demarcoo S, 2015-09-11 12:08:05 -04:00
  8. Demarcoo S
    Demarcoo S Member

    Postby demarco » Wed Sep 10, 2014 5:22 pm

    I just tried something new. I made a automatic calibration routine, to check if my proximity to the equipment would be resulting the bad readings.
    So i used the calib example and implemented it to ask for X, than Y and than Z, and each time you have to press enter. when you press the robot would spin clockwise and than counter-clockwise , not too fast, and stop so you could rearange the compass in the other axis and press enter for the next one, until X, Y and Z are done.
    After that i started a simple program that reads the compass heading and display on the screen, using the sensor itself fixed in the robot in the horizontal orientation (paralel to the floor). The radings were surprisingly good from 10 to 320 and than it jumped to 460 and in 10 more degrees 910 (??) what is that ?
    Demarcoo S, 2015-09-11 12:08:26 -04:00
  9. Mindsensors Support
    Mindsensors Support Member Richmond
    Mindsensors Support, 2015-09-11 12:08:39 -04:00
  10. Swelll S
    Swelll S Member

    Postby swell » Mon Sep 15, 2014 7:56 am

    Hello, I have an issue with using the EV3 experience mode with the absolute IMU-ACG sensor. Everytime I choose this block in the experience mode, an error message occurs and make me restart the software. Image[img]/Users/sebastienweil/Desktop/Capture%20d’écran%202014-07-24%20à%2011.10.59.png[/img]
    Does anyone have this issue ?
    Is it a driver problem ?
    If so, do you know where I can get those drivers ?

    Thanks in advance, best regards.
    Swelll S, 2015-09-11 12:20:59 -04:00
  11. Mindsensors Support
    Mindsensors Support Member Richmond

    Postby micgil2293 » Mon Sep 15, 2014 8:52 am

    mindsensors.com blocks do not support experiment mode. If you need to log the data you build your program as a porject and use the blocks in the advanced palette to write the data to a file.
    Mindsensors Support, 2015-09-11 12:25:29 -04:00
  12. Swelll S
    Swelll S Member

    Postby swell » Mon Sep 15, 2014 9:51 am

    thank you for the quick answer :)

    I'll try this way, thanks again.
    Swelll S, 2015-09-11 12:25:45 -04:00
  13. Kiteflierr S
    Kiteflierr S Member

    Postby kiteflier » Thu Jan 15, 2015 12:06 pm

    I'm new to the idea of inertial navigation, but am hoping that the IMU will do the trick for my kids. I'm helping them on various robot games and would like to have the robot perform better navigation, using straighter lines, more accurate turns, etc, by using sensors. We've been using the EV3 gyro sensor in a proportional mode feedback to attempt to drive straight, but the sensor has some slight drift and is not terribly accurate.

    The absolute IMU boasts a more accurate angle. However, the gyro output is a rate. Converting from rate to angle, and tracking angle vs. time, may prove difficult for the kids. Is there an easier way or am I just missing the obvious. Is the compass sensor a more reliable method of tracking angle compared to the gyro rate integrated?

    Thanks!
    Kiteflierr S, 2015-09-11 12:30:04 -04:00
  14. (You must log in or sign up to post here)

Log in | Sign up
Tems & Conditions!
Help!