From 6fa040009f4ec94164e7037ff38d04e111518282 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 06:51:19 +0000 Subject: [PATCH 1/2] Initial plan From dc24c09405a1bf87cc2928315fb9b89fbaad4f38 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 06:55:02 +0000 Subject: [PATCH 2/2] Fix add_sensor_attachments to append links to a separate links list Co-authored-by: chase6305 <61959467+chase6305@users.noreply.github.com> Agent-Logs-Url: https://github.com/DexForce/EmbodiChain/sessions/a3280364-e146-41ac-8958-6c3e5386cecc --- embodichain/toolkits/urdf_assembly/connection.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/embodichain/toolkits/urdf_assembly/connection.py b/embodichain/toolkits/urdf_assembly/connection.py index a96ed601..fce16946 100644 --- a/embodichain/toolkits/urdf_assembly/connection.py +++ b/embodichain/toolkits/urdf_assembly/connection.py @@ -230,17 +230,25 @@ def add_connections( self.logger.error(f"Invalid connection rule: {parent} -> {child}") def add_sensor_attachments( - self, joints: list, attach_dict: dict, base_points: dict + self, links: list, joints: list, attach_dict: dict, base_points: dict ): - r"""Attach sensors to the robot by creating fixed joints.""" + r"""Attach sensors to the robot by creating fixed joints and links. + + Args: + links (list): A list to collect link elements from the sensor URDF. + joints (list): A list to collect joint elements from the sensor URDF + and the new attachment joint. + attach_dict (dict): A mapping from sensor names to their attachment configs. + base_points (dict): A mapping from component names to their base link names. + """ for sensor_name, attach in attach_dict.items(): sensor_urdf = ET.parse(attach.sensor_urdf).getroot() - # Add sensor links and joints to the main lists + # Add sensor links to the links list for link in sensor_urdf.findall("link"): # Ensure sensor link names are lowercase link.set("name", self._apply_case("link", link.get("name"))) - joints.append(link) # This should be added to links list instead + links.append(link) for joint in sensor_urdf.findall("joint"): # Ensure sensor joint names are uppercase and link references are lowercase