pycram.designators.specialized_designators.location.database_location#
Classes#
A location that is described by a pose, a reachable arm, a torso height and a grasp. |
|
Abstract Class for JPT and Database costmaps. |
|
Class that represents costmap locations from a given Database. |
Module Contents#
- class pycram.designators.specialized_designators.location.database_location.Location#
Bases:
pycram.designator.LocationDesignatorDescription.LocationA location that is described by a pose, a reachable arm, a torso height and a grasp.
- reachable_arm: str#
- torso_height: float#
- grasp: str#
- class pycram.designators.specialized_designators.location.database_location.AbstractCostmapLocation(target, reachable_for=None, reachable_arm=None)#
Bases:
pycram.designators.location_designator.CostmapLocationAbstract Class for JPT and Database costmaps.
- create_occupancy_rectangles() typing_extensions.List[pycram.costmaps.Rectangle]#
- Returns:
A list of rectangles that represent the occupied space of the target object.
- class pycram.designators.specialized_designators.location.database_location.DatabaseCostmapLocation(target, session: sqlalchemy.orm.Session = None, reachable_for=None, reachable_arm=None)#
Bases:
AbstractCostmapLocationClass that represents costmap locations from a given Database. The database has to have a schema that is compatible with the pycram.orm package.
- session = None#
- static select_statement(view: typing_extensions.Type[pycram.orm.views.PickUpWithContextView]) sqlalchemy.Select#
- create_query_from_occupancy_costmap() sqlalchemy.Select#
Create a query that queries all relative robot positions from an object that are not occluded using an OccupancyCostmap.
- sample_to_location(sample: sqlalchemy.engine.row.Row) Location#
Convert a database row to a costmap location.
- Parameters:
sample – The database row.
- Returns:
The costmap location
- __iter__() Location#
Generates positions for a given set of constrains from a costmap and returns them. The generation is based of a costmap which itself is the product of merging costmaps, each for a different purpose. In any case an occupancy costmap is used as the base, then according to the given constrains a visibility or gaussian costmap is also merged with this. Once the costmaps are merged, a generator generates pose candidates from the costmap. Each pose candidate is then validated against the constraints given by the designator if all validators pass the pose is considered valid and yielded.
- yield:
An instance of CostmapLocation.Location with a valid position that satisfies the given constraints