pycram.designators.object_designator
Module Contents
Classes
Description for Objects that are only believed in. |
|
Object Designator Descriptions for Objects that are part of some other object. |
|
Description for KnowRob located objects. |
|
Object designator representing an object in the real world, when resolving this object designator description ] |
- class pycram.designators.object_designator.BelieveObject(names: typing_extensions.Optional[typing_extensions.List[str]] = None, types: typing_extensions.Optional[typing_extensions.List[pycram.datastructures.enums.ObjectType]] = None, resolver: typing_extensions.Optional[typing_extensions.Callable] = None)
Bases:
pycram.designator.ObjectDesignatorDescription
Description for Objects that are only believed in.
Base of all object designator descriptions. Every object designator has the name and type of the object.
- Parameters:
names – A list of names that could describe the object
types – A list of types that could represent the object
resolver – An alternative resolver that returns an object designator for the list of names and types
- class Object
Bases:
pycram.designator.ObjectDesignatorDescription.Object
Concrete object that is believed in.
- to_sql() pycram.orm.object_designator.BelieveObject
Create an ORM object that corresponds to this description.
- Returns:
The created ORM object.
- insert(session: sqlalchemy.orm.session.Session) pycram.orm.object_designator.BelieveObject
Add and commit this and all related objects to the session. Auto-Incrementing primary keys and foreign keys have to be filled by this method.
- Parameters:
session – Session with a database that is used to add and commit the objects
- Returns:
The completely instanced ORM object
- class pycram.designators.object_designator.ObjectPart(names: typing_extensions.List[str], part_of: pycram.designator.ObjectDesignatorDescription.Object, type: typing_extensions.Optional[str] = None, resolver: typing_extensions.Optional[typing_extensions.Callable] = None)
Bases:
pycram.designator.ObjectDesignatorDescription
Object Designator Descriptions for Objects that are part of some other object.
Describing the relationship between an object and a specific part of it.
- Parameters:
names – Possible names for the part
part_of – Parent object of which the part should be described
type – Type of the part
resolver – An alternative resolver to resolve the input parameter to an object designator
- class Object
Bases:
pycram.designator.ObjectDesignatorDescription.Object
A single element that fits the description.
- part_pose: pycram.datastructures.pose.Pose
- to_sql() pycram.orm.object_designator.ObjectPart
Create an ORM object that corresponds to this description.
- Returns:
The created ORM object.
- insert(session: sqlalchemy.orm.session.Session) pycram.orm.object_designator.ObjectPart
Add and commit this and all related objects to the session. Auto-Incrementing primary keys and foreign keys have to be filled by this method.
- Parameters:
session – Session with a database that is used to add and commit the objects
- Returns:
The completely instanced ORM object
- ground() Object
Default resolver, returns the first result of the iterator of this instance.
- Returns:
A resolved object designator
- __iter__()
Iterates through every possible solution for the given input parameter.
- Yield:
A resolved Object designator
- class pycram.designators.object_designator.LocatedObject(names: typing_extensions.List[str], types: typing_extensions.List[str], reference_frames: typing_extensions.List[str], timestamps: typing_extensions.List[float], resolver: typing_extensions.Optional[typing_extensions.Callable] = None)
Bases:
pycram.designator.ObjectDesignatorDescription
Description for KnowRob located objects. Currently has no resolver
Describing an object resolved through knowrob.
- Parameters:
names – List of possible names describing the object
types – List of possible types describing the object
reference_frames – Frame of reference in which the object position should be
timestamps – Timestamps for which positions should be returned
resolver – An alternative resolver that resolves the input parameter to an object designator.
- class Object
Bases:
pycram.designator.ObjectDesignatorDescription.Object
A single element that fits the description.
- reference_frame: str
Reference frame in which the position is given
- timestamp: float
Timestamp at which the position was valid
- class pycram.designators.object_designator.RealObject(names: typing_extensions.Optional[typing_extensions.List[str]] = None, types: typing_extensions.Optional[typing_extensions.List[str]] = None, world_object: pycram.world_concepts.world_object.Object = None, resolver: typing_extensions.Optional[typing_extensions.Callable] = None)
Bases:
pycram.designator.ObjectDesignatorDescription
Object designator representing an object in the real world, when resolving this object designator description ] RoboKudo is queried to perceive an object fitting the given criteria. Afterward the resolver tries to match the found object to an Object in the World.
- Parameters:
names –
types –
world_object –
resolver –
- class Object
Bases:
pycram.designator.ObjectDesignatorDescription.Object
A single element that fits the description.
- pose: pycram.datastructures.pose.Pose
Pose of the perceived object
- __iter__()
Queries RoboKudo for objects that fit the description and then iterates over all World objects that have the same type to match a World object to the real object.
- Yield:
A resolved object designator with reference world object