libhsrutil
Library for utility functions of HSR.
- class libhsrutil.LibHSRUtil(libutil, libtf)
Bases:
objectHSR Utility library for WRS simlator.
- delete()
- dict_to_hsr_joints(joints)
- get_robot_position_on_map()
Get the current positions on map.
- hsr_joints_to_dict(hsr_joints)
- is_in_place(place, tolerance)
Determine if the robot is in a specified place.
- Parameters
place (list, geometry_msgs/Pose2D) – Place positions.
tolerance (list, geometry_msgs/Pose2D) – Tolerances.
- Returns
Whether or not the goal is reached.
- Return type
bool
- wait_goal_all_joints(joints, pos_tolerance=0.01, arm_ori_tolerance=0.017, head_ori_tolerance=0.017, arm_timeout=5.0, head_timeout=5.0)
Waiting until arm and head joints reach the target value.
- Parameters
joints (dict[str, float]) – Target value each arm joint.
pos_tolerance (float, optional) – The tolerance of positions. Defaults to 0.01[m].
arm_ori_tolerance (float, optional) – The tolerance of arm orientations. Defaults to 0.017[rad].
head_ori_tolerance (float, optional) – The tolerance of head orientations. Defaults to 0.017[rad].
arm_timeout (float, optional) – Timeout time for arm. Defaults to 5.0[sec].
head_timeout (float, optional) – Timeout time for head. Defaults to 5.0[sec].
- Returns
Whether the target joint value was reached or not.
- Return type
tuple[bool]
- wait_goal_arm_joints(joints, pos_tolerance=0.01, ori_tolerance=0.017, timeout=5.0)
Waiting until arm joints reach the target value.
- Parameters
joints (dict[str, float]) – Target value each arm joint.
pos_tolerance (float, optional) – The tolerance of positions. Defaults to 0.01[m].
ori_tolerance (float, optional) – The tolerance of orientations. Defaults to 0.017[rad].
timeout (float, optional) – Timeout time. Defaults to 5.0[sec].
- Returns
Whether the target joint value was reached or not.
- Return type
bool
- wait_goal_head_joints(joints, ori_tolerance=0.017, timeout=5.0)
Waiting until head joints reach the target value.
- Parameters
joints (dict[str, float]) – Target value each head joint.
ori_tolerance (float, optional) – The tolerance of orientations. Defaults to 0.017[rad].
timeout (float, optional) – Timeout time. Defaults to 5.0[sec].
- Returns
Whether the target joint value was reached or not.
- Return type
bool