{ "cells": [ { "cell_type": "markdown", "id": "b1bb6935", "metadata": {}, "source": [ "# Object Designator\n", "Object designator are used to describe objects located in the BulletWorld or the real environment and then resolve them during runtime to concrete objects.\n", "\n", "Object designator are different from the Object class in bullet_world.py in the way that they just describe an object and do not create objects or provide methods to manipulate them. Nethertheless, object designator contain a reference to the BulletWorld object.\n", "\n", "Object designator take two parameter, of which at least one has to be provided. These parameter are:\n", "\n", " * A list of names \n", " * A list of types \n", " \n", "Object Designators work similar to Location designators, they get constrains describing a set of objects and when resolved return a specific instance. \n", "\n", "For all following examples we need a BulletWorld, so let's create one." ] }, { "cell_type": "code", "execution_count": 1, "id": "d806668d", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Unknown tag \"material\" in /robot[@name='plane']/link[@name='planeLink']/collision[1]\n", "Unknown tag \"contact\" in /robot[@name='plane']/link[@name='planeLink']\n", "Unknown tag \"material\" in /robot[@name='plane']/link[@name='planeLink']/collision[1]\n", "Unknown tag \"contact\" in /robot[@name='plane']/link[@name='planeLink']\n" ] } ], "source": [ "from pycram.bullet_world import BulletWorld, Object\n", "from pycram.enums import ObjectType\n", "from pycram.pose import Pose\n", "\n", "world = BulletWorld()" ] }, { "cell_type": "code", "execution_count": 7, "id": "43fbd1c6", "metadata": {}, "outputs": [], "source": [ "world.exit()" ] }, { "cell_type": "markdown", "id": "494098ff", "metadata": {}, "source": [ "## Believe Object\n", "This object designator is used to describe object that are located in the BulletWorld. So objects that are in the believe state, hence the name. In the futre when there is a perception interface there will be a ```RealObject``` description which will be used to describe objects in the real world. \n", "\n", "Since ```BelieveObject``` decribes Objects in the BulletWorld we create a few." ] }, { "cell_type": "code", "execution_count": 2, "id": "ecc8f961", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Scalar element defined multiple times: limit\n", "Scalar element defined multiple times: limit\n" ] } ], "source": [ "kitchen = Object(\"kitchen\", ObjectType.ENVIRONMENT, \"kitchen.urdf\")\n", "milk = Object(\"milk\", ObjectType.MILK, \"milk.stl\", pose=Pose([1.3, 1, 0.9]))\n", "cereal = Object(\"froot_loops\", ObjectType.BREAKFAST_CEREAL, \"breakfast_cereal.stl\", pose=Pose([1.3, 0.9, 0.95]))\n", "spoon = Object(\"spoon\", ObjectType.SPOON, \"spoon.stl\", pose=Pose([1.3, 1.1, 0.87]))" ] }, { "cell_type": "markdown", "id": "9945cab4", "metadata": {}, "source": [ "Now that we have objects we can create an object designator to describe them. For the start we want an object designator only describing the milk. Since all objects have unique names we can create an object designator using a list with only the name of the object. " ] }, { "cell_type": "code", "execution_count": 3, "id": "b867fcb2", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BelieveObject.Object(name='milk', type=, bullet_world_object=Object(world=, \n", "local_transformer=, \n", "name=milk, \n", "type=ObjectType.MILK, \n", "color=[1, 1, 1, 1], \n", "id=3, \n", "path=/home/jdech/workspace/ros/src/pycram-1/src/pycram/../../resources/cached/milk.urdf, \n", "joints: ..., \n", "links: ..., \n", "attachments: ..., \n", "cids: ..., \n", "original_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "tf_frame=milk_3, \n", "urdf_object: ..., \n", "_current_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "_current_link_poses={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_link_transforms={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 999615669\n", " frame_id: \"map\"\n", "child_frame_id: \"milk_3\"\n", "transform: \n", " translation: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " rotation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_joint_states={}, \n", "base_origin_shift=[ 4.15300950e-04 -6.29518181e-05 8.96554102e-02], \n", "link_to_geometry={'milk_main': }), _pose=, \n", "local_transformer=, \n", "name=milk, \n", "type=ObjectType.MILK, \n", "color=[1, 1, 1, 1], \n", "id=3, \n", "path=/home/jdech/workspace/ros/src/pycram-1/src/pycram/../../resources/cached/milk.urdf, \n", "joints: ..., \n", "links: ..., \n", "attachments: ..., \n", "cids: ..., \n", "original_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "tf_frame=milk_3, \n", "urdf_object: ..., \n", "_current_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "_current_link_poses={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_link_transforms={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 999615669\n", " frame_id: \"map\"\n", "child_frame_id: \"milk_3\"\n", "transform: \n", " translation: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " rotation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_joint_states={}, \n", "base_origin_shift=[ 4.15300950e-04 -6.29518181e-05 8.96554102e-02], \n", "link_to_geometry={'milk_main': })>)\n" ] } ], "source": [ "from pycram.designators.object_designator import BelieveObject\n", "\n", "object_description = BelieveObject(names=[\"milk\"])\n", "\n", "print(object_description.resolve())" ] }, { "cell_type": "markdown", "id": "738d34f4", "metadata": {}, "source": [ "You can also use the type to describe objects, so now we want to have an object designator that describes every food in the world. " ] }, { "cell_type": "code", "execution_count": 4, "id": "046fd67a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BelieveObject.Object(name='milk', type=, bullet_world_object=Object(world=, \n", "local_transformer=, \n", "name=milk, \n", "type=ObjectType.MILK, \n", "color=[1, 1, 1, 1], \n", "id=3, \n", "path=/home/jdech/workspace/ros/src/pycram-1/src/pycram/../../resources/cached/milk.urdf, \n", "joints: ..., \n", "links: ..., \n", "attachments: ..., \n", "cids: ..., \n", "original_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "tf_frame=milk_3, \n", "urdf_object: ..., \n", "_current_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "_current_link_poses={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_link_transforms={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 999615669\n", " frame_id: \"map\"\n", "child_frame_id: \"milk_3\"\n", "transform: \n", " translation: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " rotation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_joint_states={}, \n", "base_origin_shift=[ 4.15300950e-04 -6.29518181e-05 8.96554102e-02], \n", "link_to_geometry={'milk_main': }), _pose=, \n", "local_transformer=, \n", "name=milk, \n", "type=ObjectType.MILK, \n", "color=[1, 1, 1, 1], \n", "id=3, \n", "path=/home/jdech/workspace/ros/src/pycram-1/src/pycram/../../resources/cached/milk.urdf, \n", "joints: ..., \n", "links: ..., \n", "attachments: ..., \n", "cids: ..., \n", "original_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "tf_frame=milk_3, \n", "urdf_object: ..., \n", "_current_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "_current_link_poses={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_link_transforms={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 999615669\n", " frame_id: \"map\"\n", "child_frame_id: \"milk_3\"\n", "transform: \n", " translation: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " rotation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_joint_states={}, \n", "base_origin_shift=[ 4.15300950e-04 -6.29518181e-05 8.96554102e-02], \n", "link_to_geometry={'milk_main': })>)\n" ] } ], "source": [ "from pycram.designators.object_designator import BelieveObject\n", "\n", "object_description = BelieveObject(types=[ObjectType.MILK, ObjectType.BREAKFAST_CEREAL])\n", "\n", "print(object_description.resolve())" ] }, { "cell_type": "markdown", "id": "0fda88b7", "metadata": {}, "source": [ "## Object Part \n", "Part of object designators can be used to describe describe something as part of another obeject. For example, you could describe a specific drawer as part of the kitchen. This is necessary since the drawer is no single BulletWorld Object but rather a link of the kitchen which is a BulletWorld Object.\n", "\n", "For this example we need just need the kitchen, if you didn't spawn it in the previous example you can spawn it with the following cell." ] }, { "cell_type": "code", "execution_count": null, "id": "0038c9d3", "metadata": {}, "outputs": [], "source": [ "kitchen = Object(\"kitchen\", ObjectType.ENVIRONMENT, \"kitchen.urdf\")" ] }, { "cell_type": "code", "execution_count": null, "id": "7880fb2a", "metadata": {}, "outputs": [], "source": [ "from pycram.designators.object_designator import ObjectPart, BelieveObject\n", "\n", "kitchen_desig = BelieveObject(names=[\"kitchen\"]).resolve()\n", "\n", "object_description = ObjectPart(names=[\"sink_area_left_upper_drawer_main\"], part_of=kitchen_desig)\n", "\n", "print(object_description.resolve())" ] }, { "cell_type": "markdown", "id": "6cd9b7e6", "metadata": {}, "source": [ "## Object Designators as Generators \n", "Similar to location designators object designators can be used as generators to iterate through every object that they are describing. We will see this at the example of an object designator describing every type of food. \n", "\n", "For this we need some obejcts, so if you didn't already spawn them you can use the next cell for this." ] }, { "cell_type": "code", "execution_count": null, "id": "63d5b718", "metadata": {}, "outputs": [], "source": [ "kitchen = Object(\"kitchen\", ObjectType.ENVIRONMENT, \"kitchen.urdf\")\n", "milk = Object(\"milk\", ObjectType.MILK, \"milk.stl\", pose=Pose([1.3, 1, 0.9]))\n", "cereal = Object(\"froot_loops\", ObjectType.BREAKFAST_CEREAL, \"breakfast_cereal.stl\", pose=Pose([1.3, 0.9, 0.95]))\n", "spoon = Object(\"spoon\", ObjectType.SPOON, \"spoon.stl\", pose=Pose([1.3, 1.1, 0.87]))" ] }, { "cell_type": "code", "execution_count": 6, "id": "e5f2d2ec", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BelieveObject.Object(name='milk', type=, bullet_world_object=Object(world=, \n", "local_transformer=, \n", "name=milk, \n", "type=ObjectType.MILK, \n", "color=[1, 1, 1, 1], \n", "id=3, \n", "path=/home/jdech/workspace/ros/src/pycram-1/src/pycram/../../resources/cached/milk.urdf, \n", "joints: ..., \n", "links: ..., \n", "attachments: ..., \n", "cids: ..., \n", "original_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "tf_frame=milk_3, \n", "urdf_object: ..., \n", "_current_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "_current_link_poses={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_link_transforms={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 999615669\n", " frame_id: \"map\"\n", "child_frame_id: \"milk_3\"\n", "transform: \n", " translation: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " rotation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_joint_states={}, \n", "base_origin_shift=[ 4.15300950e-04 -6.29518181e-05 8.96554102e-02], \n", "link_to_geometry={'milk_main': }), _pose=, \n", "local_transformer=, \n", "name=milk, \n", "type=ObjectType.MILK, \n", "color=[1, 1, 1, 1], \n", "id=3, \n", "path=/home/jdech/workspace/ros/src/pycram-1/src/pycram/../../resources/cached/milk.urdf, \n", "joints: ..., \n", "links: ..., \n", "attachments: ..., \n", "cids: ..., \n", "original_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "tf_frame=milk_3, \n", "urdf_object: ..., \n", "_current_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "_current_link_poses={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 742550373\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_link_transforms={'milk_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 999615669\n", " frame_id: \"map\"\n", "child_frame_id: \"milk_3\"\n", "transform: \n", " translation: \n", " x: 1.3\n", " y: 1.0\n", " z: 0.9\n", " rotation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_joint_states={}, \n", "base_origin_shift=[ 4.15300950e-04 -6.29518181e-05 8.96554102e-02], \n", "link_to_geometry={'milk_main': })>) \n", "\n", "BelieveObject.Object(name='froot_loops', type=, bullet_world_object=Object(world=, \n", "local_transformer=, \n", "name=froot_loops, \n", "type=ObjectType.BREAKFAST_CEREAL, \n", "color=[1, 1, 1, 1], \n", "id=4, \n", "path=/home/jdech/workspace/ros/src/pycram-1/src/pycram/../../resources/cached/breakfast_cereal.urdf, \n", "joints: ..., \n", "links: ..., \n", "attachments: ..., \n", "cids: ..., \n", "original_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 849018335\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 0.9\n", " z: 0.95\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "tf_frame=froot_loops_4, \n", "urdf_object: ..., \n", "_current_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 849018335\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 0.9\n", " z: 0.95\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "_current_link_poses={'cereal_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 849018335\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 0.9\n", " z: 0.95\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_link_transforms={'cereal_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 999615669\n", " frame_id: \"map\"\n", "child_frame_id: \"froot_loops_4\"\n", "transform: \n", " translation: \n", " x: 1.3\n", " y: 0.9\n", " z: 0.95\n", " rotation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_joint_states={}, \n", "base_origin_shift=[0.00124406 0.00101732 0.1038567 ], \n", "link_to_geometry={'cereal_main': }), _pose=, \n", "local_transformer=, \n", "name=froot_loops, \n", "type=ObjectType.BREAKFAST_CEREAL, \n", "color=[1, 1, 1, 1], \n", "id=4, \n", "path=/home/jdech/workspace/ros/src/pycram-1/src/pycram/../../resources/cached/breakfast_cereal.urdf, \n", "joints: ..., \n", "links: ..., \n", "attachments: ..., \n", "cids: ..., \n", "original_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 849018335\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 0.9\n", " z: 0.95\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "tf_frame=froot_loops_4, \n", "urdf_object: ..., \n", "_current_pose=header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 849018335\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 0.9\n", " z: 0.95\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0, \n", "_current_link_poses={'cereal_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 849018335\n", " frame_id: \"map\"\n", "pose: \n", " position: \n", " x: 1.3\n", " y: 0.9\n", " z: 0.95\n", " orientation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_link_transforms={'cereal_main': header: \n", " seq: 0\n", " stamp: \n", " secs: 1699448681\n", " nsecs: 999615669\n", " frame_id: \"map\"\n", "child_frame_id: \"froot_loops_4\"\n", "transform: \n", " translation: \n", " x: 1.3\n", " y: 0.9\n", " z: 0.95\n", " rotation: \n", " x: 0.0\n", " y: 0.0\n", " z: 0.0\n", " w: 1.0}, \n", "_current_joint_states={}, \n", "base_origin_shift=[0.00124406 0.00101732 0.1038567 ], \n", "link_to_geometry={'cereal_main': })>) \n", "\n" ] } ], "source": [ "from pycram.designators.object_designator import BelieveObject\n", "\n", "object_description = BelieveObject(types=[ObjectType.MILK, ObjectType.BREAKFAST_CEREAL])\n", "\n", "for obj in object_description:\n", " print(obj, \"\\n\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 5 }