Skip to content

Commit

Permalink
Merge pull request #1039 from tue-robotics/fix/example_grasping2
Browse files Browse the repository at this point in the history
Feature(example grasping): update to working state
  • Loading branch information
MatthijsBurgh committed Jun 16, 2020
2 parents 9c0f893 + 23b4f74 commit 62a6491
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions robot_smach_states/examples/manipulation/example_grasping.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# Robot Smach States
import robot_smach_states.util.designators as ds
from robot_smach_states.manipulation import Grab
from robot_skills.util.shape import RightPrism
from robot_skills.util.entity import Entity
import PyKDL as kdl


if __name__ == "__main__":
Expand All @@ -32,10 +35,11 @@
entity_id = "test_item"
pose = FrameStamped(frame=kdl.Frame(kdl.Rotation.RPY(0.0, 0.0, 0.0), kdl.Vector(args.x, args.y, args.z)),
frame_id="/map")

robot.ed.update_entity(id=entity_id, frame_stamped=pose)
shape = RightPrism([kdl.Vector(0, 0, 0), kdl.Vector(0, 0.05, 0), kdl.Vector(0.05, 0.05, 0), kdl.Vector(0.05, 0, 0)], -0.1, 0.1)
item = Entity(entity_id, "test_type", pose.frame_id, pose.frame, shape, None, None, None)

item = ds.EdEntityDesignator(robot, id=entity_id)
item = ds.Designator(item)

arm = ds.UnoccupiedArmDesignator(robot, arm_properties={"required_trajectories": ["prepare_grasp"],
"required_goals": ["carrying_pose"],
Expand Down

0 comments on commit 62a6491

Please sign in to comment.