View unanswered posts | View active topics It is currently Wed Jul 08, 2020 11:21 am






Reply to topic  [ 4 posts ] 
Using gyro as a compass 
Author Message
Rookie

Joined: Fri Aug 07, 2015 11:02 am
Posts: 6
Post Using gyro as a compass
Hi!

I am working on a project with EV3 brick where my robot is randomly positioned in a sort of a labyrinth.
It would be extremely helpful to know in which direction the robot is facing. Therefore I was wondering whether it is possible to get/set a specific point of gyro sensor as a fixed zero point (as a compass which always shows north). ResetGyro function isn't appropriate since it sets the zero in the direction the robot is facing at the start of the program. I need something to preset the zero.
I was hoping SensorRaw would do the trick but I get the same values as using getGyroDegrees.
It would be great if I could use the gyro sensor as a real compass.


Fri Aug 07, 2015 11:32 am
Profile
Rookie

Joined: Fri Aug 07, 2015 11:02 am
Posts: 6
Post Re: Using gyro as a compass
Thank you for your answer. I will try to explain my problem in detail.
Let's say you are in a square room with 4 doors, one on each side of the room and they are facing N, E, S and W. All doors are the same and cannot be distinguished in any way.
You know you have to go let's say through the west door. But the problem is you find yourself in the room not knowing, which direction your are facing thus a compass would solve your problems.
It would be great if I could tell the robot where north is in advance.
I tried to calibrate the gyro facing north as zero, but as I start another program it seem to me that it automatically resets the gyro.


Sun Aug 09, 2015 5:39 am
Profile
Rookie

Joined: Wed Feb 24, 2010 11:51 pm
Posts: 31
Post Re: Using gyro as a compass
Sounds like you need to rethink the problem. Perhaps you're overconstraining yourself.

Why does magnetic north need to be North in your maze? What happens if the maze doesn't neatly align with magnetic north? What happens if the exit is not always South (or East or West or whatever)?

Would it be possible to simply assume that the direction you start in is North and map the maze relative to that reference?

Terry

_________________
Vex & FLL Coach and robotics instructor


Wed Sep 02, 2015 11:12 pm
Profile
Rookie

Joined: Fri Aug 07, 2015 11:02 am
Posts: 6
Post Re: Using gyro as a compass
Thank you for your contemplation but I believe you must have misunderstood me.

The core of the problem lies in not knowing in which direction the robot is facing] because it is randomly positioned in teh maze facing in any direction.
The example with the doors was meant just to elaborate what I am trying to achieve, namely to knowin which direction the robot is facing. A solution would be if one could use gyro as a real compass. I could take into account the alignment of the maze and offset the difference.

In the example with doors I would like to emphasize that you know through which door you must go in advance.

Quote:
Would it be possible to simply assume that the direction you start in is North and map the maze relative to that reference?


It would unfortunately not be possible because I am trying to do the exact opposite, map the maze by distinguishing each border, that is. (Door in the above illustrative example) .


Wed Sep 09, 2015 2:53 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 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.