Skip to content

Commit

Permalink
Merge pull request #100 from robotology/texture_retargeting_pr_devel_…
Browse files Browse the repository at this point in the history
…patience

Texture retargeting
  • Loading branch information
S-Dafarra authored Jun 9, 2022
2 parents 28c685a + 2fa7476 commit 4f9db93
Show file tree
Hide file tree
Showing 38 changed files with 2,091 additions and 141 deletions.
5 changes: 5 additions & 0 deletions app/robots/iCubErzelli02/hapticGloveConfig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ getHumanMotionRange 1
steadyStateCounterThreshold 5
# the threshold to check the error between the desired and feedback values for the steady state check [rad]
steadyStateThreshold 0.05
# threshold in which an skin data is considered updated [no units]
tactileWorkingThreshold 0.0001
# threshold in which an skin data is considered updated [no units]
tactileUpdateThreshold 0.0001


# include fingers parameters
[include LEFT_FINGERS_RETARGETING "leftFingersHapticRetargetingParams.ini"]
Expand Down
8 changes: 8 additions & 0 deletions app/robots/iCubGazeboV2_5/hapticGloveConfig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ useLeftHand 1
useRightHand 1
smoothingTime 0.25
isMandatory 0
useSkin 0
#calibrationTimePeriod [sec]
calibrationTimePeriod 2.0
#robotInitializationTime [sec]
Expand All @@ -19,6 +20,13 @@ getHumanMotionRange 1
steadyStateCounterThreshold 5
# the threshold to check the error between the desired and feedback values for the steady state check [rad]
steadyStateThreshold 0.05
# the time teleoperation should wait before running [sec]
waitingDurationTime 5.0
# threshold in which an skin is considered as working fine [no units]
tactileWorkingThreshold 0.0001
# threshold in which an skin data is considered updated [no units]
tactileUpdateThreshold 0.0001


# include fingers parameters
[include LEFT_FINGERS_RETARGETING "leftFingersHapticRetargetingParams.ini"]
Expand Down
10 changes: 10 additions & 0 deletions app/robots/iCubGazeboV2_5/leftFingersHapticRetargetingParams.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ joint_list ( "l_thumb_oppose", "l_thumb_proximal", "l_thum
"l_ring_abduction", "l_ring_proximal", "l_ring_middle", "l_ring_distal",
"l_pinky_abduction", "l_pinky_proximal", "l_pinky_middle", "l_pinky_distal" )

# the custom range of axes motion [degrees]
# axis-name , min value, max value
axes_custom_motion_range ( ( "l_thumb_oppose" , 10, 90) )

# the custom axes home angle value [degrees]
# By default it home values are set to min axis values
# axis-name , axis value
axes_custom_home_angle ( ( "l_thumb_oppose" , 30) )

# if a joint is not listed here, the sensory information is of encoder type.
# notice that "l_thumb_oppose" and "l_hand_fingers" is measured by joint encoders not the analog sensors
analog_list ( "l_thumb_proximal", "l_thumb_middle", "l_thumb_distal",
Expand All @@ -35,6 +44,7 @@ l_middle_proximal ( "l_middle_proximal" )
l_middle_distal ( "l_middle_middle", "l_middle_distal" )
l_pinky ( "l_ring_proximal", "l_ring_middle", "l_ring_distal", "l_pinky_proximal", "l_pinky_middle", "l_pinky_distal" )

robot_finger_list ( "l_thumb_finger", "l_index_finger", "l_middle_finger", "l_ring_finger", "l_little_finger")
###############
### HUMAN
###############
Expand Down
111 changes: 71 additions & 40 deletions app/robots/iCubGazeboV2_5/rightFingersHapticRetargetingParams.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
###############
### ROBOT
###############

remote_control_boards ("right_arm")

remote_sensor_boards "right_hand"

axis_list ( "r_hand_fingers", "r_thumb_oppose", "r_thumb_proximal", "r_thumb_distal", "r_index_proximal", "r_index_distal", "r_middle_proximal", "r_middle_distal", "r_pinky" )
axis_list ( "r_hand_fingers", "r_thumb_oppose", "r_thumb_proximal", "r_thumb_distal", "r_index_proximal", "r_index_distal", "r_middle_proximal", "r_middle_distal", "r_pinky" )

all_axis_list ( "r_hand_fingers", "r_thumb_oppose", "r_thumb_proximal", "r_thumb_distal", "r_index_proximal", "r_index_distal", "r_middle_proximal", "r_middle_distal", "r_pinky" )

all_axis_list ( "r_hand_fingers", "r_thumb_oppose", "r_thumb_proximal", "r_thumb_distal", "r_index_proximal", "r_index_distal", "r_middle_proximal", "r_middle_distal", "r_pinky" )

joint_list ( "r_thumb_oppose", "r_thumb_proximal", "r_thumb_middle", "r_thumb_distal",
"r_index_abduction", "r_index_proximal", "r_index_middle", "r_index_distal",
"r_middle_proximal", "r_middle_middle", "r_middle_distal",
"r_ring_abduction", "r_ring_proximal", "r_ring_middle", "r_ring_distal",
"r_pinky_abduction", "r_pinky_proximal", "r_pinky_middle", "r_pinky_distal" )

joint_list ( "r_thumb_oppose", "r_thumb_proximal", "r_thumb_middle", "r_thumb_distal",
"r_index_abduction", "r_index_proximal", "r_index_middle", "r_index_distal",
"r_middle_proximal", "r_middle_middle", "r_middle_distal",
"r_ring_abduction", "r_ring_proximal", "r_ring_middle", "r_ring_distal",
"r_pinky_abduction", "r_pinky_proximal", "r_pinky_middle", "r_pinky_distal" )
# the custom range of axes motion [degrees]
# axis-name , min value, max value
axes_custom_motion_range ( ( "r_thumb_oppose" , 10, 60) )

# the custom axes home angle value [degrees]
# By default it home values are set to min axis values
# axis-name , axis value
axes_custom_home_angle ( ( "r_thumb_oppose" , 30) )

# if a joint is not listed here, the sensory information is of encoder type.
# notice that "r_thumb_oppose" and "r_hand_fingers" is measured by joint encoders not the analog sensors
Expand All @@ -25,8 +32,8 @@ analog_list ( "r_thumb_proximal", "r_thumb_middle", "r_thumb_distal"
"r_ring_proximal", "r_ring_middle", "r_ring_distal",
"r_pinky_proximal", "r_pinky_middle", "r_pinky_distal" )

#Adding the groups of each axis and associated analog sensors
r_hand_fingers ( "r_index_abduction", "r_ring_abduction", "r_pinky_abduction")
#Adding the groups of each axis and associated joints
r_hand_fingers ( "r_index_abduction", "r_ring_abduction", "r_pinky_abduction" )
r_thumb_oppose ( "r_thumb_oppose" )
r_thumb_proximal ( "r_thumb_proximal" )
r_thumb_distal ( "r_thumb_middle", "r_thumb_distal" )
Expand All @@ -36,20 +43,21 @@ r_middle_proximal ( "r_middle_proximal" )
r_middle_distal ( "r_middle_middle", "r_middle_distal" )
r_pinky ( "r_ring_proximal", "r_ring_middle", "r_ring_distal", "r_pinky_proximal", "r_pinky_middle", "r_pinky_distal" )

robot_finger_list ( "r_thumb_finger", "r_index_finger", "r_middle_finger", "r_ring_finger", "r_little_finger")

###############
### HUMAN
###############
human_joint_list ( "r_thumb_oppose", "r_thumb_proximal", "r_thumb_middle", "r_thumb_distal",
"r_index_abduction", "r_index_proximal", "r_index_middle", "r_index_distal",
"r_middle_abduction", "r_middle_proximal", "r_middle_middle", "r_middle_distal",
"r_ring_abduction", "r_ring_proximal", "r_ring_middle", "r_ring_distal",
"r_pinky_abduction", "r_pinky_proximal", "r_pinky_middle", "r_pinky_distal" )
human_joint_list ( "r_thumb_oppose", "r_thumb_proximal", "r_thumb_middle", "r_thumb_distal",
"r_index_abduction", "r_index_proximal", "r_index_middle", "r_index_distal",
"r_middle_abduction", "r_middle_proximal", "r_middle_middle", "r_middle_distal",
"r_ring_abduction", "r_ring_proximal", "r_ring_middle", "r_ring_distal",
"r_pinky_abduction", "r_pinky_proximal", "r_pinky_middle", "r_pinky_distal" )

human_finger_list ( "r_thumb_finger", "r_index_finger", "r_middle_finger", "r_ring_finger", "r_little_finger")

hand_link r_hand


wearable_data_ports ("/WearableData/HapticGlove/RightHand/data:o")

use_rpc 0
Expand All @@ -67,24 +75,21 @@ wearable_data_actuator_ports_in "/WearableData/HapticGlove/RightHand/Actuators/i
motorsJointsCoupled 1

# haptic feedback retargeting from the robot axis groups to the human finger
r_thumb_finger ( "r_thumb_oppose", "r_thumb_proximal", "r_thumb_distal" )
r_index_finger ( "r_hand_finger", "r_index_proximal", "r_index_distal" )
r_middle_finger ( "r_middle_proximal", "r_middle_distal" )
r_ring_finger ( "r_pinky" )
r_little_finger ( "r_pinky" )
r_thumb_finger ( "r_thumb_oppose", "r_thumb_proximal", "r_thumb_distal" )
r_index_finger ( "r_hand_fingers", "r_index_proximal", "r_index-distal" )
r_middle_finger ( "r_middle_proximal", "r_middle_distal" )
r_ring_finger ( "r_pinky" )
r_little_finger ( "r_pinky" )

# This gain is multiplied to the total error for each motor/axis to compute the force feedback to the user associated with each axis,
# defined according to user experience
# Number of gains = number of motors/axis
gainTotalError ( 0.0 0.0 600.0 600.0 600.0 600.0 600.0 600.0 600.0 )
# This gain is multiplied to the total error for each motor to compute the force feedback to the user, computed by user experience
# No of gains= No of motors
gainTotalError ( 0.0 0.0 600.0 600.0 600.0 600.0 600.0 600.0 600.0 )

# check this issue for the velocity Gain: https://github.com/dic-iit/element_retargeting-from-human/issues/141
# number of gains = number of motors/axis
gainVelocityError ( 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 )
gainVelocityError ( 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 )

# this value is multiplied to forcefeedback and provides haptic feedback to the user
# number of gains = number of fingers
gainVibrotactile ( 0.8 0.8 0.8 0.8 0.8 )
gainVibrotactile ( 0.8 0.8 0.8 0.8 0.8 )

# scaling and biased values for maping the human to robot motion
# the sign of the following vector is important, while the absolute values will be found at configuration file
Expand All @@ -95,9 +100,9 @@ human_to_robot_joint_angles_scaling ( 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 )

human_to_robot_joint_anlges_bias ( 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 )

axisContactThreshold 0.1
Expand All @@ -108,16 +113,16 @@ axisContactThreshold 0.1

useVelocity 0

referenceVelocityForPositionControl 80.0
referenceVelocityForPositionControl 100.0

# minimum and maximum values of the joints
# related to analog sensors
# values are in degrees
analog_joints_min_boundary ( 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 )
analog_joints_max_boundary ( 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 )
analog_joints_min_boundary ( 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 )
analog_joints_max_boundary ( 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 )

analog_sensors_raw_min_boundary ( 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 )
analog_sensors_raw_max_boundary ( 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 )
analog_sensors_raw_min_boundary ( 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 250.0 255.0 255.0 255.0 255.0 255.0 )
analog_sensors_raw_max_boundary ( 25.0 0.0 37.0 15.0 24.0 12.0 0.0 0.0 0.0 40.0 0.0 0.0 0.0 30.0 0.0 )

# in case each joint does not have independant motor to actuate, they are coupled
axesJointsCoupled 1
Expand All @@ -127,13 +132,13 @@ doCalibration 1
#robot controller exponential filter gain
exponentialFilterGain 0.9


# q= A x m, where:
# q (n,1) is the joint values
# m (m,1) is the axis/motor values
# m (m,1) is the motors values
# A (n,m) is the mapping from the motors values to the joint values

# CouplingMatrix = A : (n,m) matrix
# if doCalibration is true, then the CouplingMatrix will be over-written
CouplingMatrix ( 1.1 0.0 0.0 0.0 0.0
0.0 1.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0 0.0
Expand All @@ -145,8 +150,7 @@ CouplingMatrix ( 1.1 0.0 0.0 0.0 0.0

# for joint-axis qp controller
# eqaul to the number of all joints
q_qp_control ( 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 )

q_qp_control ( 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 )

# eqaul to the number of all axes
r_qp_control ( 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 )
Expand All @@ -158,3 +162,30 @@ no_states_kf 3
no_measurement_kf 1
q_matrix_kf ( 10.0 150.0 100000.0 )
r_matrix_kf ( 0.0000001 )


#####################
## TACTILE SENSORS ##
#####################
## length of the tactile sensor port
noTactileSensors 192

## indices to read from the port for each finger
## starting index <uint> ending index <uint> contact threshold gain vibrotactile feedback gain derivative vibrotactile feedback contact derivative threshold
r_thumb_finger_tactile_info ( 48 59 5.0 200.0 50.0 3.0 )
r_index_finger_tactile_info ( 0 11 5.0 200.0 50.0 3.0 )
r_middle_finger_tactile_info ( 12 23 5.0 200.0 50.0 3.0 )
r_ring_finger_tactile_info ( 24 35 5.0 200.0 50.0 3.0 )
r_little_finger_tactile_info ( 36 47 5.0 200.0 50.0 3.0 )

# absolute vibrotactile feedback nonlinear function parameters
# 15.0 * std::log(2 * std::pow(x, 0.7) + 1) + 0.5 * std::pow(x, 1.1);
# reference to https://github.com/ami-iit/element_retargeting-from-human/issues/182#issuecomment-1000472012
absoluteVibrotactileFeedbackNonlinearFunctionParameters ( 15.0 2.0 0.7 1.0 0.5 1.1 )

# percentage dedicated to absolute skin data for providing the vibrotactile feedback
# the value is between [0,1]
# 0 : 0% absolute skin value for the vibrotactile feedback; 100% derivative skin value for the vibrotactile feedback
# 1 : 100% absolute skin value for the vibrotactile feedback; 0% derivative skin value for the vibrotactile feedback
absoluteSkinValuePercentage 1.0
skinDerivativeSmoothingGain 0.9
7 changes: 7 additions & 0 deletions app/robots/iCubGenova04/hapticGloveConfig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ useLeftHand 1
useRightHand 1
smoothingTime 0.25
isMandatory 0
useSkin 1
#calibrationTimePeriod [sec]
calibrationTimePeriod 2.0
#robotInitializationTime [sec]
Expand All @@ -19,6 +20,12 @@ getHumanMotionRange 1
steadyStateCounterThreshold 5
# the threshold to check the error between the desired and feedback values for the steady state check [rad]
steadyStateThreshold 0.05
# the time teleoperation should wait before running [sec]
waitingDurationTime 5.0
# threshold in which an skin is considered as working fine [no units]
tactileWorkingThreshold 0.0001
# threshold in which an skin data is considered updated [no units]
tactileUpdateThreshold 0.0001

# include fingers parameters
[include LEFT_FINGERS_RETARGETING "leftFingersHapticRetargetingParams.ini"]
Expand Down
10 changes: 10 additions & 0 deletions app/robots/iCubGenova04/leftFingersHapticRetargetingParams.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ joint_list ( "l_thumb_oppose", "l_thumb_proximal", "l_thumb_m
"l_ring_abduction", "l_ring_proximal", "l_ring_middle", "l_ring_distal",
"l_pinky_abduction", "l_pinky_proximal", "l_pinky_middle", "l_pinky_distal" )

# the custom range of axes motion [degrees]
# axis-name , min value, max value
axes_custom_motion_range ( ( "l_thumb_oppose" , 10, 90) )


# the custom axes home angle value [degrees]
# By default it home values are set to min axis values
# axis-name , axis value
axes_custom_home_angle ( ( "l_thumb_oppose" , 30) )

# if a joint is not listed here, the sensory information is of encoder type.
# notice that "l_thumb_oppose" and "l_hand_fingers" is measured by joint encoders not the analog sensors
analog_list ( "l_thumb_proximal", "l_thumb_middle", "l_thumb_distal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ joint_list ( "r_thumb_oppose", "r_thumb_proximal", "r_thumb_midd
"r_ring_abduction", "r_ring_proximal", "r_ring_middle", "r_ring_distal",
"r_pinky_abduction", "r_pinky_proximal", "r_pinky_middle", "r_pinky_distal" )

# the custom range of axes motion [degrees]
# axis-name , min value, max value
axes_custom_motion_range ( ( "r_thumb_oppose" , 10, 90) )

# the custom axes home angle value [degrees]
# By default it home values are set to min axis values
# axis-name , axis value
axes_custom_home_angle ( ( "r_thumb_oppose" , 30) )

# if a joint is not listed here, the sensory information is of encoder type.
# notice that "r_thumb_oppose" and "r_hand_finger" is measured by joint encoders not the analog sensors
analog_list ( "r_thumb_proximal", "r_thumb_middle", "r_thumb_distal",
Expand Down
9 changes: 8 additions & 1 deletion app/robots/iCubGenova09/hapticGloveConfig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@ useLeftHand 1
useRightHand 1
smoothingTime 0.25
isMandatory 0
useSkin 1
#calibrationTimePeriod [sec]
calibrationTimePeriod 2.0
#robotInitializationTime [sec]
robotInitializationTime 10.0
robotInitializationTime 3.0
getHumanMotionRange 1
# the counter to check if steady state is reached [steps]
steadyStateCounterThreshold 5
# the threshold to check the error between the desired and feedback values for the steady state check [rad]
steadyStateThreshold 0.05
# the time teleoperation should wait before running [sec]
waitingDurationTime 5.0
# threshold in which an skin is considered as working fine [no units]
tactileWorkingThreshold 0.0001
# threshold in which an skin data is considered updated [no units]
tactileUpdateThreshold 0.0001

# include fingers parameters
[include LEFT_FINGERS_RETARGETING "leftFingersHapticRetargetingParams.ini"]
Expand Down
Loading

0 comments on commit 4f9db93

Please sign in to comment.