Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/JoypadModule/app/dcmWalkingJoypad/joypad.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ disconnectButton 11 # Menu button
connectPortsSeparately true

# Port names
rpcServerPort_name /walking-coordinator/rpc
rpcClientPort_name /rpc
rpcServerPort_name /walking-coordinatori-ironCub/rpc
rpcClientPort_name /ironcub-joypad/rpc
Comment on lines +24 to +25
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this needs to be reverted


# The goal is the desired position of the robot CoM. The desired position is a
# vector containing the x and the y coordinate expressed in a frame rigidly
# attached to the robot.
# The x-axis points forward
# The y-axis points on the left
robotGoalInputPort_name /walking-coordinator/goal:i
robotGoalInputPort_name /walking-coordinator-ironCub/goal:i
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this

robotGoalOutputPort_name /goal:o

[JOYPAD_DEVICE]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
controllerHorizon 2

stateWeightTriplets ((0,0,750), (1,1,750))
inputWeightTriplets ((0,0,90000000), (1,1,90000000))

#Foot Dimensions x_min x_max y_min y_max
foot_size ((-0.02 0.05), (-0.045 0.05))
initial_zmp_position (0.0 0.0)

convex_hull_tolerance 0.05
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kDCM 1.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# name of the left and right feet wrench ports
left_foot_wrench_input_port_name ("/left_foot/cartesianEndEffectorWrench:i")
left_foot_wrench_output_port_name ("/iRonCub-Mk1/wholeBodyDynamics/left_foot/cartesianEndEffectorWrench:o")

right_foot_wrench_input_port_name ("/right_foot/cartesianEndEffectorWrench:i")
right_foot_wrench_output_port_name ("/iRonCub-Mk1/wholeBodyDynamics/right_foot/cartesianEndEffectorWrench:o")
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#the x axis pointing forward the z axis pointing upward and the y concludes a right-handed frame
left_foot_frame l_sole
right_foot_frame r_sole

# hand frames
left_hand_frame l_hand_dh_frame
right_hand_frame r_hand_dh_frame

head_frame imu_frame

root_frame root_link
torso_frame neck_2

# filters
# if it is equal to 0 the low pass filters are not used
use_filters 0
#Hz
cut_frequency 10.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[ELLIPSE_METHOD_SETTINGS]
#This factor affects the reference of the unicycle. It allows switching between the specified ellipse and a smaller one to
#take into account the robot dimensions. If 0, it always considers only the specified ellipse. If greater than zero, the reference
#to the unicycle will be projected in a smaller ellipse as soon as the unicycle is no more perpendicular to the ellipse.
#Greater values make this behavior more sensitive.
conservative_factor 2.0

#This offset is subtracted from the semi_major_axis to obtain the inner ellipse
inner_offset_major 0.5

#This offset is subtracted from the semi_minor_axis to obtain the inner ellipse
inner_offset_minor 1.0

[ELLIPSE_MANAGER_SETTINGS]
port_name freeSpaceEllipse:in

use_initial_ellipse 0

[INITIAL_ELLIPSE]

#Axis along the x direction
semi_major_axis 1.0

#Axis along the y direction
semi_minor_axis 1.0

#Rotation around the z axis
angle 0.0

#x coordinate of the center
center_x 0.1

#y coordinate of the center
center_y 0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Minimum force to consider the CoP valid.
minimum_normal_force 1.0

# Limit to consider the CoP valid.
# |x| |y|
cop_admissible_limits (0.3, 0.2)

# Tolerance radius to consider the measured CoP constant.
constant_cop_tolerance 0.0001

# Consecutive times in which the CoP remains constant.
# If this limit is reached, the module stops.
# Use a negative value to disable.
constant_cop_max_counter 125
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# PID handling file

# All the following phases are those of the left foot. In a specific phase, a joint will have the PIDs specified in the corresponding section. If not, the default will be used (if specified, the original PID otherwise).

# Possible phases: SWING_LEFT, SWING_RIGHT, SWITCH

# Each group, except DEFAULT, contains:
# -the field activationPhase with one of the possible phases defined above,
# -the field activationOffset which specified the time advance/delay (if the sign is + it will be a delay) wrt the begin of the phase (OPTIONAL, default 0.0)
# -the field smoothingTime which defines the smoothing time with which the PIDs will be changed (OPTIONAL, default 1.0)

# if 0 only the default group will be taken into consideration
useGainScheduling 0
firmwareDelay 0.01
smoothingTime 0.05

[DEFAULT]
#NAME P I D
torso_yaw -6000.0 -7111.0 0.0
torso_roll -9000.0 -5666.0 0.0
torso_pitch -6000.0 -5222.0 0.0
l_shoulder_pitch 2000.0 7111.0 0.0
#l_shoulder_roll 2166.0 10666.0 0.0
l_shoulder_yaw 1711.1 7111.0 0.0
r_shoulder_pitch -2000.0 -7111.0 0.0
#r_shoulder_roll -2066.0 -10666.0 0.0
r_shoulder_yaw -1711.1 -7111.0 0.0
l_hip_pitch -5000.0 -7000.0 -100.0
l_hip_roll 4500.0 8000.0 0.0
l_hip_yaw -3011.0 -100.0 0.0
l_knee -10000.0 -800.0 0.0
l_ankle_pitch 4000.0 200.0 0.0
l_ankle_roll 6000.0 200.0 0.0
r_hip_pitch 5000.0 7000.0 100.0
r_hip_roll -4500.0 -8000.0 0.0
r_hip_yaw 3011.0 100.0 0.0
r_knee 10000.0 800.0 0.0
r_ankle_pitch -5000.0 -200.0 0.0
r_ankle_roll -6000.0 -200.0 0.0

[PREIMPACT_LEFT]
activationPhase SWING_LEFT
activationOffset 0.3
#NAME P I D
l_ankle_pitch 1000.0 100.0 0.0
l_ankle_roll 2000.0 100.0 0.0

[PREIMPACT_RIGHT]
activationPhase SWING_RIGHT
activationOffset 0.3
#NAME P I D
r_ankle_pitch -1000.0 -100.0 0.0
r_ankle_roll -2000.0 -100.0 0.0

# The next reset the original gains.
[AFTER_IMPACT]
activationPhase SWITCH
activationOffset 0.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
##Timings
plannerHorizon 5.0

##Unicycle controller. Available types: personFollowing, direct
controlType direct

##Unicycle Related Quantities
unicycleGain 10.0
referencePosition (0.1 0.0)
timeWeight 2.5
positionWeight 1.0
slowWhenTurningGain 2.0
slowWhenBackwardFactor 0.4
slowWhenSidewaysFactor 0.2

# Conservative factors that multiply the unicycle velocity saturations
# computed from the other parameters, like the minStepDuration.
# The first number multiplies the saturation for the linear and lateral
# velocity. The second number multiplies the angular velocity saturation.
saturationFactors (0.7, 0.7)

##Bounds
#Step length
maxStepLength 0.19
minStepLength 0.05
maxLengthBackwardFactor 1.0
#Width
minWidth 0.14
#Angle Variations in DEGREES
#maxAngleVariation 12.0
maxAngleVariation 20.0
minAngleVariation 8.0
#Timings
maxStepDuration 1.2
minStepDuration 0.9

##Nominal Values
#Width
nominalWidth 0.15
#Height
stepHeight 0.04
stepLandingVelocity -0.1
footApexTime 0.5
comHeightDelta 0.0
#Timings
nominalDuration 1.0
lastStepSwitchTime 0.8
switchOverSwingRatio 0.5

#ZMP Delta
leftZMPDelta (0.03 0.02)
rightZMPDelta (0.03 -0.0)

#Feet cartesian offset on the yaw
leftYawDeltaInDeg 0.0
rightYawDeltaInDeg 0.0

# Last Step DCM Offset
# If it is 0.5 the final DCM will be in the middle of the two footsteps;
# If it is 0 the DCM position coincides with the stance foot ZMP;
# If it is 1 the DCM position coincides with the next foot ZMP position.
lastStepDCMOffset 0.25

# Last Step DCM Stillness Percentage
# The percentage of the last step duration in which the DCM is still.
lastStepDCMStillPercentage 0.1


#MergePoint
# The ratios of the double support in which it is present a merge point.
# The first number is the ratio at which the merge points begin, the second
# when they ends.
mergePointRatios (0.4, 0.4)

# pitch delta
pitchDelta 0.0

##Should be the first step with the left foot?
swingLeft 0
startAlwaysSameFoot 1

##Remove this line if you don't want to use the minimum jerk trajectory in feet interpolation
#useMinimumJerkFootTrajectory 1

##Remove this line if you want to enable the pause conditon
isPauseActive 1

additional_chest_rotation ((0.0 0.0 1.0),(1.0 0.0 0.0),(0.0 1.0 0.0))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remote "/logger"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# remove the following line if you do not want the gain scheduling
useGainScheduling 1

smoothingTime 0.1

# if the gain scheduling is off only k*_walking parameters are used
kZMP_walking 2.5
kCoM_walking 4.0

kZMP_stance 0.9
kCoM_stance 4.0

# old parameters
#kZMP 2.0 low velocity reactive
#kZMP 1.9 low velocity MPC

#kCoM 10.0 low velocity reactive
#kCoM 8.0 low velocity MPC
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#The left_foot_frame is supposed to have the same orientation of the Inertia frame, which have the z axis pointing upwards,
#the x axis pointing forward and and the y concludes a right-handed frame
left_foot_frame l_sole
right_foot_frame r_sole

#Remove the following line in order not to consider the
#additional frame
additional_frame chest

#The additional rotation is defined (by rows) in the Inertia frame.
#Remove the following line to keep the identity as additional rotation
additional_rotation ((0.0 0.0 1.0),(1.0 0.0 0.0),(0.0 1.0 0.0))

# solver paramenters
solver-verbosity 0
solver_name mumps
max-cpu-time 20

#DEGREES
jointRegularization (0.0, 0.0, 0.0,
15, 0, 0,
-7, 22, 11, 30,
-7, 22, 11, 30,
5.082, 0.406, -0.131, -45.249, -26.454, -0.351,
5.082, 0.406, -0.131, -45.249, -26.454, -0.351)

#jointRegularization (0, 15, 0, 0, -29.794, 29.97, 0.00, 44.977, -29.794, 29.97, 0.00, 44.977, 5.082, 0.406, -0.131, -45.249, -26.454, -0.351, 5.082, 0.406, -0.131, -45.249, -26.454, -0.351)
#jointRegularization (15, 0, 0, 5.082, 0.406, -0.131, -45.249, -26.454, -0.351, 5.082, 0.406, -0.131, -45.249, -26.454, -0.351)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
approaching_phase_duration 4.0
hde_port_name /humanState:i
data_arrived_timeout 1.0

[HAND_RETARGETING]


[JOINT_RETARGETING]
## List of the retargeting joint. This list must be the same or a subset of the
## "joints_list" in robotControl.ini. The order of the joints should be choseen
## accordingly to the order of the joints received in the
## "joint_retargeting_port_name" port
retargeting_joint_list ("neck_pitch", "neck_roll", "neck_yaw",
"torso_pitch", "torso_roll", "torso_yaw",
"l_shoulder_pitch", "l_shoulder_roll", "l_shoulder_yaw", "l_elbow",
"r_shoulder_pitch", "r_shoulder_roll", "r_shoulder_yaw", "r_elbow")


joint_retargeting_port_name /jointPosition:i
smoothing_time_approaching 2.0
smoothing_time_walking 0.2

[VIRTUALIZER]
robot_orientation_port_name /torsoYaw:o

[COM_RETARGETING]
com_height_retargeting_port_name /CoM:i
smoothing_time_approaching 2.0
smoothing_time_walking 1.0
com_height_scaling_factor 0.5
variation_range (-0.05 0.0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
use_feedforward_term_for_joint_retargeting false

[IK]
robot_velocity_variable_name "robot_velocity"

[COM_TASK]
robot_velocity_variable_name "robot_velocity"
kp_linear 2.0
mask (true, true, false)

[RIGHT_FOOT_TASK]
robot_velocity_variable_name "robot_velocity"
frame_name "r_sole"
kp_linear 7.0
kp_angular 5.0

[ROOT_TASK]
robot_velocity_variable_name "robot_velocity"
kp_linear 2.0
frame_name "root_link"
mask (false, false, true)

[LEFT_FOOT_TASK]
robot_velocity_variable_name "robot_velocity"
frame_name "l_sole"
kp_linear 7.0
kp_angular 5.0

[include TORSO_TASK "./tasks/torso.ini"]
[include JOINT_REGULARIZATION_TASK "./tasks/regularization.ini"]
[include JOINT_RETARGETING_TASK "./tasks/retargeting.ini"]
Loading