Add the possibility to run the SkinRetargeting NN online#113
Add the possibility to run the SkinRetargeting NN online#113GiulioRomualdi wants to merge 21 commits intomasterfrom
Conversation
- This is required by frugally-deep
…kin.cpp Co-authored-by: Stefano Dafarra <[email protected]>
d4466b0 to
75d2f6d
Compare
| # in case a calibration phase necessary before starting teleoperating the robot, | ||
| # otherwise read the calibration matrix from the config file | ||
| doCalibration 1 | ||
| doCalibration 0 |
There was a problem hiding this comment.
@RiccardoGrieco @lrapetti do you remember why this modification was necessary?
There was a problem hiding this comment.
As far as I remember this should be a last-minute modification when we tried to remove the haptic force feedback. I would probably discard this change. (this code is not the one that is currently used in the robot right?)
| axesJointsCoupled 1 | ||
|
|
||
| doCalibration 1 | ||
| doCalibration 0 |
| @@ -0,0 +1,190 @@ | |||
| ############### | |||
There was a problem hiding this comment.
This file should be removed
There was a problem hiding this comment.
Ops, that's my fault. Emacs file 😭
|
|
||
| Eigen::Map<Eigen::VectorXd> toEigenVector(yarp::sig::Vector& vec); | ||
|
|
||
| Eigen::Map<const Eigen::VectorXd> toEigenVector(const yarp::sig::Vector& vec); |
There was a problem hiding this comment.
Interestingly, this conversion should be there also in yarp: https://yarp.it/git-master/namespaceyarp_1_1eigen.html#aa4598147bb94b1a7d4e5c336a9351f9b
Not sure when it has been introduced
|
|
||
| bool GloveWearableImpl::setFingertipForceFeedbackValues(const std::vector<int>& values) | ||
| { | ||
| return true; |
There was a problem hiding this comment.
Can we use a parameter instead of exiting prematurely? @RiccardoGrieco @lrapetti do you remember why this was needed?
There was a problem hiding this comment.
We used this premature return as an easy fix for not actuating the fingertip since (as far as I remember) we decided to use only the palm vibration in the end.
Of course using a parameter would be the proper thing to do. Probably we went for this "solution" due to time constraints.
|
|
||
| bool GloveWearableImpl::setFingertipVibrotactileValues(const std::vector<int>& values) | ||
| { | ||
| return true; |
| wearableActuatorCommand.duration = 0; | ||
|
|
||
| m_iWearActuatorPort.write(false); | ||
| m_iWearActuatorPort.write(true); |
There was a problem hiding this comment.
| m_iWearActuatorPort.write(true); | |
| m_iWearActuatorPort.write(true); //USING FORCE_STRICT |
| m_Bias = Eigen::MatrixXd::Zero(m_numActuatedJoints, 1); | ||
|
|
||
| if (!m_doCalibration) | ||
| if (false && !m_doCalibration) |
There was a problem hiding this comment.
Why is the false needed? @RiccardoGrieco @lrapetti do you remember why it was introduced?
There was a problem hiding this comment.
I guess it is the same reason as #113 (comment).
| FetchContent_Declare( | ||
| frugally_deep | ||
| GIT_REPOSITORY https://github.com/Dobiasd/frugally-deep.git | ||
| GIT_TAG master |
There was a problem hiding this comment.
home/gromualdi/robot-code/robotology-superbuild/build/src/walking-teleoperation/_deps/frugally_deep-src/include/fdeep/convolution3d.hpp:35:11: error: ‘shape3’ does not name a type; did you mean ‘shape2’?
35 | const shape3& filter_shape,
| ^~~~~~
| shape2
/home/gromualdi/robot-code/robotology-superbuild/build/src/walking-teleoperation/_deps/frugally_deep-src/include/fdeep/convolution3d.hpp:36:11: error: ‘shape3’ does not name a type; did you mean ‘shape2’?
36 | const shape3& strides,
| ^~~~~~
| shape2
/home/gromualdi/robot-code/robotology-superbuild/build/src/walking-teleoperation/_deps/frugally_deep-src/include/fdeep/convolution3d.hpp:37:5: error: ‘padding’ has not been declared
37 | padding pad_type,
| ^~~~~~~
- 🔴 Dobiasd/frugally-deep@b776285 is the first not working commit (associated PR Add support for 3D-pooling layers, remove partial legacy support for channels_first in pooling layers Dobiasd/frugally-deep#375)
- 🟢 is the latest working commit Dobiasd/frugally-deep@cfad37c
We should set the commit here
| GIT_TAG master | |
| GIT_TAG cfad37ca2134ab465972311f30fd9d2c583c661e |
As explained in #114, this PR implements a CNN to classify the roughness of an object using the readouts of the skin on the robot palm. The neural network is loaded in a
jsonfile and is loaded usingfrugally-deep. Sincefrugally-deepis a header-only library I decided to automatically clone it with fetch content. The CNN takes as input the calibrated skin data (provided by theskinmanager) and treat it as a grayscale image.The code used to generate the model can be found at paolo-viceconte/rock_classifier@381fcf4 (@paolo-viceconte)
Moreover, this PR removes the fingertip actuation (@RiccardoGrieco) in 63aff82