How does DriveBase work without a hub object? #1262
Replies: 1 comment
-
|
That’s a great question. You’re right, they’re essentially linked behind the scenes right now. To be more generic and more “correct”, instead of saying use_gyro=True, we could allow or require specifying use_gyro=hub.imu.heading or some equivalent callable that acts as a source for heading info. That way, you could use an external compass, for example. I think there’s probably some work to be done on the gyro, including 3D attitude estimation. For now we’ve decided to prioritize the most popular use case, which is 1D heading with the builtin gyro. The main thing for now is that we design it such that we don’t cause ourselves any problems later. If we can generalize it without breaking the API, we should be OK. The use_gyro option above should allow further generalization as above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Spike Prime user here. I find it interesting that the DriveBase doesn't need a hub as a parameter. I would think that the hub would be needed to have access to the gyro, or at the very least to understand the hub orientation which is passed into the hub object. Don't get me wrong, our DriveBase works and I am not reporting a problem at all. I'm just wondering how the DriveBase works.
If for some reason it turns out that the gyro is always available, and doesn't need a hub object to use it, then I would wonder why the buttons and display need to be associated with the hub object.
Beta Was this translation helpful? Give feedback.
All reactions