8 from robot_skills.util.kdl_conversions
import FrameStamped
9 from robocup_knowledge
import knowledge_loader
10 from collections
import namedtuple
13 common = knowledge_loader.load_knowledge(
"common")
16 cabinet_amcl = [
"cabinet",
"storage_shelf"]
17 cabinet_poses = [FrameStamped(frame=kdl.Frame(kdl.Rotation.RPY(0.0, 0.0, 0), kdl.Vector(0.144, 3.274, 0.0)),
19 FrameStamped(frame=kdl.Frame(kdl.Rotation.RPY(0.0, 0.0, math.pi), kdl.Vector(4.8, 2.5, 0.0)),
21 object_shelves = [
"shelf3",
"shelf4",
"shelf5"]
22 object_types = [obj[
"name"]
for obj
in common.objects]
25 default_place_entity = cabinet_amcl
29 EntityConfiguration defines a name, an pose estimate for the Entity and which volumes of that entity to use for
32 EntityConfiguration = namedtuple(
"EntityConfiguration", [
"entity_id",
"pose_estimate",
"manipulation_volumes"])
35 A Workspace for Storing Groceries has EntityConfigurations for the two main entities in the challenge:
36 the grasp_entity (usually a table) and a place_entity (usually some cabinet or shelf).
37 Additionally, it defines in which room the challenge takes place
39 Workspace = namedtuple(
"Workspace", [
"grasp_entity_conf",
"place_entity_conf",
"room"])
44 FrameStamped(frame=kdl.Frame(kdl.Rotation.RPY(0.0, 0.0, math.pi),
45 kdl.Vector(2.447, 1.1695, 0.0)),
47 manipulation_volumes=[
'on_top_of']
51 pose_estimate=FrameStamped(frame=kdl.Frame(kdl.Rotation.RPY(0.0, 0.0, 0),
52 kdl.Vector(0.144, 3.274, 0.0)),
54 manipulation_volumes=[
'shelf2']
62 FrameStamped(frame=kdl.Frame(kdl.Rotation.RPY(0.0, 0.0, math.pi),
63 kdl.Vector(2.447, 1.1695, 0.0)),
65 manipulation_volumes=[
'on_top_of']
70 FrameStamped(frame=kdl.Frame(kdl.Rotation.RPY(0.0, 0.0, math.pi),
71 kdl.Vector(4.8, 2.5, 0.0)),
73 manipulation_volumes=[
'shelf2']
79 pose_estimate=FrameStamped(
80 frame=kdl.Frame(kdl.Rotation.RPY(
84 kdl.Vector(8.5, 1.15, 0.0)),
87 manipulation_volumes=[
'on_top_of']
91 pose_estimate=FrameStamped(
92 frame=kdl.Frame(kdl.Rotation.RPY(0.0, 0.0, math.pi),
93 kdl.Vector(9.7, 2.0, 0.0)),
95 manipulation_volumes=[
'shelf2']
99 workspaces = [cabinet_ws, storage_shelf_ws, bookcase_ws]