Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initializing GyroSensor after each start of an app #11

Open
peehrlich2 opened this issue Feb 7, 2020 · 2 comments
Open

Initializing GyroSensor after each start of an app #11

peehrlich2 opened this issue Feb 7, 2020 · 2 comments

Comments

@peehrlich2
Copy link

As I noticed, the gyro sensor is initialized shortly (1-2 seconds) after starting an app. That means, that the Robot has to stand absolutely still a few seconds after each start of an app - otherwise there is the feared GyroDrift.
If you go to a competition it would be very helpfull, when the GyroSensor is automatically initialized once when ev3rt is booting. Perhaps the Sensor Configuration can be arranged in rc.conf.ini?

@JakubVanek
Copy link
Contributor

JakubVanek commented Feb 15, 2020

Well, it depends. In Robosoutěž (a robots competition taking place at CTU FEE in Prague, Czechia), each team has got one minute of preparation time specifically for sensor calibration before the start of each round. So I got used to having a calibration step in the program startup procedure that asks the user to put the robot on the start tile, confirm it on the brick and then let it rest for a second.

You can trigger a manual recalibration of the sensor by running ev3_gyro_sensor_get_rate() and ev3_gyro_sensor_get_angle() after one another.

An alternative might be to use only the rate of rotation from the gyro and do the calibration and integration in software. That could allow one to implement better or continuous calibration without delays; however I have no experience with it. Something like leJOS' LinearCalibrationFilter or GyroDirectionFinder could serve as a base.

@JakubVanek
Copy link
Contributor

JakubVanek commented Feb 20, 2020

I'd also recommend calling a to-be-used value read function for each sensor at the beginning of each program - that will pre-configure the sensor into the correct mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants