I was going through the c++ hebi API here : https://files.hebi.us/docs/cpp/cpp-3.4. ... uator.html
and was wondering if it was possible to persist send (keep in the memory) desired gains through the API without using the scope.
This is supported in the underlying C API, but not the C++ one at the moment.
One big-picture thought here -- in our internal development, we have found that it can be dangerous to rely on the actuator always having the desired settings persisted when starting to control the program, in case other programs or users have accidentally changed the settings. This can significantly change the behavior of the robot in ways that are difficult to debug. So, in general, we encourage users not to rely on settings persisted on the actuators, and instead set these during program startup.
However, I understand there are definitely benefits to persisting the settings -- for example, if you take the above approach and send _and_ persist the settings during program startup, if can ensure that if the actuator is restarted during the running of the control application, the settings will not revert.
On to the technical solution!
This is a very quick addition to the C++ API. I'll try to get this implemented today, so we can get a nightly build up today, and then release a new version of the C++ API on Friday with a couple other changes.
Thanks for the feedback!
I understand and agree with your points, that helps a lot to have an expert opinion on this.
Looking forward to testing the new API
As I went to implement this, I realized I completed missed it earlier -- this is actually in the API already! This is in the Command::Settings message:
https://files.hebi.us/docs/cpp/cpp-3.4. ... tings.html
There is an example in the C++ examples repo demonstrating this for changing the name of a module and the saving the settings, but as the "persist settings" command applies to all active settings, this is the same for gains:
https://github.com/HebiRobotics/hebi-cp ... xample.cpp
Hope this helps, and let me know if you come across anything else to include in an upcoming release.