class documentation

class HoldingRegisterDataBlock(DataBlock):

View In Hierarchy

Undocumented

Static Method convert_register_to_string 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_string_to_register 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_pose_for_registers_from_rel_pose Returns a list of 16bits int representing the relative pose of type ObjectPose
Static Method get_pose_for_registers_from_target_pose Returns a list of 16bits int representing the target_pose of type RobotState
Static Method object_pose_to_list Undocumented
Static Method robot_state_msg_to_list Undocumented
Static Method update_point 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_pose 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_learning_mode Undocumented
Method analog_write Undocumented
Method close_gripper Undocumented
Method close_gripper_command Undocumented
Method control_conveyor and direction HR_CONTROL_CONVEYOR_DIRECTION
Method detect_object Find the first detected object according to requested shape and color.
Method enable_tcp 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_target_pose_from_cam 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_target_pose_from_rel 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_ws_ratio Give the length over width ratio of a certain workspace
Method move_joints Undocumented
Method move_joints_command Undocumented
Method move_linear_pose Undocumented
Method move_linear_pose_command Undocumented
Method move_pose Undocumented
Method move_pose_command Undocumented
Method move_to_object Same as get_target_pose_from_cam but directly moves to this position
Method open_gripper Undocumented
Method open_gripper_command Undocumented
Method ping_and_set_conveyor 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_command Undocumented
Method pull_air_vacuum_pump Undocumented
Method push_air_vacuum_pump Undocumented
Method remove_conveyor_with_id Remove (unset) conveyor with ID given at HR_CONTROL_CONVEYOR_ID :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum :rtype:
Method request_new_calibration Undocumented
Method reset_result_registers Empty results register at the beginning of a vision method to delete old results
Method set_tcp Activates the TCP function (Tool Center Point) and defines the transformation between the tool_link frame and the TCP frame.
Method setValues Undocumented
Method setValuesOffset Undocumented
Method start_auto_calibration Undocumented
Method start_manual_calibration Undocumented
Method stop_conveyor Stop conveyor with ID given at HR_CONTROL_CONVEYOR_ID :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum :rtype:
Method stop_current_command Undocumented
Method store_pose_shape_color_in_registers 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_selected_tool_id Undocumented
Method update_height_offset Undocumented
Method update_status Undocumented
Method update_tool Undocumented
Method update_vision_color Update self.vision_color according to the requested color. :param value: register value for color :type value: int
Method update_vision_shape Update self.vision_color according to the requested type. :param value: register values for type :type value: int
Method update_workspace_name Undocumented
Method update_x_rel Undocumented
Method update_y_rel Undocumented
Method update_yaw_rel Undocumented
Method vision_pick 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_action_client Undocumented
Instance Variable current_tool_id Undocumented
Instance Variable execution_thread Undocumented
Instance Variable height_offset Undocumented
Instance Variable is_action_client_running Undocumented
Instance Variable list_enum_color Undocumented
Instance Variable list_enum_color_nb Undocumented
Instance Variable list_enum_shape_nb Undocumented
Instance Variable list_enum_type Undocumented
Instance Variable list_id_grippers Undocumented
Instance Variable null_robot_state Undocumented
Instance Variable python_ros_wrapper Undocumented
Instance Variable vision_color Undocumented
Instance Variable vision_shape Undocumented
Instance Variable workspace_name Undocumented
Instance Variable x_rel Undocumented
Instance Variable y_rel Undocumented
Instance Variable yaw_rel Undocumented
Method __set_command_done 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_command_in_progress Set a command as in progress and refresh the last result :return: :rtype:

Inherited from DataBlock:

Static Method call_ros_service Undocumented
Method getValuesOffset Undocumented
@staticmethod
def convert_register_to_string(values):

Convert a list of registers to a string value :param values: registers value :type values: list[int] :return: A string :rtype: str

@staticmethod
def convert_string_to_register(value):

Convert a string value to a list of registers :param value: A string :type value: str :return: registers value :rtype: list[int]

@staticmethod
def get_pose_for_registers_from_rel_pose(obj_pose_rel):

Returns a list of 16bits int representing the relative pose of type ObjectPose

Parameters
obj_pose_rel:ObjectPosea pose
Returns
list[int]pose values to store in register
@staticmethod
def get_pose_for_registers_from_target_pose(target_pose):

Returns a list of 16bits int representing the target_pose of type RobotState

Parameters
target_pose:RobotStatea pose
Returns
list[int]pose values to store in register
@staticmethod
def object_pose_to_list(object_pose):

Undocumented

@staticmethod
def robot_state_msg_to_list(robot_state):

Undocumented

@staticmethod
def update_point(point_obj, point_value):

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]

@staticmethod
def update_pose(pose_obj, pose_value):

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]

def activate_learning_mode(self, activate):

Undocumented

def analog_write(self, values):

Undocumented

def close_gripper(self, gripper_id, speed):

Undocumented

def close_gripper_command(self):

Undocumented

def control_conveyor(self):

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
def detect_object(self, sub_called=False):

Find the first detected object according to requested shape and color.

Parameters
sub_called:boolTrue 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
def enable_tcp(self, 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.

Parameters
enable:BoolTrue to enable, False otherwise.
Returns
(int, str)status, message
def get_target_pose_from_cam(self, sub_called=False):

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_called:boolTrue if the function is called by another method, False otherwise
Returns
int, bool, RobotState, str, strIf 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
def get_target_pose_from_rel(self, height_offset=None, x_rel=None, y_rel=None, yaw_rel=None, sub_called=False):

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_offset:intheight offset to workspace
x_rel:floatx component of the relative pose
y_rel:floaty component of the relative pose
yaw_rel:floatyaw component of the relative pose
sub_called:boolTrue if the function is called by another method, False otherwise
Returns
int, RobotStateIf 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
def get_ws_ratio(self, values):

Give the length over width ratio of a certain workspace

Parameters
values:list[int]workspace name
Returns
int, floatCommandStatus, ratio
def move_joints(self, joints):

Undocumented

def move_joints_command(self):

Undocumented

def move_linear_pose(self, pose):

Undocumented

def move_linear_pose_command(self):

Undocumented

def move_pose(self, pose):

Undocumented

def move_pose_command(self):

Undocumented

def move_to_object(self):

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
def open_gripper(self, gripper_id, speed):

Undocumented

def open_gripper_command(self):

Undocumented

def ping_and_set_conveyor(self):

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:

def process_command(self, address, values):

Undocumented

def pull_air_vacuum_pump(self):

Undocumented

def push_air_vacuum_pump(self):

Undocumented

def remove_conveyor_with_id(self):

Remove (unset) conveyor with ID given at HR_CONTROL_CONVEYOR_ID :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum :rtype:

def request_new_calibration(self):

Undocumented

def reset_result_registers(self, address_list):

Empty results register at the beginning of a vision method to delete old results

def set_tcp(self, tcp_rpy_raw_values):

Activates the TCP function (Tool Center Point) and defines the transformation between the tool_link frame and the TCP frame.

Parameters
tcp_rpy_raw_values:list[float][x, y, z, roll, pitch, yaw] as raw values
Returns
(int, str)status, message
def setValues(self, address, values):

Undocumented

def setValuesOffset(self, address, values):
def start_auto_calibration(self):

Undocumented

def start_manual_calibration(self):

Undocumented

def stop_conveyor(self):

Stop conveyor with ID given at HR_CONTROL_CONVEYOR_ID :return: set HR_LAST_ROBOT_CMD_RESULT to CommandStatus Enum :rtype:

def stop_current_command(self):

Undocumented

def store_pose_shape_color_in_registers(self, obj_pose, obj_type_str, obj_color_str):

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

def sub_selected_tool_id(self, msg):

Undocumented

def update_height_offset(self, value):

Undocumented

def update_status(self, status):

Undocumented

def update_tool(self):

Undocumented

def update_vision_color(self, value):

Update self.vision_color according to the requested color. :param value: register value for color :type value: int

def update_vision_shape(self, value):

Update self.vision_color according to the requested type. :param value: register values for type :type value: int

def update_workspace_name(self, values):

Undocumented

def update_x_rel(self, value):

Undocumented

def update_y_rel(self, value):

Undocumented

def update_yaw_rel(self, value):

Undocumented

def vision_pick(self):

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
cmd_action_client =

Undocumented

current_tool_id =

Undocumented

execution_thread =

Undocumented

height_offset =

Undocumented

is_action_client_running: bool =

Undocumented

list_enum_color =

Undocumented

list_enum_color_nb =

Undocumented

list_enum_shape_nb =

Undocumented

list_enum_type =

Undocumented

list_id_grippers: list[int] =

Undocumented

null_robot_state =

Undocumented

python_ros_wrapper =

Undocumented

vision_color =

Undocumented

vision_shape =

Undocumented

workspace_name =

Undocumented

x_rel =

Undocumented

y_rel =

Undocumented

yaw_rel =

Undocumented

def __set_command_done(self, status_result):

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:

def __set_command_in_progress(self):

Set a command as in progress and refresh the last result :return: :rtype: