Skip to content

Commit

Permalink
Added configuration files for ergocub sn 001
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Dafarra authored and ergocub committed Feb 5, 2024
1 parent a4b0ef4 commit 01c955a
Show file tree
Hide file tree
Showing 5 changed files with 609 additions and 0 deletions.
31 changes: 31 additions & 0 deletions app/robots/ergoCubSN001/hapticGloveConfig.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name HapticGloveRetargeting


[GENERAL]
robot ergocub
samplingTime 0.1
enableMoveRobot 1
enableLogger 0
useLeftHand 1
useRightHand 1
isMandatory 0
useSkin 0
#calibrationTimePeriod [sec]
calibrationTimePeriod 1.0
#robotInitializationTime [sec]
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 -1.0

# include fingers parameters
[include LEFT_FINGERS_RETARGETING "leftFingersHapticRetargetingParams.ini"]
[include RIGHT_FINGERS_RETARGETING "rightFingersHapticRetargetingParams.ini"]
171 changes: 171 additions & 0 deletions app/robots/ergoCubSN001/leftFingersHapticRetargetingParams.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
###############
### ROBOT
###############
remote_control_boards ("left_arm")

remote_sensor_boards "left_hand"

axis_list ( "l_thumb_add", "l_thumb_oc", "l_index_oc", "l_middle_oc", "l_ring_pinky_oc")

all_axis_list ( "l_thumb_add", "l_thumb_oc", "l_index_add", "l_index_oc", "l_middle_oc", "l_ring_pinky_oc")

joint_list ( "l_thumb_add", "l_thumb_oc", "l_index_add", "l_index_oc", "l_middle_oc", "l_ring_pinky_oc" )

# the custom range of axes motion [degrees]
# axis-name , min value, max value
# axes_custom_motion_range ( ( ${AXES_NAME} , ${MIN}, ${MAX}) )

# 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 ( )

#Adding the groups of each axis and associated joints
l_thumb_add ( "l_thumb_add" )
l_thumb_oc ( "l_thumb_oc" )
l_index_add ( "l_index_add" )
l_index_oc ( "l_index_oc" )
l_middle_oc ( "l_middle_oc" )
l_ring_pinky_oc ( "l_ring_pinky_oc" )

robot_finger_list ( "l_thumb_finger", "l_index_finger", "l_middle_finger", "l_ring_finger", "l_little_finger")

###############
### HUMAN
###############
human_joint_list ( "l_thumb_oppose", "l_thumb_proximal", "l_thumb_middle", "l_thumb_distal",
"l_index_abduction", "l_index_proximal", "l_index_middle", "l_index_distal",
"l_middle_abduction", "l_middle_proximal", "l_middle_middle", "l_middle_distal",
"l_ring_abduction", "l_ring_proximal", "l_ring_middle", "l_ring_distal",
"l_pinky_abduction", "l_pinky_proximal", "l_pinky_middle", "l_pinky_distal" )

human_finger_list ( "l_thumb_finger", "l_index_finger", "l_middle_finger", "l_ring_finger", "l_little_finger")

hand_link l_hand

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

wearable_data_actuator_ports_out "/WearableData/HapticGlove/LeftHand/Actuators/input:o"

wearable_data_actuator_ports_in "/WearableData/HapticGlove/LeftHand/Actuators/input:i"

###############
### RETARGETING
###############

motorsJointsCoupled 0

robot_to_human_map ( ("l_thumb_add", "l_thumb_oppose")
("l_thumb_oc", "l_thumb_distal")
("l_index_add", "l_index_abduction" )
("l_index_oc", "l_index_distal")
("l_middle_oc", "l_middle_distal")
("l_ring_pinky_oc", "l_ring_distal") )

# haptic feedback retargeting from the robot axis groups to the human finger
l_thumb_finger ( "l_thumb_add", "l_thumb_oc" )
l_index_finger ( "l_index_add", "l_index_oc" )
l_middle_finger ( "l_middle_oc" )
l_ring_finger ( "l_ring_pinky_oc" )
l_little_finger ( "l_ring_pinky_oc" )

# 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 15.0 15.0 15.0 15.0 15.0)
#gainTotalError ( 0.0 0.0 0.0 0.0 0.0 0.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.1 0.1 0.1 0.1 0.1)
#gainVelocityError ( 0.0 0.0 0.0 0.0 0.0 0.0)

# this value is multiplied to forcefeedback and provides haptic feedback to the user
gainVibrotactile (0.8 0.8 0.8 0.8 0.8 )
#gainVibrotactile ( 0.0 0.0 0.0 0.0 0.0 )

# 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
human_to_robot_joint_angles_scaling ( -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 )

axisContactThreshold 0.1

##############################
### ROBOT CONTROL & ESTIMATION
##############################
useVelocity 0

referenceVelocityForPositionControl 100.0

# minimum and maximum values of the joints
# related to analog sensors
analog_joints_min_boundary ( )
analog_joints_max_boundary ( )

# hall sensors minimum and maximum values
analog_sensors_raw_min_boundary ( )
analog_sensors_raw_max_boundary ( )


# in case each joint does not have independant motor to actuate, they are coupled
axesJointsCoupled 0

# in case a calibration phase necessary before starting teleoperating the robot,
# otherwise read the calibration matrix from the config file
doCalibration 0

#robot controller exponential filter gain
exponentialFilterGain 0.9

# in the Quadratic optimizartion problem to compute the motor values from the joint values : xT Q X + uT R u
# q_matrix_joint_motor is a list that identifies the main diagonal values of matrix Q: (q x q) matrix;
# size of q: is the number of desired joints to control
# r_matrix_joint_motor is a list that identifies the main diagonal of matrix R: (m x m) matrix;
# size of m: is the number of desired motors to control

q_qp_control ( 1.0 1.0 1.0 1.0 1.0 1.0 )

r_qp_control ( 0.0 0.0 0.0 0.0 0.0 0.0 )


# in the Kalman filter problem to estimate the axis values, velocity and acceleration:
# q_matrix_kf is a list that identifies the main diagonal of matrix: E[ (w(t) -w_bar(t)) (w(t) -w_bar(t))^T ],
# size: m*m positive matrix, Dx(t)= Fx(t)+ Gw(t), the process noise */
# r_matrix_kf is a list that identifies the main diagonal of matrix: E[ v(t) v(t)^T ],
# size: p*p positive matrix, Z(t)= Hx(t)+ v(t), the measurement noise
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 threshold multiplier contact feedback gain derivative threshold threshold multiplier gain derivative vibrotactile feedback
# l_thumb_finger_tactile_info ( 48 59 0.14 1.0 200.0 0.5 3.0 40.0)
# l_index_finger_tactile_info ( 0 11 0.14 1.0 200.0 0.5 3.0 40.0)
# l_middle_finger_tactile_info ( 12 23 0.14 1.0 200.0 0.5 3.0 40.0)
# l_ring_finger_tactile_info ( 24 35 0.14 1.0 200.0 0.5 3.0 40.0)
# l_little_finger_tactile_info ( 36 47 0.14 1.0 200.0 0.5 3.0 40.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 1.0
145 changes: 145 additions & 0 deletions app/robots/ergoCubSN001/openXRHeadsetParameters.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
###Use as subdevice
### Device params
device JoypadControlServer
use_separate_ports 1
subdevice openxrheadset
stick_as_axis false
####

###Use as direct device
#device openxrheadset
###

period 10
name /headset

mono_eye true

vr_poses_prediction_in_ms 0

### Camera correction
eye_z_position -0.8

### Custom frames
custom_poses 3

### Gui params
gui_elements 1
labels 4
slides 2

[CUSTOM_POSE_0]
name stable_waist
parent_frame vive_tracker_waist_pose
euler_angles xzy
relative_position (0.0, 0.0, 0.0)
relative_rotation (*, *, 0.0)

[CUSTOM_POSE_1]
name world
parent_frame stable_waist
euler_angles zyx
relative_position (0.0, -0.1, 0.1)
relative_rotation (0.0, -1.5708, -1.5708)

[CUSTOM_POSE_2]
name root_link_desired
parent_frame world
euler_angles zyx
relative_position (0.0, 0.0, 0.0)
relative_rotation (0.0, -0.2, 0.0)

[GUI_0]
width 1.50
height 1.50
x 0.0
y 0.0
z -0.7999
visibility both
follow_eyes true
port_id augmentedReality

[LABEL_0]
width 0.5
height 0.05
x 0.0
y 0.045
z -0.5
prefix ""
suffix ""
pixel_size 45
color (0.0, 0.0, 1.0, 1.0)
background_color (1.0, 1.0, 1.0, 0.01)
font "Roboto/Roboto-Black.ttf"
horizontal_alignement center
vertical_alignement top
automatically_enabled false
disable_timeout_in_S 1.8

[LABEL_1]
width 0.15
height 0.05
x -0.12
y 0.08
z -0.5
prefix "Weight L: "
suffix " Kg"
pixel_size 256
color (1.0, 1.0, 1.0, 1.0)
background_color (0.0, 0.0, 0.0, 1.0)
font "Roboto/Roboto-Medium.ttf"
horizontal_alignement left
vertical_alignement center
automatically_enabled false
disable_timeout_in_S 5.0

[LABEL_2]
width 0.15
height 0.05
x 0.12
y 0.08
z -0.5
prefix "Weight R: "
suffix " Kg"
pixel_size 256
color (1.0, 1.0, 1.0, 1.0)
background_color (0.0, 0.0, 0.0, 1.0)
font "Roboto/Roboto-Medium.ttf"
horizontal_alignement left
vertical_alignement center
automatically_enabled false
disable_timeout_in_S 5.0

[LABEL_3]
width 0.15
height 0.05
x 0.0
y 0.08
z -0.5
prefix "WARNING! Risk: "
suffix ""
pixel_size 256
color (1.0, 1.0, 1.0, 1.0)
background_color (0.0, 0.0, 0.0, 1.0)
font "Roboto/Roboto-Medium.ttf"
horizontal_alignement center
vertical_alignement center
automatically_enabled false
disable_timeout_in_S 2.0
port_id risk_label

[SLIDE_0]
width 0.1
height 0.1
x 0.0
y -0.2
z -0.5
slides_path C:/element_ifeel-walking-retargeting/arrow/linear_arrow

[SLIDE_1]
width 0.1
height 0.1
x 0.0
y -0.2
z -0.5
slides_path C:/element_ifeel-walking-retargeting/arrow/rotation_arrow
Loading

0 comments on commit 01c955a

Please sign in to comment.