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

Restart IMU initialization for a maximum of 5 times #90

Merged
merged 5 commits into from
Aug 23, 2023

Conversation

supertom01
Copy link
Member

Quite often people move the robot on accident when they turn it on. This causes the initialization of the IMU to fail. In order to somewhat mitigate this, the initialization is attempted for 5 times.

If the robot cannot initialize the IMU within these 5 attempts, the robot will remain in halt mode, just as the current implementation.

@supertom01
Copy link
Member Author

I assume that this code should work, but I want to test this on a robot first

@supertom01
Copy link
Member Author

Ready to be merged.

In order to make this feature work properly, we have to wait for the MTi to update its status word. This is normally an asynchronous process that happens on the MTi itself. However, since we want to make sure that the calibration has succeeded, we wait in the init loop. As a consequence, the boot time of the robots are delayed. But in theory this should not matter too much, since they always halt anyhow if the IMU is not yet calibrated.

@supertom01 supertom01 marked this pull request as ready for review August 18, 2023 13:08
Copy link
Member

@emielsteerneman emielsteerneman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but requested changes

Core/Src/robot.c Outdated Show resolved Hide resolved
@supertom01 supertom01 merged commit fc08aa7 into development Aug 23, 2023
1 check passed
@supertom01 supertom01 deleted the feature/reinit-mti branch August 23, 2023 16:28
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

Successfully merging this pull request may close these issues.

2 participants