-
Notifications
You must be signed in to change notification settings - Fork 11
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
Easy way to set the outputs #4
Comments
Sure. The general design goal for this library is compatibility across the range of hardware - the specific implementation might look a bit different from your example snippets so I can't promise you the API surface will look the same... Are you able to produce some packet captures for your MTi-7 for when you configure this, it'll help me write/check test coverage beyond the model I've got on hand.
I'll look at integrating 'general configuration' functionality over the next few days if that's OK? It's a little bit of work to get my spare mti-300 on the bench, add other kinds of configuration fields, etc... |
Cool, Yes I can do packet capture, actually I had do very basic packet capture to create the example provided above. I can also add another arduino/teensy between the sensor and the host to capture the packets without having to modify the code on the host to capture packets. Saving it on a text file with the HEX format is well at my level. I'm unsure about the two other formats. My exemple code doesn't include any check on the ack sent back by the MTi sensor. I guess the most important thing to check is that the sensor didn't respond with an error code. An error code that would respond to an invalid configuration request. At this point after a few days of thinking about it I'm unsure how we should handle this in the configuration. The main challenge is that not all settings are available for all sensor models. So a clean implementation would require a library of all available settings for each sensor model, and the user would have to set the sensor model at some point. This is adding a lot of complexity on what was initially just a driver/parser for the multi-platorm low level communication protocol from Xsens. Maybe this configuration tool should be on another (higher) layer level than your current library. Let me know what you think about it. |
I don't see the implementation and approach for this kind of behaviour as an issue, but a chunk of it will be handled by the end-user of the library. This is less about what configurations are valid for a specific model - adding compile-time compatibility tables can solve it reasonably cleanly (but adds some long-term maintenance overhead as new models are added), but because I aim to keep the library free of internal queues and automatic response catch behaviours for portability reasons. I should have time to get a first-pass implementation ready this weekend, and I'll see how much scope creep comes out of that... On a higher-level note: does your system design need dynamic configuration or is this a nice-to-have during development? On my platforms it's been a one-time configuration with MTManager and then I've not had to touch the sensor/interaction code since. |
I see a few different points:
|
Ability to send a list of XDI identifiers with frequency in Hz to the IMU, with configurable precision and co-ordinate reference values if applicable. Adds missing MT_SETOUTPUTCONFIGURUATION enum value. Includes basic test coverage. Implementation as part of #4.
Untested arduino sketch with statemachine to periodically request new output configuration settings. Part of #4.
@YohanHadji if you've got a spare minute I'd appreciate your thoughts on https://github.com/Scottapotamas/xsens-mti/tree/config. The Arduino example |
@Scottapotamas Thanks a lot for the implementation, I have been busy working on other hardware last week and will also be next week but I'll try to take a look at the code and test it. |
Ability to send a list of XDI identifiers with frequency in Hz to the IMU, with configurable precision and co-ordinate reference values if applicable. Adds missing MT_SETOUTPUTCONFIGURUATION enum value. Includes basic test coverage. Implementation as part of #4.
Untested arduino sketch with statemachine to periodically request new output configuration settings. Part of #4.
I would love an easy way to set the desired outputs of the sensor. Choose which data we want to get and the main update rate.
This can be done using Xsens SetOutputConfiguration message.
Here is my suggestion, this has been tested successfully with an MTi-7
In
xsens_constants.h
and
(The diff is the last line)
In
xsens_mti.h
In
xsens_mti.c
In
main.c
When needed :
Let me know if I can help getting this cleanly integrated.
The text was updated successfully, but these errors were encountered: