class HoldingRegisterDataBlock(DataBlock):
Undocumented
| Static Method | convert |
Convert a list of registers to a string value :param values: registers value :type values: list[int] :return: A string :rtype: str |
| Static Method | convert |
Convert a string value to a list of registers :param value: A string :type value: str :return: registers value :rtype: list[int] |
| Static Method | get |
Returns a list of 16bits int representing the relative pose of type ObjectPose |
| Static Method | get |
Returns a list of 16bits int representing the target_pose of type RobotState |
| Static Method | object |
Undocumented |
| Static Method | robot |
Undocumented |
| Static Method | update |
Update a Point given registers values :param point_obj: object point to update :type point_obj: Point :param point_value: new point value from 16 bits int registers :type point_value: list[int] |
| Static Method | update |
Update a RobotState pose given registers values :param pose_obj: object pose to update :type pose_obj: RobotState :param pose_value: new pose value from 16 bits int registers :type pose_value: list[int]... |
| Method | __init__ |
Undocumented |
| Method | activate |
Undocumented |
| Method | analog |
Undocumented |
| Method | close |
Undocumented |
| Method | close |
Undocumented |
| Method | control |
and direction HR_CONTROL_CONVEYOR_DIRECTION |
| Method | detect |
Find the first detected object according to requested shape and color. |
| Method | enable |
Enables or disables the TCP function (Tool Center Point). If activation is requested, the last recorded TCP value will be applied. The default value depends on the gripper equipped. If deactivation is requested, the TCP will be coincident with the tool_link. |
| Method | get |
First detects the specified object using the camera and then returns the robot pose in which the object can be picked with the current tool |
| Method | get |
Given a pose (x_rel, y_rel, yaw_rel) relative to a workspace, this function returns the robot pose in which the current tool will be able to pick an object at this pose. The height_offset argument (in m) defines how high the tool will hover over the workspace... |
| Method | get |
Give the length over width ratio of a certain workspace |
| Method | move |
Undocumented |
| Method | move |
Undocumented |
| Method | move |
Undocumented |
| Method | move |
Undocumented |
| Method | move |
Undocumented |
| Method | move |
Undocumented |
| Method | move |
Same as get_target_pose_from_cam but directly moves to this position |
| Method | open |
Undocumented |
| Method | open |
Undocumented |
| Method | ping |
Scan for a conveyor connected and return it's ID (attribute a new ID internally) :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum && HR_LAST_ROBOT_CMD_DATA_RESULT to the conveyor_id on result == CommandStatus... |
| Method | process |
Undocumented |
| Method | pull |
Undocumented |
| Method | push |
Undocumented |
| Method | remove |
Remove (unset) conveyor with ID given at HR_CONTROL_CONVEYOR_ID :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum :rtype: |
| Method | request |
Undocumented |
| Method | reset |
Empty results register at the beginning of a vision method to delete old results |
| Method | set |
Activates the TCP function (Tool Center Point) and defines the transformation between the tool_link frame and the TCP frame. |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | start |
Undocumented |
| Method | start |
Undocumented |
| Method | stop |
Stop conveyor with ID given at HR_CONTROL_CONVEYOR_ID :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum :rtype: |
| Method | stop |
Undocumented |
| Method | store |
Store pose, shape and color of object detected in appropriate registers. If obj_pose is a null array/object, set [HR_VISION_TARGET_POSE: HR_VISION_TARGET_POSE+5] to 0. If obj_pose is None, those registers are not updated... |
| Method | sub |
Undocumented |
| Method | update |
Undocumented |
| Method | update |
Undocumented |
| Method | update |
Undocumented |
| Method | update |
Update self.vision_color according to the requested color. :param value: register value for color :type value: int |
| Method | update |
Update self.vision_color according to the requested type. :param value: register values for type :type value: int |
| Method | update |
Undocumented |
| Method | update |
Undocumented |
| Method | update |
Undocumented |
| Method | update |
Undocumented |
| Method | vision |
Picks the specified object from the workspace. This function has multiple phases: 1. detect object using the camera 2. prepare the current tool for picking 3. approach the object 4. move down to the correct picking pose 5... |
| Instance Variable | cmd |
Undocumented |
| Instance Variable | current |
Undocumented |
| Instance Variable | execution |
Undocumented |
| Instance Variable | height |
Undocumented |
| Instance Variable | is |
Undocumented |
| Instance Variable | list |
Undocumented |
| Instance Variable | list |
Undocumented |
| Instance Variable | list |
Undocumented |
| Instance Variable | list |
Undocumented |
| Instance Variable | list |
Undocumented |
| Instance Variable | null |
Undocumented |
| Instance Variable | python |
Undocumented |
| Instance Variable | vision |
Undocumented |
| Instance Variable | vision |
Undocumented |
| Instance Variable | workspace |
Undocumented |
| Instance Variable | x |
Undocumented |
| Instance Variable | y |
Undocumented |
| Instance Variable | yaw |
Undocumented |
| Method | __set |
Set a command as completed and store the result :param status_result: Status stored to HR_LAST_ROBOT_CMD_RESULT :type status_result: :return: :rtype: |
| Method | __set |
Set a command as in progress and refresh the last result :return: :rtype: |
Inherited from DataBlock:
| Static Method | call |
Undocumented |
| Method | get |
Undocumented |
Convert a list of registers to a string value :param values: registers value :type values: list[int] :return: A string :rtype: str
Convert a string value to a list of registers :param value: A string :type value: str :return: registers value :rtype: list[int]
Returns a list of 16bits int representing the relative pose of type ObjectPose
| Parameters | |
| obj | a pose |
| Returns | |
| list[int] | pose values to store in register |
Returns a list of 16bits int representing the target_pose of type RobotState
| Parameters | |
| target | a pose |
| Returns | |
| list[int] | pose values to store in register |
Update a Point given registers values :param point_obj: object point to update :type point_obj: Point :param point_value: new point value from 16 bits int registers :type point_value: list[int]
Update a RobotState pose given registers values :param pose_obj: object pose to update :type pose_obj: RobotState :param pose_value: new pose value from 16 bits int registers :type pose_value: list[int]
- Control the conveyor with ID given at HR_CONTROL_CONVEYOR_ID with speed HR_CONTROL_CONVEYOR_SPEED
- and direction HR_CONTROL_CONVEYOR_DIRECTION
| Returns | |
| set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum | |
Find the first detected object according to requested shape and color.
| Parameters | |
| sub | True if the function is called by another method, False otherwise |
| Returns | |
| if sub_called is False : set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum, set HR_VISION_TARGET_POSE to object's relative pose, set HR_VISION_SHAPE_FOUND to object's type, set HR_VISION_COLOR_FOUND to object's color Else if sub_called is True, return : CommandStatus, object's pose, type and color | |
Enables or disables the TCP function (Tool Center Point). If activation is requested, the last recorded TCP value will be applied. The default value depends on the gripper equipped. If deactivation is requested, the TCP will be coincident with the tool_link.
| Parameters | |
| enable:Bool | True to enable, False otherwise. |
| Returns | |
| (int, str) | status, message |
First detects the specified object using the camera and then returns the robot pose in which the object can be picked with the current tool
| Parameters | |
| sub | True if the function is called by another method, False otherwise |
| Returns | |
| int, bool, RobotState, str, str | If sub_called is False : set HR_VISION_TARGET_POSE to target pose, set HR_VISION_SHAPE_FOUND to object's type, set HR_VISION_COLOR_FOUND to object's color and set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum Else : A CommandStatus, a boolean obj_found, a resulting robot pose, type, color of object |
Given a pose (x_rel, y_rel, yaw_rel) relative to a workspace, this function returns the robot pose in which the current tool will be able to pick an object at this pose. The height_offset argument (in m) defines how high the tool will hover over the workspace. If height_offset = 0, the tool will nearly touch the workspace.
| Parameters | |
| height | height offset to workspace |
| x | x component of the relative pose |
| y | y component of the relative pose |
| yaw | yaw component of the relative pose |
| sub | True if the function is called by another method, False otherwise |
| Returns | |
| int, RobotState | If sub_called is False : set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum and set HR_VISION_TARGET_POSE to the target pose Else : a CommandStatus and a robot pose |
Give the length over width ratio of a certain workspace
| Parameters | |
| values:list[int] | workspace name |
| Returns | |
| int, float | CommandStatus, ratio |
Same as get_target_pose_from_cam but directly moves to this position
| Returns | |
| set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum, set HR_VISION_SHAPE_FOUND to object's type, set HR_VISION_COLOR_FOUND to object's color | |
Scan for a conveyor connected and return it's ID (attribute a new ID internally) :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum && HR_LAST_ROBOT_CMD_DATA_RESULT to the conveyor_id on result == CommandStatus.SUCCESS :rtype:
Remove (unset) conveyor with ID given at HR_CONTROL_CONVEYOR_ID :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum :rtype:
Activates the TCP function (Tool Center Point) and defines the transformation between the tool_link frame and the TCP frame.
| Parameters | |
| tcp | [x, y, z, roll, pitch, yaw] as raw values |
| Returns | |
| (int, str) | status, message |
Stop conveyor with ID given at HR_CONTROL_CONVEYOR_ID :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum :rtype:
Store pose, shape and color of object detected in appropriate registers. If obj_pose is a null array/object, set [HR_VISION_TARGET_POSE: HR_VISION_TARGET_POSE+5] to 0. If obj_pose is None, those registers are not updated. If obj_type_str (or obj_color_str) is None, HR_VISION_SHAPE_FOUND (or HR_VISION_COLOR_FOUND) is not updated. If obj_type_str (or obj_color_str) is ShapeRequest.NONE.name (or ColorRequest.NONE.name), set the register to 0.
Registers are set to 0 if no object was detected. They are not updated in case the function used doesn't return any information on the variable.
obj_type_str and obj_color_str should be string, like 'ANY' or 'BLUE'. :param obj_pose: a pose :type obj_pose: either a RobotState, an ObjectPose or an array of 6x0. If None, the register is not updated. :param obj_type_str: name of the object type, corresponding to a name in ShapeRequest :type obj_type_str: str or None :param obj_color_str: name of the object color, corresponding to a name in ColorRequest :type obj_color_str: str or None
Update self.vision_color according to the requested color. :param value: register value for color :type value: int
Update self.vision_color according to the requested type. :param value: register values for type :type value: int
Picks the specified object from the workspace. This function has multiple phases: 1. detect object using the camera 2. prepare the current tool for picking 3. approach the object 4. move down to the correct picking pose 5. actuate the current tool 6. lift the object :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum, set HR_VISION_SHAPE_FOUND to object's type, set
HR_VISION_COLOR_FOUND to object's color
| Returns | |
| Undocumented | |
Set a command as completed and store the result :param status_result: Status stored to HR_LAST_ROBOT_CMD_RESULT :type status_result: :return: :rtype: