Skip to content

Commit afe50cf

Browse files
committed
fix old descriptions
1 parent 81e2fa3 commit afe50cf

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

dynamic_payload_analysis_core/dynamic_payload_analysis_core/core.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def get_valid_workspace(self, range : int, resolution : float, masses : np.ndarr
499499
:param resolution (int): Resolution of the grid to compute configurations.
500500
:param masses (np.ndarray): Array of masses to apply to the robot model.
501501
:param checked_frames (np.ndarray): Array of frame names where the external forces are applied.
502-
:return: Array of valid configurations that achieve the desired end effector position in format: [{"config", "end_effector_pos, "tau", "arm"}].
502+
:return: Array of valid configurations that achieve the desired end effector position in format: [{"config", "end_effector_pos, "tau", "tree_id"}].
503503
"""
504504
# create the array to store all current valid configurations
505505
valid_current_configurations = np.array([], dtype=object)
@@ -535,7 +535,8 @@ def get_valid_workspace(self, range : int, resolution : float, masses : np.ndarr
535535
def compute_maximum_payloads(self, configs : np.ndarray):
536536
"""
537537
Compute the maximum payload for each provided configuration and return the results with the configs updated with the maximum payload as a new value.
538-
:param configs: Array of configurations , format {"config", "end_effector_pos", "tau", "arm", "max_payload" }
538+
539+
:param configs: Array of configurations , format {"config", "end_effector_pos", "tau", "tree_id", "max_payload" }
539540
"""
540541
for config in configs:
541542
config["max_payload"] = self.find_max_payload_binary_search(config, payload_min=0.0, payload_max=15, resolution=0.01)
@@ -546,6 +547,7 @@ def compute_maximum_payloads(self, configs : np.ndarray):
546547
def find_max_payload_binary_search(self, config : np.ndarray, payload_min : float = 0.0, payload_max : float = 10.0, resolution : float = 0.01):
547548
"""
548549
Find the maximum payload for a given configuration using binary search.
550+
549551
:param config: Configuration dictionary (must contain 'config' key).
550552
:param payload_min: Minimum payload to test.
551553
:param payload_max: Maximum payload to test.
@@ -666,7 +668,7 @@ def get_end_effector_position_array(self, x: float, y: float, z: float) -> np.nd
666668
"""
667669
return pin.SE3(np.eye(3), np.array([x, y, z]))
668670

669-
def get_maximum_torques(self, valid_configs : np.ndarray) -> np.ndarray | np.ndarray:
671+
def get_maximum_torques(self, valid_configs : np.ndarray) -> np.ndarray:
670672
"""
671673
Get the maximum torques for each joint in all valid configurations.
672674
@@ -715,9 +717,9 @@ def get_maximum_torques(self, valid_configs : np.ndarray) -> np.ndarray | np.nda
715717

716718
def get_maximum_payloads(self, valid_configs : np.ndarray) -> np.ndarray:
717719
"""
718-
Get the maximum payloads for all configuration in the left and right arm.
720+
Get the maximum payloads for all configuration in the corrisponding tree.
719721
720-
:param valid_configs: Array of valid configurations with related torques in format: [{"config", "end_effector_pos, "tau", "arm", "max_payload"}].
722+
:param valid_configs: Array of valid configurations with related torques in format: [{"config", "end_effector_pos, "tau", "tree_id", "max_payload"}].
721723
:return: Tuple of arrays of maximum payloads for left and right arms.
722724
"""
723725
max_payloads = np.array([], dtype=float)

dynamic_payload_analysis_ros/dynamic_payload_analysis_ros/rviz_visualization_menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ def generate_maximum_payloads_markers(self):
566566
# Create a MarkerArray to visualize the maximum payloads
567567
marker_max_payloads = MarkerArray()
568568

569-
# get the maximum payloads for each arm based on the valid configurations
569+
# get the maximum payloads for each tree based on the valid configurations
570570
max_payloads = self.robot_handler.get_maximum_payloads(self.valid_configurations)
571571

572572
# Iterate through the valid configurations and create markers

0 commit comments

Comments
 (0)