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

IMU Calibration Thingy #158

Merged
merged 3 commits into from
Apr 19, 2020
Merged

IMU Calibration Thingy #158

merged 3 commits into from
Apr 19, 2020

Conversation

Mitchlol
Copy link
Contributor

@Mitchlol Mitchlol commented Apr 19, 2020

Properly zeroing out an IMU is too hard to calculate for an average guy like me due to the sequential nature of rotation matrices. In addition accel/gyro offsets need to be recalculated for every change to the orientation. So I created a tool to do it for me (and everyone else too!)

Things to note:

  • Its ugly/in a weird place in the UI
  • Does this command need to be rewritten as an aync thing?
  • This doesn't do any accel offset calculation, I left all the fields there for the future, and a comment explaining why I didn't implement it.

@vedderb vedderb merged commit fe7ff8b into vedderb:dev_fw_5_00 Apr 19, 2020
@vedderb
Copy link
Owner

vedderb commented Apr 19, 2020

Nice, thanks! Just one note: When adding enums to COMM_PACKET_ID, always add them to the end. This way compatibility with old versions won't be broken.

@vedderb
Copy link
Owner

vedderb commented Apr 19, 2020

I see now that the datatypes in VESC Tool weren't updated, maybe it was confusing because of that. Never mind :-)

@Mitchlol
Copy link
Contributor Author

Yeah, i added it there first.

@vedderb
Copy link
Owner

vedderb commented Apr 19, 2020

Yes, about the async thing, this command probably should be async as it takes some time to complete. There you can do e.g. RT data streaming at the same time and see what is going on. I will make it async commit that.

@Mitchlol
Copy link
Contributor Author

Sweet something else i also thought of is the mobile app? Not sure how this will show up there.

Personally I manually calibrated my imu over a week ago and it still seems pretty dialed. But it would be nice to be able to do it on the go.

@vedderb
Copy link
Owner

vedderb commented Apr 19, 2020

It should be quite easy to add it to the mobile app. Have a look at ConfigPageApp.qml and PpmMap.qml. You would probably make something like PpmMap.qml and add it to ConfigPageApp.qml as a dialog that is opened from the menu. Uncomment CONFIG += build_mobile in vesc_tool.pro to build the Qml gui. If you are on linux you can connect over BLE just as you do on the phone and test it out.

@Mitchlol
Copy link
Contributor Author

Mitchlol commented Apr 19, 2020

I am on linux, ill give it a go.

I can wire up two of my janky testing vescs so one has bluetooth and one has imu, and then can bus over, so i don't need clear the settings on my running vehicle lol!

@vedderb
Copy link
Owner

vedderb commented Apr 19, 2020

You could just make a backup of the settings by saving the xml files

@vedderb
Copy link
Owner

vedderb commented Apr 19, 2020

Btw, it would be nice to have some tutorial on how to set up the balance app. There are quite a lot of settings. Would you be interested in writing a documentation page here? https://vesc-project.com/documentation

@Mitchlol
Copy link
Contributor Author

Sure, I recorded that first video a long time ago, and have been meaning to do an update for a while. But I was actually holding off till I had a better handle on the IMU stuff, as that is something that confuses the most users.

So yes, its what I was going to do next anyways. My plan was to make a series of short videos for each section, but I can do a text write up as well, perhaps combine the two. It would be great to have something on the official site, balance users are starting to pop up faster than i can keep track of them 😂

^^I'm concerned about how the xml will hold up to a newer beta build, i guess i could re-flash the old build and load the xml when I'm done. Maybe i will, because i think i need to make some cables for the other setup, i just don't like messing with working things as a side effect. Either way ill figure something out.

@vedderb
Copy link
Owner

vedderb commented Apr 19, 2020

A combination would probably be best. You don't need to write a lot, just listing all videos is also better than nothing. Do you have a user name on vesc-project.com? I can give your user permission to create and edit documentation pages.

@Mitchlol
Copy link
Contributor Author

NuRxG

@Mitchlol Mitchlol deleted the imu_wizard branch April 21, 2020 06:13
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