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

Add a .ini option to skip the initial calibration and just use zero offset #67

Closed
traversaro opened this issue Apr 15, 2020 · 5 comments

Comments

@traversaro
Copy link
Member

traversaro commented Apr 15, 2020

Users of whole-body-dynamics tipically execute the resetOffset command at the beginning of the simulation, to set the offset of the FT sensors in the whole-body-dynamics to zero. This is both boring and error-prone, as any manual step it may be erroneously skipped. For this reason, it would make sense to have an option in the .ini configuration file of whole-body-dynamics to automatically skip the initial calibration in https://github.com/robotology/whole-body-estimators/blob/v0.2.1/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp#L1181, and instead use the zero offset (as done in https://github.com/robotology/whole-body-estimators/blob/v0.2.1/devices/wholeBodyDynamics/WholeBodyDynamicsDevice.cpp#L2122 ).

cc @GiulioRomualdi @Giulero @gabrielenava @HosameldinMohamed @prashanthr05

@traversaro traversaro changed the title Add an option to skip the initial calibration and just use zero offset Add a .ini option to skip the initial calibration and just use zero offset Apr 15, 2020
@traversaro
Copy link
Member Author

Clearly then it make sense to have this option enabled for all the "simulated" robots, or at least the one in which the simulated FT sensors do not have any offset to compensate. : )

@GiulioRomualdi
Copy link
Member

That's really cool! I remember when I was young and naive that I spent two hours before understanding that resetOffset was required

@prashanthr05
Copy link
Contributor

I have a question regarding this. I am trying to bypass the initial calibration with simulation by turning a flag on/off from the configuration file.

While doing this, I noted that there is a relevant flag validOffsetAvailable that needs to be activated for proper completion of the publishEstimatedQuantities() method in order to update the output ports. This flag is turned on by the method endCalibration()

which is in turn called by computeCalibration() method.

Does this computeCalibration() method have to be called every iteration ? As done in

or needs to be called only once?

Also. would it be fine to call endCalibration() at the point where I reset the offsets directly?

@traversaro
Copy link
Member Author

traversaro commented Jun 11, 2020

I have a question regarding this. I am trying to bypass the initial calibration with simulation by turning a flag on/off from the configuration file.

While doing this, I noted that there is a relevant flag validOffsetAvailable that needs to be activated for proper completion of the publishEstimatedQuantities() method in order to update the output ports. This flag is turned on by the method endCalibration()

That attribute can be directly set to true if the initial calibration is not done and zero offset are used instead.

Does this computeCalibration() method have to be called every iteration ? As done in

or needs to be called only once?

It needs to be called at avery run, but it does nothing if the calibration is not active:

if( calibrationBuffers.ongoingCalibration )
.

Also. would it be fine to call endCalibration() at the point where I reset the offsets directly?

I would simply create a method or set directly validOffsetAvailable to true, I don't think we need to set also all the other attributes modified by endCalibration(), and in general calling endCalibration if not calibration was performed would not be clear.

@prashanthr05
Copy link
Contributor

The initial calibration can be skipped in order to use zero offsets for FT sensors at startup by setting a flag startWithZeroFTSensorOffsets to true in the configuration file devices/wholeBodyDynamics/app/wholebodydynamics-icub-external-six-fts-sim.xml.

The PR #72 was merged. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants