From 16594dff408d999c52441c74c785ce6c7d025813 Mon Sep 17 00:00:00 2001 From: Tony Baltovski Date: Tue, 14 Jan 2025 11:27:37 -0500 Subject: [PATCH 1/3] Fixed tests. --- clearpath_config/manipulators/types/arms.py | 88 --------------------- clearpath_config/platform/can.py | 2 +- setup.py | 6 -- 3 files changed, 1 insertion(+), 95 deletions(-) diff --git a/clearpath_config/manipulators/types/arms.py b/clearpath_config/manipulators/types/arms.py index 6e48429..24ecfd6 100644 --- a/clearpath_config/manipulators/types/arms.py +++ b/clearpath_config/manipulators/types/arms.py @@ -249,94 +249,6 @@ class UniversalRobots(BaseArm): SIM_IGNITION: '', } - -class UniversalRobots(BaseArm): - MANIPULATOR_MODEL = "universal_robots" - - # Description Variables - UR_TYPE = 'ur_type' - INITIAL_POSITIONS = 'initial_positions' - INITIAL_POSITIONS_FILE = 'initial_positions_file' - JOINT_LIMITS_PARAMETERS_FILE = 'joint_limits_parameters_file' - KINEMATICS_PARAMETERS_FILE = 'kinematics_parameters_file' - PHYSICAL_PARAMETERS_FILE = 'physical_parameters_file' - VISUAL_PARAMETERS_FILE = 'visual_parameters_file' - SAFETY_LIMITS = 'safety_limits' - SAFETY_POS_MARGIN = 'safety_pos_margin' - SAFETY_K_POSITION = 'safety_k_position' - # Control Parameters - GENERATE_ROS2_CONTROL_TAG = 'generate_ros2_control_tag' - HEADLESS_MODE = 'headless_mode' - IP_ADDRESS = 'robot_ip' - SCRIPT_FILENAME = 'script_filename' - OUTPUT_RECIPE_FILENAME = 'output_recipe_filename' - INPUT_RECIPE_FILENAME = 'input_recipe_filename' - REVERSE_IP = 'reverse_ip' - SCRIPT_COMMAND_PORT = 'script_command_port' - REVERSE_PORT = 'reverse_port' - SCRIPT_SENDER_PORT = 'script_sender_port' - TRAJECTORY_PORT = 'trajectory_port' - TRANSMISSION_HW_INTERFACE = 'transmission_hw_interface' - NON_BLOCKING_READ = 'non_blocking_read' - KEEP_ALIVE_COUNT = 'keep_alive_count' - # Tool Communication Parameters - USE_TOOL_COMMUNICATION = 'use_tool_communication' - TOOL_VOLTAGE = 'tool_voltage' - TOOL_PARITY = 'tool_parity' - TOOL_BAUD_RATE = 'tool_baud_rate' - TOOL_STOP_BITS = 'tool_stop_bits' - TOOL_RX_IDLE_CHARS = 'tool_rx_idle_chars' - TOOL_TX_IDLE_CHARS = 'tool_tx_idle_chars' - TOOL_DEVICE_NAME = 'tool_device_name' - TOOL_TCP_PORT = 'tool_tcp_port' - # Simulation Parameters - USE_FAKE_HARDWARE = 'use_fake_hardware' - FAKE_SENSOR_COMMANDS = 'fake_sensor_commands' - SIM_GAZEBO = 'sim_gazebo' - SIM_IGNITION = 'sim_ignition' - - # URDF Parameters - URDF_PARAMETERS = { - UR_TYPE: '', - INITIAL_POSITIONS: '', - INITIAL_POSITIONS_FILE: '', - JOINT_LIMITS_PARAMETERS_FILE: '', - KINEMATICS_PARAMETERS_FILE: '', - PHYSICAL_PARAMETERS_FILE: '', - VISUAL_PARAMETERS_FILE: '', - SAFETY_LIMITS: '', - SAFETY_POS_MARGIN: '', - SAFETY_K_POSITION: '', - GENERATE_ROS2_CONTROL_TAG: '', - HEADLESS_MODE: '', - IP_ADDRESS: '', - SCRIPT_FILENAME: '', - OUTPUT_RECIPE_FILENAME: '', - INPUT_RECIPE_FILENAME: '', - REVERSE_IP: '', - SCRIPT_COMMAND_PORT: '', - REVERSE_PORT: '', - SCRIPT_SENDER_PORT: '', - TRAJECTORY_PORT: '', - TRANSMISSION_HW_INTERFACE: '', - NON_BLOCKING_READ: '', - KEEP_ALIVE_COUNT: '', - USE_TOOL_COMMUNICATION: '', - TOOL_VOLTAGE: '', - TOOL_PARITY: '', - TOOL_BAUD_RATE: '', - TOOL_STOP_BITS: '', - TOOL_RX_IDLE_CHARS: '', - TOOL_TX_IDLE_CHARS: '', - TOOL_DEVICE_NAME: '', - TOOL_TCP_PORT: '', - USE_FAKE_HARDWARE: '', - FAKE_SENSOR_COMMANDS: '', - SIM_GAZEBO: '', - SIM_IGNITION: '', - } - - class Arm(): KINOVA_GEN3_6DOF = KinovaGen3Dof6.MANIPULATOR_MODEL KINOVA_GEN3_7DOF = KinovaGen3Dof7.MANIPULATOR_MODEL diff --git a/clearpath_config/platform/can.py b/clearpath_config/platform/can.py index 4c67945..2c5a3bc 100644 --- a/clearpath_config/platform/can.py +++ b/clearpath_config/platform/can.py @@ -125,6 +125,7 @@ def interface(self, interface: str) -> None: class CANBridgeListConfig(ListConfig[CANBridge, str]): def __init__(self) -> None: + super().__init__( uid=lambda obj: obj.interface, obj_type=CANBridge, @@ -145,7 +146,6 @@ class CANBridgeConfig: } ] - A300_DEFAULT = [ { CANBridge.INTERFACE: 'vcan0', diff --git a/setup.py b/setup.py index 13ad1c7..081d05e 100644 --- a/setup.py +++ b/setup.py @@ -38,12 +38,6 @@ for file in files: samples.append(os.path.join(path, file)) -# Samples -samples = [] -for path, dirs, files in os.walk(os.path.join(package_name, "sample")): - for file in files: - samples.append(os.path.join(path, file)) - setup( name=package_name, version='0.3.4', From c6ae418a21920768e3dfc2f837709a109a8a7c49 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton <59611394+civerachb-cpr@users.noreply.github.com> Date: Tue, 14 Jan 2025 09:07:02 -0500 Subject: [PATCH 2/3] Add HE2411 battery support (#110) * Add support for the HE2411 battery to J100 and A200 * Add the even-older HE2410 too --- clearpath_config/platform/battery.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clearpath_config/platform/battery.py b/clearpath_config/platform/battery.py index c97aa4d..811ad53 100644 --- a/clearpath_config/platform/battery.py +++ b/clearpath_config/platform/battery.py @@ -45,7 +45,9 @@ class BatteryConfig(BaseConfig): # A200 Lead Acid ES20_12C = 'ES20_12C' # A200/J100 LiION - HE2613 = 'HE2613' + HE2613 = "HE2613" + HE2411 = "HE2411" + HE2410 = "HE2410" # A300 LiFEPO4 S_24V20_U1 = 'S_24V20_U1' # R100 Lead Acid @@ -76,6 +78,8 @@ class BatteryConfig(BaseConfig): Platform.A200: { ES20_12C: [S2P1], HE2613: [S1P3, S1P4], + HE2411: [S1P3, S1P4], + HE2410: [S1P3, S1P4], }, Platform.A300: { S_24V20_U1: [S1P2, S1P4, S1P6], @@ -98,6 +102,8 @@ class BatteryConfig(BaseConfig): }, Platform.J100: { HE2613: [S1P1], + HE2411: [S1P1], + HE2410: [S1P1], }, Platform.R100: { DTM8A31: [S1P2], From cd10dba7a0d960b90ae6631e8cdf9bc648f53bf9 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 14 Jan 2025 13:10:02 -0500 Subject: [PATCH 3/3] " -> ' --- clearpath_config/platform/battery.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clearpath_config/platform/battery.py b/clearpath_config/platform/battery.py index 811ad53..4750f79 100644 --- a/clearpath_config/platform/battery.py +++ b/clearpath_config/platform/battery.py @@ -45,9 +45,9 @@ class BatteryConfig(BaseConfig): # A200 Lead Acid ES20_12C = 'ES20_12C' # A200/J100 LiION - HE2613 = "HE2613" - HE2411 = "HE2411" - HE2410 = "HE2410" + HE2613 = 'HE2613' + HE2411 = 'HE2411' + HE2410 = 'HE2410' # A300 LiFEPO4 S_24V20_U1 = 'S_24V20_U1' # R100 Lead Acid