hello-robot / stretch_tool_share

Alternative grippers, tools, and accessories for use with Stretch mobile manipulators from Hello Robot Inc.
Other
29 stars 13 forks source link

Prevent manual copy of tool_share descriptions #12

Closed youliangtan closed 5 months ago

youliangtan commented 1 year ago

If i understand correctly, in order to use one of the tool_share here (for example: stretch_dex_wrist), user will need to copy the meshes and urdf files in stretch_dex_wrist/stretch_description/ to the original stretch_description repo. Iam not sure if this practice is prone to error.

Just a proposal, if it is better to make it as such in the downstream pkg (e.g. stretch_custom_tool), to find the relative description file with $(find stretch_description)

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="stretch">
  <xacro:include filename="stretch_dex_wrist.xacro" />
  <xacro:include filename="$(find stretch_description)/urdf/stretch_main.xacro" />
  <xacro:include filename="$(find stretch_description)/urdf/stretch_aruco.xacro" />
  <xacro:include filename="$(find stretch_description)/urdf/stretch_d435i.xacro" />
  <xacro:include filename="$(find stretch_description)/urdf/stretch_laser_range_finder.xacro" />
  <xacro:include filename="$(find stretch_description)/urdf/stretch_respeaker.xacro" />
</robot>

I will understand if this will make things more complicated since user would need to edit the down stretch launch files that utilized stretch_description

hello-binit commented 1 year ago

Hi @youliangtan, here is some information on the current setup: the mesh/XACRO files for a specific tool are copied from this repo (the Stretch Tool Share) into the Stretch Description package. The stretch_description.xacro file is modified by the user to substitute the stretch_gripper.xacro with the XACRO file of the tool. Then, the XACRO is converted into a uncalibrated URDF, where 'uncalibrated' means that all of the link offsets are assumed to be perfect. In practice, robot have small deviations from the ideal design that must be measured and accounted for. Stretch Calibration runs a calibration procedure on the robot by collecting a dataset of measured offsets using the ArUco tags mounted to the robot and running an optimization on the dataset. The result is used to convert the uncalibrated URDF to a calibrated URDF, which is then used by Stretch's ROS packages.

Since this process is complicated, I'd welcome any ideas on how to simplify the process. I believe your recommendation here is to provide the stretch_description.xacro directly in the Tool Share itself, because it can reference the Stretch Description package via ROS. Is this correct?