Skip to content
76 changes: 16 additions & 60 deletions ergoCubSN001/custom_positions.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ robot ergocub
//parts to be opened by the GUI
parts (head torso left_arm right_arm right_leg left_leg)

[customPosition_MomentumBasedTorqueControl]
/$robot/head_Position 0 0 0 0
/$robot/head_Velocity 10 10 10 10
/$robot/torso_Position 0 10 0
/$robot/torso_Velocity 10 10 10
/$robot/left_arm_Position -35.97 29.97 0.06 50.00 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/left_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_arm_Position -35.97 29.97 0.06 50.00 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/right_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_leg_Position 12 5 0 -10 -1.6 -5.8
/$robot/right_leg_Velocity 10 10 10 10 10 10
/$robot/left_leg_Position 12 5 0 -10 -1.6 -5.8
/$robot/left_leg_Velocity 10 10 10 10 10 10



[customPosition_TwoFeetStanding]
/$robot/head_Position 0 0 0 0
/$robot/head_Velocity 10 10 10 10
Expand Down Expand Up @@ -61,63 +77,3 @@ parts (head torso left_arm right_arm right_leg left_leg)
/$robot/right_leg_Velocity 10 10 10 10 10 10
/$robot/left_leg_Position 3.73915 -0.126503 0.419082 -37.7386 -22.523 8.02819
/$robot/left_leg_Velocity 10 10 10 10 10 10


[customPosition_SingleSupportLeftRear]
/$robot/head_Position 0 0 0 0
/$robot/head_Velocity 10 10 10 10
/$robot/torso_Position 3.0644 10.7846 -0.0746
/$robot/torso_Velocity 10 10 10
/$robot/left_arm_Position -2.7001 18.6152 -12.7549 39.3860 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/left_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_arm_Position -2.8786 17.8109 -12.6644 39.3409 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/right_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_leg_Position 8.2115 1.5915 -1.0463 -45.1356 -26.3389 -7.4474
/$robot/right_leg_Velocity 10 10 10 10 10 10
/$robot/left_leg_Position 8.8084 -0.6396 0.7477 -37.8755 -18.6081 5.6976
/$robot/left_leg_Velocity 10 10 10 10 10 10


[customPosition_SingleSupportLeftFront]
/$robot/head_Position 0 0 0 0
/$robot/head_Velocity 10 10 10 10
/$robot/torso_Position -5.9194 9.2542 1.1148
/$robot/torso_Velocity 10 10 10
/$robot/left_arm_Position -3.3139 18.3559 -12.7163 39.6640 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/left_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_arm_Position -2.9313 17.9427 -12.8949 39.3302 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/right_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_leg_Position 9.3425 0.3996 0.1466 -43.4850 -24.4811 -7.4353
/$robot/right_leg_Velocity 10 10 10 10 10 10
/$robot/left_leg_Position 0.4488 1.2695 -0.5615 -32.394 -25.2128 7.3119
/$robot/left_leg_Velocity 10 10 10 10 10 10


[customPosition_SingleSupportRightRear]
/$robot/head_Position 0 0 0 0
/$robot/head_Velocity 10 10 10 10
/$robot/torso_Position 3.0644 10.7846 -0.0746
/$robot/torso_Velocity 10 10 10
/$robot/left_arm_Position -2.8786 17.8109 -12.6644 39.3409 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/left_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_arm_Position -2.7001 18.6152 -12.7549 39.3860 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/right_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_leg_Position 8.8084 -0.6396 0.7477 -37.8755 -18.6081 5.6976
/$robot/right_leg_Velocity 10 10 10 10 10 10
/$robot/left_leg_Position 8.2115 1.5915 -1.0463 -45.1356 -26.3389 -7.4474
/$robot/left_leg_Velocity 10 10 10 10 10 10


[customPosition_SingleSupportRightFront]
/$robot/head_Position 0 0 0 0
/$robot/head_Velocity 10 10 10 10
/$robot/torso_Position 5.9194 9.2542 1.1148
/$robot/torso_Velocity 10 10 10
/$robot/left_arm_Position -2.9313 17.9427 -12.8949 39.3302 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/left_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_arm_Position -3.3139 18.3559 -12.7163 39.6640 0.00 0.00 0.00 0 0 0 0 0 0
/$robot/right_arm_Velocity 10 10 10 10 10 10 10 10 10 10 10 10 10
/$robot/right_leg_Position 0.4488 1.2695 -0.5615 -32.394 -25.2128 7.3119
/$robot/right_leg_Velocity 10 10 10 10 10 10
/$robot/left_leg_Position 9.3425 0.3996 0.1466 -43.4850 -24.4811 -7.4353
/$robot/left_leg_Velocity 10 10 10 10 10 10
39 changes: 29 additions & 10 deletions ergoCubSN001/ergocub.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,25 @@
<xi:include href="wrappers/motorControl/left_leg-mc_wrapper.xml" disabled_by="disable_left_leg" />
<xi:include href="wrappers/motorControl/right_leg-mc_wrapper.xml" disabled_by="disable_right_leg" />

<xi:include href="wrappers/motorControl/left_leg-mc_remapper.xml" disabled_by="disable_left_leg" />
<xi:include href="wrappers/motorControl/right_leg-mc_remapper.xml" disabled_by="disable_right_leg" />
<xi:include href="wrappers/motorControl/left_leg-mc_remapper-jtcvc.xml" disabled_by="disable_left_leg disable_jtcvc" />
<xi:include href="wrappers/motorControl/left_leg-mc_remapper.xml" disabled_by="disable_left_leg" enabled_by="remapper_no_jtcvc" />

<xi:include href="wrappers/motorControl/right_arm-mc_wrapper.xml" disabled_by="disable_right_arm" />
<xi:include href="wrappers/motorControl/right_arm-mc_remapper.xml" disabled_by="disable_right_arm" />
<xi:include href="wrappers/motorControl/right_leg-mc_remapper-jtcvc.xml" disabled_by="disable_right_leg disable_jtcvc" />
<xi:include href="wrappers/motorControl/right_leg-mc_remapper.xml" disabled_by="disable_right_leg" enabled_by="remapper_no_jtcvc" />

<xi:include href="wrappers/motorControl/right_arm-mc_wrapper.xml" disabled_by="disable_right_arm" />
<xi:include href="wrappers/motorControl/left_arm-mc_wrapper.xml" disabled_by="disable_left_arm" />
<xi:include href="wrappers/motorControl/left_arm-mc_remapper.xml" disabled_by="disable_left_arm" />

<xi:include href="wrappers/motorControl/right_arm-mc_remapper-jtcvc.xml" disabled_by="disable_right_arm disable_jtcvc" />
<xi:include href="wrappers/motorControl/right_arm-mc_remapper.xml" disabled_by="disable_right_arm" enabled_by="remapper_no_jtcvc" />

<xi:include href="wrappers/motorControl/left_arm-mc_remapper-jtcvc.xml" disabled_by="disable_left_arm disable_jtcvc" />
<xi:include href="wrappers/motorControl/left_arm-mc_remapper.xml" disabled_by="disable_left_arm" enabled_by="remapper_no_jtcvc" />

<xi:include href="wrappers/motorControl/torso-mc_wrapper.xml" disabled_by="disable_torso" />
<xi:include href="wrappers/motorControl/torso-mc_remapper.xml" disabled_by="disable_torso" />

<xi:include href="wrappers/motorControl/torso-mc_remapper-jtcvc.xml" disabled_by="disable_torso disable_jtcvc" />
<xi:include href="wrappers/motorControl/torso-mc_remapper.xml" disabled_by="disable_torso" enabled_by="remapper_no_jtcvc" />

<xi:include href="wrappers/motorControl/head-mc_wrapper.xml" disabled_by="disable_head" />
<xi:include href="wrappers/motorControl/head-mc_remapper.xml" disabled_by="disable_head" />
Expand Down Expand Up @@ -68,7 +76,7 @@

<!-- FT SENSORS -->
<xi:include href="hardware/FT/left_arm-eb2-j0_1-strain.xml" disabled_by="disable_left_arm" />
<xi:include href="hardware/FT/right_arm-eb1-j0_1-strain.xml" disabled_by="disable_right_arm" />
<!-- <xi:include href="hardware/FT/right_arm-eb1-j0_1-strain.xml" disabled_by="disable_right_arm" /> -->
<xi:include href="hardware/FT/left_leg-eb9-j4_5-strain.xml" disabled_by="disable_left_leg" />
<xi:include href="hardware/FT/right_leg-eb7-j4_5-strain.xml" disabled_by="disable_right_leg" />
<xi:include href="hardware/FT/left_leg-eb8-j0_3-strain.xml" disabled_by="disable_left_leg" />
Expand All @@ -80,7 +88,7 @@

<!-- FT SENSORS - MULTIPLE ANALOG SENSOR SERVERS -->
<xi:include href="wrappers/FT/left_arm-FT_wrapper.xml" disabled_by="disable_left_arm" />
<xi:include href="wrappers/FT/right_arm-FT_wrapper.xml" disabled_by="disable_right_arm" />
<!-- <xi:include href="wrappers/FT/right_arm-FT_wrapper.xml" disabled_by="disable_right_arm" /> -->
<xi:include href="wrappers/FT/left_leg-FT_wrapper.xml" disabled_by="disable_left_leg" />
<xi:include href="wrappers/FT/right_leg-FT_wrapper.xml" disabled_by="disable_right_leg" />

Expand All @@ -100,15 +108,15 @@

<!-- FT SENSORS - IMU -->
<xi:include href="hardware/inertials/left_arm-eb2-j0_1-inertial.xml" disabled_by="disable_left_arm" />
<xi:include href="hardware/inertials/right_arm-eb1-j0_1-inertial.xml" disabled_by="disable_right_arm" />
<!-- <xi:include href="hardware/inertials/right_arm-eb1-j0_1-inertial.xml" disabled_by="disable_right_arm" /> -->
<xi:include href="hardware/inertials/left_leg-eb8-j0_3-inertial.xml" disabled_by="disable_left_leg" />
<xi:include href="hardware/inertials/right_leg-eb6-j0_3-inertial.xml" disabled_by="disable_right_leg" />
<xi:include href="hardware/inertials/left_leg-eb9-j4_5-inertial.xml" disabled_by="disable_left_leg" />
<xi:include href="hardware/inertials/right_leg-eb7-j4_5-inertial.xml" disabled_by="disable_right_leg" />

<!-- FT SENSORS - IMU - MULTIPLE ANALOG SENSOR SERVERS -->
<xi:include href="wrappers/inertials/left_arm-imu_wrapper.xml" disabled_by="disable_left_arm" />
<xi:include href="wrappers/inertials/right_arm-imu_wrapper.xml" disabled_by="disable_right_arm" />
<!-- <xi:include href="wrappers/inertials/right_arm-imu_wrapper.xml" disabled_by="disable_right_arm" /> -->
<xi:include href="wrappers/inertials/left_leg-imu_wrapper.xml" disabled_by="disable_left_leg" />
<xi:include href="wrappers/inertials/right_leg-imu_wrapper.xml" disabled_by="disable_right_leg" />
<xi:include href="wrappers/inertials/left_foot-imu_wrapper.xml" disabled_by="disable_left_leg" />
Expand Down Expand Up @@ -141,6 +149,17 @@
<xi:include href="wrappers/FT/left_foot-FT_nws_ros2.xml" enabled_by="enable_ros2" disabled_by="disable_ros2 disable_left_leg" />
<xi:include href="wrappers/FT/right_foot-FT_nws_ros2.xml" enabled_by="enable_ros2" disabled_by="disable_ros2 disable_right_leg" />

<!-- motor controllers jtcvc -->
<xi:include href="wrappers/motorControl/left_arm-eb2-j0_1-jtcvc.xml" disabled_by="disable_left_arm disable_jtcvc" />
<xi:include href="wrappers/motorControl/left_arm-eb4-j2_3-jtcvc.xml" disabled_by="disable_left_arm disable_jtcvc" />
<xi:include href="wrappers/motorControl/right_arm-eb1-j0_1-jtcvc.xml" disabled_by="disable_right_arm disable_jtcvc" />
<xi:include href="wrappers/motorControl/right_arm-eb3-j2_3-jtcvc.xml" disabled_by="disable_right_arm disable_jtcvc" />
<xi:include href="wrappers/motorControl/torso-eb5-j0_2-jtcvc.xml" disabled_by="disable_torso disable_jtcvc" />
<xi:include href="wrappers/motorControl/right_leg-eb6-j0_3-jtcvc.xml" disabled_by="disable_right_leg disable_jtcvc" />
<xi:include href="wrappers/motorControl/right_leg-eb7-j4_5-jtcvc.xml" disabled_by="disable_right_leg disable_jtcvc" />
<xi:include href="wrappers/motorControl/left_leg-eb8-j0_3-jtcvc.xml" disabled_by="disable_left_leg disable_jtcvc" />
<xi:include href="wrappers/motorControl/left_leg-eb9-j4_5-jtcvc.xml" disabled_by="disable_left_leg disable_jtcvc" />

<!-- ESTIMATORS -->
<xi:include href="estimators/wholebodydynamics.xml" disabled_by="disable_wholebodynamics disable_head disable_torso disable_right_arm disable_left_arm disable_right_leg disable_left_leg" />

Expand Down
2 changes: 1 addition & 1 deletion ergoCubSN001/estimators/wholebodydynamics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<elem name="l_leg_ft_sensors">left_leg-FT_remapper</elem>
<elem name="r_leg_ft_sensors">right_leg-FT_remapper</elem>
<elem name="l_arm_ft_sensors">left_arm-eb2-j0_1-strain</elem>
<elem name="r_arm_ft_sensors">right_arm-eb1-j0_1-strain</elem>
<!-- <elem name="r_arm_ft_sensors">right_arm-eb1-j0_1-strain</elem> -->
</paramlist>
</action>

Expand Down
41 changes: 41 additions & 0 deletions ergoCubSN001/extra/scripts/additionalCommands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,20 @@ alias list-windows='DISPLAY=:0 wmctrl -lp'

alias close-window='DISPLAY=:0 wmctrl -c'

check-interface-powersave() {
if [ "$#" -ne 1 ]; then
echo "Usage: check-interface-powersave <interface_name>"
return 1
fi

echo "$1: $(iw $1 get power_save)"
}

_WIFI_INTERFACE=`iw dev | awk '$1=="Interface"{print $2}'`
alias disable-wifi-powersave="sudo iw dev ${_WIFI_INTERFACE} set power_save off"
alias check-wifi-powersave="check-interface-powersave ${_WIFI_INTERFACE}"
unset _WIFI_INTERFACE
alias restart-wifi="sudo nmcli radio wifi off && sleep 5 && sudo nmcli radio wifi on"

function set-blf-webcam() {
# Check if the camera number is provided
Expand Down Expand Up @@ -85,6 +96,30 @@ gerDevice/app/robots/${YARP_ROBOT_NAME}/blf-yarp-robot-logger-interfaces/webcams
cd -
}

alias list-webcams="v4l2-ctl --list-devices"

set-yarp-namespace() {
local namespace="$1"
local hosts=("10.0.2.14" "ergocub-torso" "ergocub-head")

if [[ -z "$namespace" ]]; then
echo "Usage: set_namespace <namespace>"
return 1
fi

for host in "${hosts[@]}"; do
echo "------------------------------"
echo "Setting namespace on $host..."
ssh "$host" "yarp namespace $namespace"

if [[ $? -eq 0 ]]; then
echo "[$host] Namespace set successfully."
else
echo "[$host] ERROR: Failed to set namespace."
fi
done
}


GREEN='\033[0;32m'
NC='\033[0m' # No Color
Expand All @@ -103,10 +138,16 @@ ${GREEN}close-window${NC} Close a window given the Window ID.
${GREEN}dcmFolder${NC} Go to the robot walking configuration files.
${GREEN}goToBuildSuperbuild${NC} Go to the corresponding build folder of the robotology superbuild.
${GREEN}disable-wifi-powersave${NC} Disable the WiFi powersave.
${GREEN}check-wifi-powersave${NC} Checks the WiFi powersave.
${GREEN}restart-wifi${NC} Restart the WiFi radio.
${GREEN}set-blf-webcam${NC} Bash script that can be used to set the number of the blf webcam in the logger. IT WILL RECOMPILE AND INSTALL BLF.
${GREEN}list-webcams${NC} List the available webcams.
${GREEN}set-yarp-namespace${NC} Set the yarp namespace on the laptop, ergocub-torso, and ergocub-head.
${GREEN}runYarpRobotInterface${NC} Run yarprobotinterface with whole-body-dynamics."'

if [ "$PS1" ]; then
check-wifi-powersave

echo -e "Type ${GREEN}helpRobot${NC} for a list of useful commands."

# automatic terminator title
Expand Down
2 changes: 1 addition & 1 deletion ergoCubSN001/extra/scripts/checkConfigurationFiles.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

diff -r --exclude="CMakeLists.txt" $ROBOTOLOGY_SUPERBUILD_SOURCE_DIR/src/robots-configuration/$YARP_ROBOT_NAME $ROBOTOLOGY_SUPERBUILD_SOURCE_DIR/build/install/share/ICUBcontrib/robots/$YARP_ROBOT_NAME | grep -ve dcm_walking -ve extra > /tmp/diff_out 2>&1
diff -r --exclude="CMakeLists.txt" --exclude="*.onnx" $ROBOTOLOGY_SUPERBUILD_SOURCE_DIR/src/robots-configuration/$YARP_ROBOT_NAME $ROBOTOLOGY_SUPERBUILD_SOURCE_DIR/build/install/share/ICUBcontrib/robots/$YARP_ROBOT_NAME | grep -ve dcm_walking -ve extra > /tmp/diff_out 2>&1

GREEN='\033[0;32m'
RED='\033[0;31m'
Expand Down
10 changes: 10 additions & 0 deletions ergoCubSN001/hardware/electronics/head-eb20-j0_1-eln.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
<param name="maxTimeOfDOactivity"> 300 </param>
<param name="maxTimeOfTXactivity"> 300 </param>
<param name="TXrateOfRegularROPs"> 1 </param>

<group name="LOGGING">
<group name="IMMEDIATE">
<param name="emitRXDOTXoverflow"> false </param>
</group>
<group name="PERIODIC">
<param name="period"> 10.0 </param>
<param name="emitRXDOTXstatistics"> true </param>
</group>
</group>
</group>
</group>

Expand Down
Loading