pycram.resolver.location.database_location

Module Contents

Classes

Location

A location that is described by a pose, a reachable arm, a torso height and a grasp.

AbstractCostmapLocation

Abstract Class for JPT and Database costmaps.

DatabaseCostmapLocation

Class that represents costmap locations from a given Database.

class pycram.resolver.location.database_location.Location

Bases: pycram.designator.LocationDesignatorDescription.Location

A location that is described by a pose, a reachable arm, a torso height and a grasp.

pose: pycram.datastructures.pose.Pose
reachable_arm: str
torso_height: float
grasp: str
class pycram.resolver.location.database_location.AbstractCostmapLocation(target, reachable_for=None, reachable_arm=None)

Bases: pycram.designators.location_designator.CostmapLocation

Abstract Class for JPT and Database costmaps.

Create a new AbstractCostmapLocation instance. :param target: The target object :param reachable_for: :param reachable_arm:

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.resolver.location.database_location.DatabaseCostmapLocation(target, session: sqlalchemy.orm.Session = None, reachable_for=None, reachable_arm=None)

Bases: AbstractCostmapLocation

Class that represents costmap locations from a given Database. The database has to have a schema that is compatible with the pycram.orm package.

Create a Database Costmap

Parameters:
  • target – The target object

  • session – A session that can be used to execute queries

  • reachable_for – The robot to grab the object with

  • reachable_arm – The arm to use

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