View unanswered posts | View active topics It is currently Fri Oct 24, 2014 3:48 am






Reply to topic  [ 4 posts ] 
Can we use the [compasssensor] this year? 
Author Message
Rookie

Joined: Tue Apr 30, 2013 5:53 pm
Posts: 6
Post Can we use the [compasssensor] this year?
There's an example program using it to get perfect turns to wherever you want, but I can't get it to run on the IntakeBot. Is there a way to define it as a sensor in the configuration section? How would I go about doing that?


Thu May 30, 2013 1:49 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post Re: Can we use the [compasssensor] this year?
Hi Ephemeral,
This year we've switched the robots from using compasses to using gyro sensors. You can use them in much the same way, but you can reset the gyro sensor like you can with encoders and they also give angle measurements in 1/10s of a degree instead of whole degrees, giving you more accuracy.

For an example of how to use a gyro to perform a precise turn, check out the gyroTurn() function in the "Intakebot - Score 1 Large Ball" example script that comes with Toss Up.

Cheers,
--Ryan

_________________
Ryan Cahoon
CMU Robotics Academy
RVW Software Developer

Robot Potato Head; Virtual NXT


Thu May 30, 2013 3:28 pm
Profile
Rookie

Joined: Tue Apr 30, 2013 5:53 pm
Posts: 6
Post Re: Can we use the [compasssensor] this year?
Alright. I was using the Gyroscope earlier, but I just hoped I could use the compass for a little bit more accuracy.


Thu May 30, 2013 3:44 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post Re: Can we use the [compasssensor] this year?
In the real world, gyroscopes suffer from accumulated error and so, if not well-calibrated or over long periods of time, may become less accurate than a magnetometer (although magnetometers have their own share of failures). The virtual gyroscope, however, should not suffer from these problems (behind the scenes, it reads the same measurement of robot heading as the simulated compass sensor uses).

Best,
--Ryan

_________________
Ryan Cahoon
CMU Robotics Academy
RVW Software Developer

Robot Potato Head; Virtual NXT


Thu May 30, 2013 4:23 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:  
cron



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