-
Notifications
You must be signed in to change notification settings - Fork 15
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 the possibility to run the SkinRetargeting NN online #113
base: master
Are you sure you want to change the base?
Conversation
- This is required by frugally-deep
…kin.cpp Co-authored-by: Stefano Dafarra <[email protected]>
d4466b0
to
75d2f6d
Compare
@@ -127,7 +152,7 @@ axesJointsCoupled 1 | |||
|
|||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RiccardoGrieco @lrapetti do you remember why this modification was necessary?
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.
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?)
@@ -123,7 +145,7 @@ analog_sensors_raw_max_boundary ( 25.0 0.0 37.0 15.0 24.0 12.0 0.0 | |||
# in case each joint does not have independant motor to actuate, they are coupled | |||
axesJointsCoupled 1 | |||
|
|||
doCalibration 1 | |||
doCalibration 0 |
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.
Same here
@@ -0,0 +1,190 @@ | |||
############### |
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.
This file should be removed
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.
Ops, that's my fault. Emacs file 😭
@@ -37,6 +37,8 @@ Eigen::Map<Eigen::VectorXd> toEigenVector(std::vector<double>& vec); | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -334,6 +334,7 @@ bool GloveWearableImpl::getFingertipPoseValues(Eigen::MatrixXd& values) | |||
|
|||
bool GloveWearableImpl::setFingertipForceFeedbackValues(const std::vector<int>& values) | |||
{ | |||
return true; |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -362,6 +363,7 @@ bool GloveWearableImpl::setFingertipForceFeedbackValues(const std::vector<int>& | |||
|
|||
bool GloveWearableImpl::setFingertipVibrotactileValues(const std::vector<int>& values) | |||
{ | |||
return true; |
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.
Same as above
wearableActuatorCommand.info.type = wearable::msg::ActuatorType::HAPTIC; | ||
wearableActuatorCommand.duration = 0; | ||
|
||
m_iWearActuatorPort.write(false); | ||
m_iWearActuatorPort.write(true); |
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.
m_iWearActuatorPort.write(true); | |
m_iWearActuatorPort.write(true); //USING FORCE_STRICT |
|
||
if (!m_doCalibration) | ||
if (false && !m_doCalibration) |
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.
Why is the false
needed? @RiccardoGrieco @lrapetti do you remember why it was introduced?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
json
file and is loaded usingfrugally-deep
. Sincefrugally-deep
is 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