-
Notifications
You must be signed in to change notification settings - Fork 12
Impedance control ex #86
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
Conversation
Added wraparound note to all impedance controller examples Fixed alignment of gimbal instructions
Damping examples is mostly complete, floor needs serious reworking
|
Should I remove/rename T-arm's HRDF and gains file? This is not a standard model given on the website. |
- examples renamed to match python - hebi_util added for easier mobile_io creation from config file, and testing features that might be rolled in - cartesian impedance example fully integrated with config files - minor doc fixes
Refactored hebi_util to use the updated for of user_data
|
Ready for review again! |
|
Would really like your opinion on whether the connection checking loop should be in the script, or should be incorporated in the |
|
FYI:
|
| auto last_mobile_state = mobile_io->update(); | ||
|
|
||
| ////////////////////////// | ||
| //// Main Control Loop /// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh -- before the changes, we were at line 86 at this point. Code length isn't the most important metric, but if done well (and still appropriately commented) shorter code can improve readability. I had expected the examples to get a bit shorter by using the layout and config files, so I was a little surprised.
I think a bit of this is just slightly different style, and some is a printing out more error info when loading configs, but I'm curious whether you see anything I'm missing, or if you have ideas to improve this. I'd love to eventually get these 110 lines down to something simple and relatively self-documenting like the following, but in the meantime I wonder if we could maintain the readability, but shorten some of the boilerplate?
auto config = Config::create('file', ErrorMode=PrintAll);
if (!config)
return 1;
auto arm = Arm::createWithRetries(config);
auto mobile_io = MobileIO::createWithRetries(config);
if (!arm || !mobile_io)
return 1;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! A few suggestions on one file that I think could apply through the examples.
Overall, I know it isn't always possible/easy with changes such as these, but these type of changes can be more difficult to review when the result is essentially 11 new example files and 3 deleted files. If possible to add more incremental/single purpose changes in the future, that'd be awesome and quick to get in. For example (this is a bit overkill, but that's ok)
PR 1: rename files (check! insta-approval-merge! Plus, makes future diffs easier, because the git diff engine isn't looking to determine if the two AR kit examples should be diffed or treated independently)
PR 2: add the config files and remove old HRDF files (another super quick approval/merge -- although may require some unfortunate temporary changes to the example files)
PR 3: Replace arm creation with the "createFromConfig" function in all the examples
PR 4: Add the "createMobileIOFromConfig" helper function, and replace mobile IO creation with this in all the examples
PR 5: Add new examples
PR 6: Various example cleanup/editing
More work overall to open the PRs, but breaks down the review incrementally, and allows stuff to (a) start getting in before everything is perfect, and (b) ends up with a more careful/detailed review (it's easier to make sure nothing accidentally gets through when you're looking at a diff changing the arm construction, rather than a completely new example file)
Ah -- sorry I didn't respond to this sooner! Yeah, I think a simple util wrapper with a |
Yeah, I am OK with removing the redundant instructions for those examples that use mobile IO! |
tested out additional imrpovements in cartesian example
fixed teach repeat bug
|
Ready for review again! |
|
One last dance |
(Taken from #86 by @GogiPuttar)
|
Closing, as the content here has been separated into and merged in several other PRs, and the remainder is currently in #101 |
Added 5 impedance control examples, namely: