Skip to content

Commit

Permalink
[ergoCubSN001] Add all the configuration files required for the balan…
Browse files Browse the repository at this point in the history
…cing
  • Loading branch information
GiulioRomualdi authored and ergocub committed Dec 13, 2023
1 parent 45faa1c commit 0e04190
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ BSD-3-Clause license. -->

<devices>

<!-- <device xmlns:xi="http://www.w3.org/2001/XInclude" name="jabra" type="opencv_grabber"> -->
<!-- <param name="camera">0</param> -->
<!-- <param name="width">1280</param> -->
<!-- <param name="height">720</param> -->
<!-- </device> -->
<device xmlns:xi="http://www.w3.org/2001/XInclude" name="jabra" type="opencv_grabber">
<param name="camera">4</param>
<param name="width">1280</param>
<param name="height">720</param>
</device>

<!-- Enable the following block if you want to collect retrieve the cameras of the robot -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ BSD-3-Clause license. -->
<param name="robot">ergocub</param>
<param name="sampling_period_in_s">0.01</param>

<param name="rgb_cameras_fps">()</param>
<param name="rgb_cameras_rgb_save_mode">()</param>
<param name="rgb_cameras_fps">(20)</param>
<param name="rgb_cameras_rgb_save_mode">("video")</param>

<param name="rgbd_cameras_fps">()</param>
<param name="rgbd_cameras_depth_scale">()</param>
Expand All @@ -25,7 +25,7 @@ BSD-3-Clause license. -->
</group>

<group name="ExogenousSignals">
<param name="vectors_collection_exogenous_inputs">("Walking")</param>
<param name="vectors_collection_exogenous_inputs">("Walking", "Balancing")</param>
<param name="vectors_exogenous_inputs">()</param>

<group name="Walking">
Expand All @@ -35,18 +35,18 @@ BSD-3-Clause license. -->
<param name="carrier">"udp"</param>
</group>

<group name="RobotDynamicsEstimator">
<param name="local">"/yarp-robot-logger/exogenous_signals/rde"</param>
<param name="remote">"/robot-dynamics-estimator/logger"</param>
<param name="signal_name">"rde"</param>
<group name="Balancing">
<param name="local">"/yarp-robot-logger/exogenous_signals/balancing_position_controller"</param>
<param name="remote">"/balancing_position_controller/logger"</param>
<param name="signal_name">"balancing"</param>
<param name="carrier">"udp"</param>
</group>
</group>

<group name="RobotCameraBridge">
<param name="stream_cameras">false</param>
<param name="stream_cameras">true</param>
<group name="Cameras">
<param name="rgb_cameras_list">()</param>
<param name="rgb_cameras_list">("jabra")</param>
<param name="rgbd_cameras_list">()</param>
</group>
</group>
Expand Down Expand Up @@ -100,7 +100,7 @@ BSD-3-Clause license. -->
<!-- <elem name="left_arm_wrench_client">left_arm_wrench_client</elem> -->
<elem name="mas-remapper">mas-remapper</elem>
<!-- <elem name="realsense">realsense</elem> -->
<!-- <elem name="jabra">jabra</elem> -->
<elem name="jabra">jabra</elem>
</paramlist>
</action>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ zmp_gain (1.0, 1.0)
[include CONTACT_WRENCHES "./blf_balancing_position_control/contact_wrenches.ini"]
[include GLOBAL_COP_EVALUATOR "./blf_balancing_position_control/global_cop_evaluator.ini"]
[include DATA_LOGGING "./blf_balancing_position_control/data_logging.ini"]

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
dt 0.01 # in seconds
contact_force_threshold 0.1 # in Newton


com_knots_delta_x (0.0, 0.0, 0.04, 0.04, -0.04, -0.04, 0.0, 0.0) # in meter
com_knots_delta_y (0.0, 0.01, 0.01, -0.01, -0.01, 0.01, 0.01, 0.0) # in meter
com_knots_delta_z (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) # in meter
motion_duration 5.0 # in seconds
motion_timeout 5.0 # in seconds

base_frame l_sole
left_contact_frame l_sole
right_contact_frame r_sole
close_loop_with_zmp true

[COM_ZMP_CONTROLLER]
com_gain (5.0, 5.0)
zmp_gain (1.0, 1.0)

[include IK "./blf_balancing_position_control/ik.ini"]
[include ROBOT_CONTROL "./blf_balancing_position_control/robot_control.ini"]
[include SENSOR_BRIDGE "./blf_balancing_position_control/sensor_bridge.ini"]
[include CONTACT_WRENCHES "./blf_balancing_position_control/contact_wrenches.ini"]
[include GLOBAL_COP_EVALUATOR "./blf_balancing_position_control/global_cop_evaluator.ini"]
[include DATA_LOGGING "./blf_balancing_position_control/data_logging.ini"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
left_contact_wrenches_group ("LEFT_FOOT_FRONT", "LEFT_FOOT_REAR")
right_contact_wrenches_group ("RIGHT_FOOT_FRONT", "RIGHT_FOOT_REAR")

[LEFT_FOOT_FRONT]
description "left_foot_front"
remote_port_name "/wholeBodyDynamics/left_foot_front/cartesianEndEffectorWrench:o"
local_port_name_postfix "/left_foot_front/cartesianEndEffectorWrench:i"

[LEFT_FOOT_REAR]
description "left_foot_rear"
remote_port_name "/wholeBodyDynamics/left_foot_rear/cartesianEndEffectorWrench:o"
local_port_name_postfix "/left_foot_rear/cartesianEndEffectorWrench:i"

[RIGHT_FOOT_FRONT]
description "right_foot_front"
remote_port_name "/wholeBodyDynamics/right_foot_front/cartesianEndEffectorWrench:o"
local_port_name_postfix "/right_foot_front/cartesianEndEffectorWrench:i"

[RIGHT_FOOT_REAR]
description "right_foot_rear"
remote_port_name "/wholeBodyDynamics/right_foot_rear/cartesianEndEffectorWrench:o"
local_port_name_postfix "/right_foot_rear/cartesianEndEffectorWrench:i"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remote "/balancing_position_controller/logger"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
minimum_normal_force 10.0
cop_admissible_limits (0.10, 0.08)
constant_cop_tolerance 0.01
constant_cop_max_counter -1
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
tasks ("COM_TASK", "RIGHT_FOOT_TASK", "LEFT_FOOT_TASK", "TORSO_TASK", "JOINT_REGULARIZATION_TASK")

[VARIABLES]
variables_name ("robot_velocity")
variables_size (29)


[IK]
robot_velocity_variable_name "robot_velocity"

[COM_TASK]
name com_task
type CoMTask
robot_velocity_variable_name "robot_velocity"
kp_linear 2.0
mask (true, true, true)
priority 0

[RIGHT_FOOT_TASK]
name right_foot_task
type SE3Task
robot_velocity_variable_name "robot_velocity"
frame_name "r_sole"
kp_linear 7.0
kp_angular 5.0
priority 0

[LEFT_FOOT_TASK]
name left_foot_task
type SE3Task
robot_velocity_variable_name "robot_velocity"
frame_name "l_sole"
kp_linear 7.0
kp_angular 5.0
priority 0

[TORSO_TASK]
name torso_task

robot_velocity_variable_name "robot_velocity"
frame_name "chest"
kp_angular 5.0

type SO3Task

priority 1
weight (5.0, 5.0, 5.0)

[JOINT_REGULARIZATION_TASK]
name joint_regularization_task

robot_velocity_variable_name "robot_velocity"
kp (5.0, 5.0, 5.0,
5.0, 5.0, 5.0, 5.0,
5.0, 5.0, 5.0, 5.0,
5.0, 5.0, 5.0, 5.0, 5.0, 5.0,
5.0, 5.0, 5.0, 5.0, 5.0, 5.0)

type JointTrackingTask

priority 1
weight (1.0, 1.0, 1.0,
2.0, 2.0, 2.0, 2.0,
2.0, 2.0, 2.0, 2.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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
robot_name ergocub

joints_list ("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",
"l_hip_pitch", "l_hip_roll", "l_hip_yaw", "l_knee", "l_ankle_pitch", "l_ankle_roll",
"r_hip_pitch", "r_hip_roll", "r_hip_yaw", "r_knee", "r_ankle_pitch", "r_ankle_roll")

remote_control_boards ("torso", "left_arm", "right_arm", "left_leg", "right_leg")
positioning_duration 3.0 #in seconds
positioning_tolerance 0.05 #in seconds
position_direct_max_admissible_error 0.1 #in seconds
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
check_for_nan false
stream_joint_states true
stream_cartesian_wrenches true

[CartesianWrenches]
cartesian_wrenches_list ("left_foot_front", "left_foot_rear", "right_foot_front", "right_foot_rear")

0 comments on commit 0e04190

Please sign in to comment.