Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Mingrui-Yu/retargeting
/ functions
Functions
390 in github.com/Mingrui-Yu/retargeting
⨍
Functions
390
◇
Types & classes
36
↓ 20 callers
Method
get_frame_pose
Args: frame_name: qpos: joint position (DoF)
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio.py:82
↓ 18 callers
Function
plotHistogram
Input: data: shape (n_x_axis, n_bars_per_x) scatter_points: shape (n_x_axis, n_bars_per_x, n_points_per_bar)
ws_ros2/src/retargeting_benchmark/src/utils/utils_plot.py:42
↓ 12 callers
Method
forward_qpos
Args: qpos: position of the actuated joints Return: qpos_f: position of all dof joints
ws_ros2/src/retargeting_benchmark/src/robot_adaptor.py:33
↓ 10 callers
Method
backward_jacobian
Args: jacobian: shape (n_batch, 6, n_dof) computed by self.robot_model Return: jacobian: shape (n_batch, 6, n
ws_ros2/src/retargeting_benchmark/src/robot_adaptor.py:53
↓ 10 callers
Method
get_frame_space_jacobian
(self, frame_name: str, qpos: Optional[np.ndarray] = None)
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio.py:93
↓ 9 callers
Method
compute_forward_kinematics
Update forward kinematics of joints and frames.
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio.py:65
↓ 8 callers
Method
compute_jacobians
(self, qpos: np.ndarray)
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio.py:77
↓ 8 callers
Function
new_element
Creates a new @tag element with attributes specified by @**kwargs. Args: tag (str): Type of element to create name (None or
ws_ros2/src/retargeting_benchmark/src/utils/utils_mjcf.py:222
↓ 8 callers
Function
quatXYZW2WXYZ
(quat_xyzw)
ws_ros2/src/retargeting_benchmark/src/utils/utils_calc.py:35
↓ 8 callers
Method
retarget
Call the optimization for retargeting. If arm_qpos is provided, it will be injected into ref_values.
ws_ros2/src/retargeting_benchmark/src/retarget_optimizer.py:55
↓ 8 callers
Method
sync_write
Writes values to a group of motors. Args: motor_ids: The motor IDs to write to. values: The values to write.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:276
↓ 8 callers
Function
unsigned_to_signed
Converts the given value from its unsigned representation.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:54
↓ 7 callers
Function
array2str
(arr)
ws_ros2/src/retargeting_benchmark/src/utils/mjcf_urdf_simple_converter.py:12
↓ 7 callers
Function
isometry3dToPosOri
(T)
ws_ros2/src/retargeting_benchmark/src/utils/utils_calc.py:154
↓ 7 callers
Method
update
(self, values)
ws_ros2/src/retargeting_benchmark/src/utils/misc.py:79
↓ 6 callers
Function
sigmoid
(x, c=0, w=1)
ws_ros2/src/retargeting_benchmark/src/bck/robot_teleoperation.py:34
↓ 5 callers
Method
__init__
Initializes a new client. Args: motor_ids: All motor IDs being used by the client. port: The Dynamixel device to talk
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:71
↓ 5 callers
Method
check_joint_dim
(self, q)
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio.py:62
↓ 5 callers
Method
connect
Connects to the Dynamixel motors. NOTE: This should be called after all DynamixelClients on the same process are created.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:150
↓ 5 callers
Method
detect
Args: Raw stream data provided by VisionProStreamer Return: num_box: 1 kp_pos_in_wrist_mano: hand
ws_ros2/src/retargeting_benchmark/src/vision_pro_detector.py:26
↓ 5 callers
Function
find_elements
Find all element(s) matching the requested @tag and @attributes. If @return_first is True, then will return the first element found matching
ws_ros2/src/retargeting_benchmark/src/utils/utils_mjcf.py:700
↓ 5 callers
Method
read
Reads data from the motors.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:385
↓ 5 callers
Method
write_desired_pos
Writes the given desired positions. Args: motor_ids: The motor IDs to write to. positions: The joint angles in radian
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:234
↓ 4 callers
Method
__init__
(self, robot_adaptor: RobotAdaptor, targets: Dict, params: Dict)
ws_ros2/src/retargeting_benchmark/src/retarget_optimizer.py:284
↓ 4 callers
Method
backward_qpos
qpos_doa to qpos_dof.
ws_ros2/src/retargeting_benchmark/src/robot_adaptor.py:46
↓ 4 callers
Function
sigmoid
(x, c=0, w=1)
ws_ros2/src/retargeting_benchmark/src/robot_teleoperation.py:34
↓ 4 callers
Method
sim_step
One low-level simulation step.
ws_ros2/src/retargeting_benchmark/src/robot_mujoco.py:93
↓ 4 callers
Function
skew
(a)
ws_ros2/src/retargeting_benchmark/src/utils/utils_calc.py:317
↓ 3 callers
Function
LEAPsim_limits
(type = "regular")
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/leap_hand_utils.py:25
↓ 3 callers
Function
LEAPsim_to_LEAPhand
(joints)
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/leap_hand_utils.py:53
↓ 3 callers
Function
array_to_string
Converts a numeric array into the string format in mujoco. Examples: [0, 1, 2] => "0 1 2" Args: array (n-array): Array
ws_ros2/src/retargeting_benchmark/src/utils/utils_mjcf.py:154
↓ 3 callers
Method
check_connected
Ensures the robot is connected.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:310
↓ 3 callers
Function
create_joint
if axis and jnt_range is None, create a fixed joint. otherwise, create a revolute joint
ws_ros2/src/retargeting_benchmark/src/utils/mjcf_urdf_simple_converter.py:41
↓ 3 callers
Method
disconnect
Disconnects from the Dynamixel device.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:175
↓ 3 callers
Method
get_frame_index
(self, name: str)
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio.py:54
↓ 3 callers
Method
get_joint_pos
Args: update: if False, it will return the current self.curr_joint_pos, but it does not mean the self.curr_jo
ws_ros2/src/retargeting_benchmark/src/robot_real.py:163
↓ 3 callers
Method
get_target_joint_pos
(self)
ws_ros2/src/retargeting_benchmark/src/robot_real.py:173
↓ 3 callers
Method
handle_packet_result
Handles the result from a communication request.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:317
↓ 3 callers
Function
jacoLeftBCHInverse
Function: Analytical inverse of jacoLeftBCH(). Support batch operation.
ws_ros2/src/retargeting_benchmark/src/utils/utils_calc.py:460
↓ 3 callers
Method
move_to_joint_pos
Move to the target joint position in a controllable speed. Args: exe_one_step: If True: only execute the
ws_ros2/src/retargeting_benchmark/src/robot_control.py:303
↓ 3 callers
Function
posRotMat2Isometry3d
(pos, rot_mat)
ws_ros2/src/retargeting_benchmark/src/utils/utils_calc.py:127
↓ 3 callers
Function
quatWXYZ2XYZW
(quat_wxyz)
ws_ros2/src/retargeting_benchmark/src/utils/utils_calc.py:24
↓ 3 callers
Function
quaternion_raw_multiply
Multiply two quaternions. Usual torch rules for broadcasting apply. Args: a: Quaternions as tensor of shape (..., 4), real part
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:388
↓ 3 callers
Method
set_joint_pos
Force set the joint positions (ignoring physics)
ws_ros2/src/retargeting_benchmark/src/robot_mujoco.py:102
↓ 3 callers
Method
step
(self, refresh=False)
ws_ros2/src/retargeting_benchmark/src/robot_real.py:138
↓ 3 callers
Function
transformPositions
input: positions: size of [-1, 3] target_frame_pose: matrix with size of [4, 4] target_frame_pose in curr
ws_ros2/src/retargeting_benchmark/src/utils/utils_calc.py:176
↓ 3 callers
Method
update_joint_pos
Update self.curr_joint_pos
ws_ros2/src/retargeting_benchmark/src/robot_real.py:154
↓ 2 callers
Function
_angle_from_tan
Extract the first or third Euler angle from the two members of the matrix which are positive constant times its sine and cosine. Args:
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:228
↓ 2 callers
Method
_get_data
Returns a copy of the data.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:425
↓ 2 callers
Function
_index_from_letter
(letter: str)
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:261
↓ 2 callers
Function
convert_to_string
Converts any type of {bool, int, float, list, tuple, array, string, np.str_} into an mujoco-xml compatible string. Note that an input str
ws_ros2/src/retargeting_benchmark/src/utils/utils_mjcf.py:186
↓ 2 callers
Function
create_body
create a body with given mass and inertia
ws_ros2/src/retargeting_benchmark/src/utils/mjcf_urdf_simple_converter.py:15
↓ 2 callers
Function
create_coordinate_frame
(size=1.0)
ws_ros2/src/retargeting_benchmark/src/utils/utils_open3d.py:28
↓ 2 callers
Function
create_dummy_body
create a dummy body with negligible mass and inertia
ws_ros2/src/retargeting_benchmark/src/utils/mjcf_urdf_simple_converter.py:31
↓ 2 callers
Method
ctrl_joint_pos
(self, target_joint_pos)
ws_ros2/src/retargeting_benchmark/src/robot_real.py:143
↓ 2 callers
Method
ctrl_joint_pos
(self, target_joint_pos)
ws_ros2/src/retargeting_benchmark/src/robot_control.py:379
↓ 2 callers
Method
draw_skeleton_on_image
( image, keypoint_2d: landmark_pb2.NormalizedLandmarkList, style="white" )
ws_ros2/src/retargeting_benchmark/src/single_hand_detector.py:43
↓ 2 callers
Function
estimate_frame_from_hand_points
Compute the 3D coordinate frame (orientation only) from detected 3d key points Args: keypoint_3d_array: keypoint3 detected from Media
ws_ros2/src/retargeting_benchmark/src/utils/utils_mano.py:75
↓ 2 callers
Function
get_coupled_joints_from_tendon
Assume the first joint in a fixed tendon is the active joint, and the second joint is the mimic joint. The setting of the tendon must be: coe
ws_ros2/src/retargeting_benchmark/src/utils/mjcf_urdf_simple_converter.py:77
↓ 2 callers
Method
get_joint_index
(self, name: str)
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio.py:50
↓ 2 callers
Method
get_joint_pos
(self, update=True)
ws_ros2/src/retargeting_benchmark/src/robot_control.py:382
↓ 2 callers
Method
hand_retarget
Args: hand_kps_in_wrist: wrist_pose_in_world:
ws_ros2/src/retargeting_benchmark/src/robot_teleoperation.py:318
↓ 2 callers
Method
hand_retarget
Args: hand_kps_in_wrist: wrist_pose_in_world:
ws_ros2/src/retargeting_benchmark/src/bck/robot_teleoperation.py:411
↓ 2 callers
Method
orientation_error
Calculate the orientation error between the retargeted qpos and the target qpos.
ws_ros2/src/retargeting_benchmark/src/robot_benchmark.py:52
↓ 2 callers
Method
pose_from_avp_world_to_robot_world
(self, pose_in_avp_world)
ws_ros2/src/retargeting_benchmark/src/robot_teleoperation.py:276
↓ 2 callers
Method
position_error
Calculate the position error between the retargeted qpos and the target qpos.
ws_ros2/src/retargeting_benchmark/src/robot_benchmark.py:27
↓ 2 callers
Method
process
(self, color_img)
ws_ros2/src/retargeting_benchmark/src/robot_teleoperation_ros.py:56
↓ 2 callers
Method
publish_hand_detection_results
( self, joint_pos_in_wrist: np.ndarray, wrist_pose: np.ndarray, frame_id: str,
ws_ros2/src/retargeting_benchmark/src/rviz_visualize.py:33
↓ 2 callers
Method
publish_joint_state
If a ROS node is available, publish the current joint state to the 'joint_states' topic for visualizing the robot state in RViz.
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio_env.py:94
↓ 2 callers
Method
publish_robot_joint_states
(self, joints_pos, joints_name)
ws_ros2/src/retargeting_benchmark/src/rviz_visualize.py:67
↓ 2 callers
Function
quaternion_apply
Apply the rotation given by a quaternion to a 3D point. Usual torch rules for broadcasting apply. Args: quaternion: Tensor of qu
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:443
↓ 2 callers
Function
quaternion_invert
Given a quaternion representing rotation, get the quaternion representing its inverse. Args: quaternion: Quaternions as tensor o
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:426
↓ 2 callers
Function
quaternion_to_matrix
Convert rotations given as quaternions to rotation matrices. Args: quaternions: quaternions with real part first, as ten
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:43
↓ 2 callers
Function
random_quaternions
Generate random quaternions representing rotations, i.e. versors with nonnegative real part. Args: n: Number of quaternions in a
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:313
↓ 2 callers
Method
read_pos
Returns the current positions and velocities.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:224
↓ 2 callers
Method
read_pos_vel_cur
Returns the current positions and velocities.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:218
↓ 2 callers
Method
relative_position_error
Calculate the relative position error from primary fingertips to thumb fingertip between the retargeted qpos and the target qpos.
ws_ros2/src/retargeting_benchmark/src/robot_benchmark.py:90
↓ 2 callers
Method
save_data
(self, save_dir)
ws_ros2/src/retargeting_benchmark/src/main_robot_teleoperation.py:170
↓ 2 callers
Method
set_joint_pos
Forcefully set joint angles (ignoring physical dynamics) and update the target state.
ws_ros2/src/retargeting_benchmark/src/robot_pinocchio_env.py:64
↓ 2 callers
Method
set_torque_enabled
Sets whether torque is enabled for the motors. Args: motor_ids: The motor IDs to configure. enabled: Whether to engag
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:188
↓ 2 callers
Method
single_link_ik_nlopt_arm_only
Optimize only the arm joint angles without changing the hand (finger) joint angles. Args: target_link_name: Name of the
ws_ros2/src/retargeting_benchmark/src/robot_control.py:161
↓ 2 callers
Function
standardize_quaternion
Convert a unit quaternion to a standard form: one in which the real part is non negative. Args: quaternions: Quaternions with re
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:373
↓ 2 callers
Method
start_keyboard_listening_thread
(self)
ws_ros2/src/retargeting_benchmark/src/utils/utils_keyboard.py:11
↓ 2 callers
Method
stop_record_video
(self)
ws_ros2/src/retargeting_benchmark/src/robot_real.py:181
↓ 2 callers
Function
time_to_seconds
(input)
ws_ros2/src/retargeting_benchmark/src/utils/utils_ros.py:161
↓ 2 callers
Function
urdf_to_xml
- The mesh files must be in the same folder as the urdf file (no sub-folders). - The input urdf file may be modified.
ws_ros2/src/retargeting_benchmark/src/utils/utils_urdf.py:7
↓ 2 callers
Method
vision_pro_retarget
Return: target_hand_kps_in_wrist: target_wrist_pose_in_world: qpos_retarget:
ws_ros2/src/retargeting_benchmark/src/robot_teleoperation.py:290
↓ 2 callers
Method
wait_for_initialization
(self)
ws_ros2/src/retargeting_benchmark/src/robot_real.py:68
↓ 1 callers
Function
LEAPhand_to_LEAPsim
(joints)
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/leap_hand_utils.py:58
↓ 1 callers
Function
_axis_angle_rotation
Return the rotation matrices for one of the rotations about an axis of which Euler angles describe, for each value of the angle given. A
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:169
↓ 1 callers
Function
_copysign
Return a tensor where each element has the absolute value taken from the, corresponding element of a, with sign taken from the corresponding
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:75
↓ 1 callers
Method
_initialize_data
Initializes the cached data.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:416
↓ 1 callers
Method
_publish_arm_joint_pos_command
(self, joint_pos)
ws_ros2/src/retargeting_benchmark/src/main_robot_real_high_freq.py:53
↓ 1 callers
Method
_publish_arm_joint_pos_command
(self, joint_pos)
ws_ros2/src/retargeting_benchmark/src/robot_real.py:99
↓ 1 callers
Method
_publish_hand_joint_pos_command
(self, joint_pos)
ws_ros2/src/retargeting_benchmark/src/main_robot_real_high_freq.py:59
↓ 1 callers
Method
_publish_hand_joint_pos_command
The sent msg is the input joint pos + 180 degree.
ws_ros2/src/retargeting_benchmark/src/robot_real.py:107
↓ 1 callers
Method
_publish_robot_joint_pos_command
Publish command to high-frequency interpolator node.
ws_ros2/src/retargeting_benchmark/src/robot_real.py:118
↓ 1 callers
Function
_sqrt_positive_part
Returns torch.sqrt(torch.max(0, x)) but with a zero subgradient where x is 0.
ws_ros2/src/retargeting_benchmark/src/utils/pytorch3d/rotation_conversions.py:93
↓ 1 callers
Method
_update_data
Updates the data index for the given motor ID.
ws_ros2/src/leaphand_ros2_module/scripts/leap_hand_utils/dynamixel_client.py:420
↓ 1 callers
Method
_update_hand_joint_pos
The updated joint pos is the received msg - 180 degree.
ws_ros2/src/retargeting_benchmark/src/robot_real.py:89
next →
1–100 of 390, ranked by callers