From dd3edee858a78768dfd42a213dbf24f3263e4925 Mon Sep 17 00:00:00 2001 From: Pierre Lecomte Date: Fri, 17 May 2024 16:44:13 +0200 Subject: [PATCH] update install script --- wx250s_custom/install.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/wx250s_custom/install.sh b/wx250s_custom/install.sh index 984b38d..a37b006 100755 --- a/wx250s_custom/install.sh +++ b/wx250s_custom/install.sh @@ -7,17 +7,26 @@ DIR=${DIR:-~/interbotix_ws} cp xs_common.py "$DIR/src/interbotix_ros_toolboxes/interbotix_xs_toolbox/interbotix_xs_modules/interbotix_xs_modules/xs_common/" cp wx250s_custom.yaml "$DIR/src/interbotix_ros_manipulators/interbotix_ros_xsarms/interbotix_xsarm_control/config/" +cp modes.yaml "$DIR/src/interbotix_ros_manipulators/interbotix_ros_xsarms/interbotix_xsarm_control/config/" cp -r wx250s_custom_meshes "$DIR/src/interbotix_ros_manipulators/interbotix_ros_xsarms/interbotix_xsarm_descriptions/meshes/" -VAR=`awk 'NR==451{ print; exit }' wx250s_custom.urdf.xacro` -VAR=`awk -F'"' '{print $2}' <<< $VAR` - -read -p "Enter the coordinate between wrist_rotate joint and SMA center in m [default: ${VAR}]:" COORD -COORD=${COORD:-${VAR}} - cp wx250s_custom.urdf.xacro wx250s_custom.urdf.xacro~ -sed -i "451s/$VAR/$COORD/" wx250s_custom.urdf.xacro~ +RPY=`awk 'NR==494{ print; exit }' wx250s_custom.urdf.xacro` +RPY=`awk -F'"' '{print $2}' <<< $RPY` + +read -p "Enter the Roll-Pitch-Yaw angles (in radians) between the wrist_rotate frame and SMA frame [default: ${RPY}]:" RPY2 +RPY2=${RPY2:-${RPY}} + +sed -i "494s/$RPY/$RPY2/" wx250s_custom.urdf.xacro~ + +XYZ=`awk 'NR==451{ print; exit }' wx250s_custom.urdf.xacro` +XYZ=`awk -F'"' '{print $2}' <<< $XYZ` + +read -p "Enter the translation vector (in m) between wrist_rotate frame and SMA frame in [default: ${XYZ}]:" XYZ2 +XYZ2=${XYZ2:-${XYZ}} + +sed -i "451s/$XYZ/$XYZ2/" wx250s_custom.urdf.xacro~ # convert to urdf file needed for kinematic_from_description package ros2 run xacro xacro wx250s_custom.urdf.xacro~ > out.urdf