Organize hand models and launchers; use linear active joint mapping
This commit is contained in:
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
# MuJoCo O6 右手仿真桥
|
||||
# URDF 来源: /home/lxqs/下载/linkerhand_o6_right_O6_RIGHT_001_partial_zero_calibrated+copy.urdf
|
||||
# 默认订阅 /cb_right_hand_control_cmd(与 SDK / GUI 一致,6 维 SDK 0~255)
|
||||
# 发布 /sim/mujoco/o6/right/joint_state
|
||||
#
|
||||
# 用法:
|
||||
# ./hands/O6/scripts/run_o6_right_mujoco_plan.sh
|
||||
# ./hands/O6/scripts/run_o6_right_mujoco_plan.sh --pd-drive
|
||||
set -eo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
set +u
|
||||
# shellcheck disable=SC1091
|
||||
source /opt/ros/jazzy/setup.bash
|
||||
if [[ -f "$ROOT/install/setup.bash" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source "$ROOT/install/setup.bash"
|
||||
fi
|
||||
set -u
|
||||
|
||||
VENV_SITE="$ROOT/venv/lib/python3.12/site-packages"
|
||||
if [[ -d "$VENV_SITE" ]]; then
|
||||
export PYTHONPATH="$VENV_SITE${PYTHONPATH:+:$PYTHONPATH}"
|
||||
fi
|
||||
|
||||
PKG_SRC="$ROOT/src/linkerhand-sim/linker_hand_mujoco_ros2"
|
||||
export PYTHONPATH="$PKG_SRC${PYTHONPATH:+:$PYTHONPATH}"
|
||||
|
||||
XML="$PKG_SRC/linker_hand_mujoco_ros2/urdf/O6/linker_hand_o6_right/linker_hand_o6_right.xml"
|
||||
URDF="$PKG_SRC/linker_hand_mujoco_ros2/urdf/O6/linker_hand_o6_right/linkerhand_o6_right.urdf"
|
||||
if [[ ! -f "$XML" ]]; then
|
||||
echo "[error] missing O6 MJCF: $XML" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[o6-right] urdf=$URDF"
|
||||
echo "[o6-right] xml=$XML"
|
||||
echo "[o6-right] cmd-topic=/cb_right_hand_control_cmd"
|
||||
echo "[o6-right] sim-state=/sim/mujoco/o6/right/joint_state"
|
||||
echo "[o6-right] SDK 6ch: pitch, yaw, index, middle, ring, pinky"
|
||||
|
||||
exec python3 -m linker_hand_mujoco_ros2.o6_plan_bridge \
|
||||
--xml "$XML" \
|
||||
--node-name o6_mujoco_plan_bridge_right \
|
||||
--window-title "O6 right" \
|
||||
--cmd-topic /cb_right_hand_control_cmd \
|
||||
--sim-state-topic /sim/mujoco/o6/right/joint_state \
|
||||
--nominal-topic /retarget/o6/right/joint_target_nominal \
|
||||
--mapping g20_urdf \
|
||||
"$@"
|
||||
Reference in New Issue
Block a user