For information on the latest version, please have a look at 1.33.5.
set_tool_shape (Manual Mode)
This section explains how to use set_tool_shape in Manual mode during system setup to activate a registered tool shape (the geometric model of the tool attached to the robot).
Tool shape information is used by the controller for collision checks, workspace monitoring, simulation alignment, and improved motion planning.
Available in Manual mode. In any other mode the function returns false and prints this command can only be used in manual mode. please change to manual mode as robot mode. The mode check uses the value returned by get_robot_mode.
Caution
On a real robot the safety board also refuses the call while the robot is moving; the motion is quick-stopped and a running program is stopped.
Typical usage
Register the tool’s 3D profile for workspace/layered safety monitoring.
Improve collision avoidance accuracy in complex environments.
Match virtual tool geometry in simulators (DART Platform, OEM software).
Update geometry when changing gripper fingers or tool attachments.
Note
TOOL_SHAPE data typically includes size, dimensions, and shape type.
Shape definition must correspond to the active tool set via
set_tool.Updating shape during motion is not recommended; apply at safe poses.
Example: Setting the Shape for a Parallel Gripper
// Activate the tool shape registered as "GRIPPER_BOX"
if (!drfl.set_tool_shape("GRIPPER_BOX")) {
printf("Failed to set tool shape.\n");
return -1;
}
printf("Tool shape updated successfully.\n");
In this example, the tool shape registered as GRIPPER_BOX is activated to improve workspace monitoring accuracy.