ed.world_model

Classes

WM

Module Contents

class ed.world_model.WM(tf_buffer=None, ns=None)[source]
Parameters:

ns (str) –

_ed_simple_query_srv
_ed_update_srv
_ed_configure_srv
_ed_reset_srv
static create_service_client(name, srv_type)[source]

Creates a service client

Parameters:
  • name (str) – string with the name of the service in the correct namespace

  • srv_type (type) – service type

Returns:

the service client

get_entities(center_point, etype='', radius=float('inf'), uuid='', ignore_z=False)[source]

Get entities via Simple Query interface

Parameters:
  • etype (str) – Type of entity

  • center_point (pykdl_ros.VectorStamped) – Point from which radius is measured

  • radius (float) – Distance between center_point and entity

  • uuid (str) – uuid of entity

  • ignore_z (bool) – Consider only the distance in the X,Y plane for the radius from center_point

Return type:

List[ed.entity.Entity]

get_closest_entity(center_point, etype='', radius=float('inf'))[source]
Parameters:
Return type:

Optional[ed.entity.Entity]

get_closest_room(center_point, radius=float('inf'))[source]
Parameters:
Return type:

ed.entity.Entity

get_entity(uuid)[source]
Parameters:

uuid (str) –

Return type:

Optional[ed.entity.Entity]

update_entity(uuid, etype=None, frame_stamped=None, flags=None, add_flags=None, remove_flags=None, action=None)[source]

Updates entity

Parameters:
  • uuid (str) – entity uuid

  • etype (str) – entity type

  • frame_stamped (pykdl_ros.FrameStamped) – If specified, the entity is updated to be at this FrameStamped

  • flags – (OBSOLETE, use add_flags and remove_flags): (list of) dict(s) containing key “add” or “remove” and value of the flag to set, e.g., “perception”

  • add_flags (List[str]) – list of flags which will be added to the specified entity

  • remove_flags (List[str]) – list of flags which will removed from the specified entity

  • action (str) – update_action, e.g. remove

Return type:

bool

remove_entity(uuid)[source]

Removes entity with the provided uuid to the world model

Parameters:

uuid (str) – string with the uuid of the entity to remove

Return type:

bool

lock_entities(lock_ids, unlock_ids)[source]
Parameters:
  • lock_ids (List[str]) –

  • unlock_ids (List[str]) –

get_closest_possible_person_entity(center_point, radius=float('inf'))[source]

Returns the “possible_human” entity closest to a certain center point.

Parameters:
  • center_point (pykdl_ros.VectorStamped) – Point indicating where the human should be close to; frame_id should be map

  • radius (float) – (float) radius to look for possible humans

Returns:

(Entity) entity (if found), None otherwise

Return type:

Optional[ed.entity.Entity]

get_full_uuid(short_uuid)[source]

Get an entity”s full uuid based on the first characters of its uuid like you can do with git hashes

Parameters:

short_uuid (str) –

Return type:

Iterable[str]