Skip to content

Commit

Permalink
format lines
Browse files Browse the repository at this point in the history
  • Loading branch information
pkehr committed Jan 21, 2024
1 parent de3942b commit bb0c8d2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/pycram/designators/action_designator.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ class PickUpAction(ActionDesignatorDescription):

@dataclasses.dataclass
class Action(ActionDesignatorDescription.Action):

object_designator: ObjectDesignatorDescription.Object
"""
Object designator describing the object that should be picked up
Expand Down Expand Up @@ -332,12 +331,12 @@ def perform(self) -> None:
tmp_for_rotate_pose.pose.position.z = -0.1
gripper_rotate_pose = object.local_transformer.transform_pose(tmp_for_rotate_pose, "map")

#Perform Gripper Rotate
# Perform Gripper Rotate
# BulletWorld.current_bullet_world.add_vis_axis(gripper_rotate_pose)
# MoveTCPMotion(gripper_rotate_pose, self.arm).resolve().perform()

oTg = object.local_transformer.transform_pose(adjusted_oTm, gripper_frame)
oTg.pose.position.x -= 0.07 # in x since this is how the gripper is oriented
oTg.pose.position.x -= 0.07 # in x since this is how the gripper is oriented
prepose = object.local_transformer.transform_pose(oTg, "map")

# Perform the motion with the prepose and open gripper
Expand Down Expand Up @@ -374,7 +373,8 @@ def insert(self, session: sqlalchemy.orm.session.Session, **kwargs) -> ORMPickUp

return action

def __init__(self, object_designator_description: Union[ObjectDesignatorDescription, ObjectDesignatorDescription.Object],
def __init__(self,
object_designator_description: Union[ObjectDesignatorDescription, ObjectDesignatorDescription.Object],
arms: List[str], grasps: List[str]):
"""
Lets the robot pick up an object. The description needs an object designator describing the object that should be
Expand Down Expand Up @@ -409,7 +409,6 @@ class PlaceAction(ActionDesignatorDescription):

@dataclasses.dataclass
class Action(ActionDesignatorDescription.Action):

object_designator: ObjectDesignatorDescription.Object
"""
Object designator describing the object that should be place
Expand Down Expand Up @@ -438,8 +437,8 @@ def perform(self) -> None:
MoveTCPMotion(target_diff, self.arm).resolve().perform()
MoveGripperMotion("open", self.arm).resolve().perform()
BulletWorld.robot.detach(self.object_designator.bullet_world_object)
retract_pose = local_tf.transform_pose(target_diff,BulletWorld.robot.get_link_tf_frame(
robot_description.get_tool_frame(self.arm)))
retract_pose = local_tf.transform_pose(target_diff, BulletWorld.robot.get_link_tf_frame(
robot_description.get_tool_frame(self.arm)))
retract_pose.position.x -= 0.07
MoveTCPMotion(retract_pose, self.arm).resolve().perform()

Expand Down

0 comments on commit bb0c8d2

Please sign in to comment.