From 8202199930f78a5bebc3f99d12fca456b14f042b Mon Sep 17 00:00:00 2001 From: tthielke Date: Tue, 19 Dec 2023 19:19:59 +0100 Subject: [PATCH] [pms] cleanup --- launch/ik_and_description.launch | 2 +- src/pycram/process_modules/boxy_process_modules.py | 8 +++----- src/pycram/process_modules/donbot_process_modules.py | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/launch/ik_and_description.launch b/launch/ik_and_description.launch index 8baf63449..c9816dc5d 100644 --- a/launch/ik_and_description.launch +++ b/launch/ik_and_description.launch @@ -1,5 +1,5 @@ - + diff --git a/src/pycram/process_modules/boxy_process_modules.py b/src/pycram/process_modules/boxy_process_modules.py index 6e095d248..4ce16bf96 100644 --- a/src/pycram/process_modules/boxy_process_modules.py +++ b/src/pycram/process_modules/boxy_process_modules.py @@ -129,9 +129,7 @@ def _execute(self, desig: ClosingMotion.Motion): part_of_object.get_joint_limits( container_joint)[0]) -""" -Keine Entsprechung im PR2-Modul? Wird dies benötigt? ----- -> Open/Close --> Done, noch nicht getestet -""" + class BoxyParkArms(ProcessModule): """ This process module is for moving the arms in a parking position. @@ -184,8 +182,7 @@ def _execute(self, desig): robot = BulletWorld.robot gripper = desig.gripper motion = desig.motion - for joint, state in robot_description.get_static_gripper_chain(gripper, motion).items(): - robot.set_joint_state(joint, state) + robot.set_joint_states(robot_description.get_static_gripper_chain(gripper, motion)) class BoxyDetecting(ProcessModule): @@ -253,6 +250,7 @@ def _move_arm_tcp(target: Pose, robot: Object, arm: str) -> None: inv = request_ik(target, robot, joints, gripper) helper._apply_ik(robot, inv, joints) + class BoxyManager(ProcessModuleManager): def __init__(self): diff --git a/src/pycram/process_modules/donbot_process_modules.py b/src/pycram/process_modules/donbot_process_modules.py index 791ba3af4..ed5c8ae80 100644 --- a/src/pycram/process_modules/donbot_process_modules.py +++ b/src/pycram/process_modules/donbot_process_modules.py @@ -109,6 +109,7 @@ def _execute(self, desig): robot.set_joint_state("ur5_shoulder_pan_joint", new_pan + robot.get_joint_state("ur5_shoulder_pan_joint")) + class DonbotMoveGripper(ProcessModule): """ This process module controls the gripper of the robot. They can either be opened or closed. @@ -119,8 +120,7 @@ def _execute(self, desig): robot = BulletWorld.robot gripper = desig.gripper motion = desig.motion - for joint, state in robot_description.get_static_gripper_chain(gripper, motion).items(): - robot.set_joint_state(joint, state) + robot.set_joint_states(robot_description.get_static_gripper_chain(gripper, motion)) class DonbotDetecting(ProcessModule):