pycram.datastructures.world
===========================

.. py:module:: pycram.datastructures.world


Classes
-------

.. autoapisummary::

   pycram.datastructures.world.World
   pycram.datastructures.world.UseProspectionWorld
   pycram.datastructures.world.WorldSync


Module Contents
---------------

.. py:class:: World(mode: pycram.datastructures.enums.WorldMode = WorldMode.DIRECT, is_prospection: bool = False, clear_cache: bool = False, id_: int = -1)

   Bases: :py:obj:`pycram.datastructures.world_entity.WorldEntity`, :py:obj:`abc.ABC`


   The World Class represents the physics Simulation and belief state, it is the main interface for reasoning about
   the World. This is implemented as a singleton, the current World can be accessed via the static variable
   current_world which is managed by the World class itself.


   .. py:attribute:: conf
      :type:  typing_extensions.Type[pycram.config.world_conf.WorldConfig]

      The configurations of the world, the default configurations are defined in world_conf.py in the config folder.



   .. py:attribute:: current_world
      :type:  typing_extensions.Optional[World]
      :value: None


      Global reference to the currently used World, usually this is the
      graphical one. However, if you are inside a UseProspectionWorld() environment the current_world points to the
      prospection world. In this way you can comfortably use the current_world, which should point towards the World
      used at the moment.



   .. py:attribute:: robot
      :type:  typing_extensions.Optional[pycram.world_concepts.world_object.Object]
      :value: None


      Global reference to the spawned Object that represents the robot. The robot is identified by checking the name in
       the URDF with the name of the URDF on the parameter server. 



   .. py:attribute:: environment
      :type:  typing_extensions.Optional[pycram.world_concepts.world_object.Object]
      :value: None


      Global reference to the spawned Object that represents the environment. The environment is identified by checking the name in
       the URDF with the name of the URDF on the parameter server. 



   .. py:attribute:: cache_manager
      :type:  pycram.cache_manager.CacheManager

      Global reference for the cache manager, this is used to cache the description files of the robot and the objects.



   .. py:attribute:: ontology
      :type:  typing_extensions.Optional[pycrap.ontology_wrapper.OntologyWrapper]
      :value: None


      The ontology of this world.



   .. py:attribute:: is_prospection_world
      :type:  bool
      :value: False



   .. py:attribute:: latest_state_id
      :type:  typing_extensions.Optional[int]
      :value: None



   .. py:attribute:: object_lock
      :type:  threading.Lock


   .. py:attribute:: objects
      :type:  typing_extensions.List[pycram.world_concepts.world_object.Object]
      :value: []



   .. py:attribute:: local_transformer


   .. py:attribute:: mode
      :type:  pycram.datastructures.enums.WorldMode


   .. py:attribute:: coll_callbacks
      :type:  typing_extensions.Dict[typing_extensions.Tuple[pycram.world_concepts.world_object.Object, pycram.world_concepts.world_object.Object], pycram.datastructures.dataclasses.CollisionCallbacks]


   .. py:attribute:: _current_state
      :type:  typing_extensions.Optional[pycram.datastructures.dataclasses.WorldState]
      :value: None



   .. py:attribute:: original_state_id
      :value: None



   .. py:attribute:: on_add_object_callbacks
      :type:  typing_extensions.List[typing_extensions.Callable[[pycram.world_concepts.world_object.Object], None]]
      :value: []



   .. py:method:: _set_world_rules()

      Create the rules for the world.



   .. py:property:: rules
      :type: typing_extensions.List[pycrap.ontologies.crax.rules.CRAXRule]


      Return the rules of the world.



   .. py:method:: update_containment_for(bodies: typing_extensions.List[pycram.datastructures.world_entity.PhysicalBody], candidate_selection_method: pycram.datastructures.enums.AdjacentBodyMethod = ABM.ClosestPoints) -> typing_extensions.List[pycram.datastructures.world_entity.PhysicalBody]
      :staticmethod:


      Update the containment for the given bodies by checking if they are contained in other bodies.

      :param bodies: The bodies to update the containment for.
      :param candidate_selection_method: The method to select the candidate bodies for containment update.
      :return: The updated bodies.



   .. py:property:: parent_entity
      :type: typing_extensions.Optional[pycram.datastructures.world_entity.WorldEntity]


      Return the parent entity of this entity, in this case it is None as the World is the top level entity.



   .. py:property:: name
      :type: str


      Return the name of the world, which is the name of the implementation class (e.g. BulletWorld).



   .. py:method:: get_body_convex_hull(body: pycram.datastructures.world_entity.PhysicalBody) -> trimesh.Trimesh
      :abstractmethod:


      :param body: The body object.
      :return: The convex hull of the body as a Geometry3D object.



   .. py:method:: add_callback_on_add_object(callback: typing_extensions.Callable[[pycram.world_concepts.world_object.Object], None]) -> None

      Add a callback that is called when an object is added to the world.

      :param callback: The callback.



   .. py:method:: remove_callback_on_add_object(callback: typing_extensions.Callable[[pycram.world_concepts.world_object.Object], None]) -> None

      Remove a callback that is called when an object is added to the world.

      :param callback: The callback.



   .. py:method:: get_cache_dir() -> str
      :classmethod:


      Return the cache directory.



   .. py:method:: add_object(obj: pycram.world_concepts.world_object.Object) -> None

      Add an object to the world.

      :param obj: The object to be added.



   .. py:method:: invoke_on_add_object_callbacks(obj: pycram.world_concepts.world_object.Object) -> None

      Invoke the object added callbacks.

      :param obj: The object.



   .. py:property:: robot_description
      :type: pycram.robot_description.RobotDescription


      Return the current robot description.



   .. py:property:: robot_has_actuators
      :type: bool


      Return whether the robot has actuators.



   .. py:method:: get_actuator_for_joint(joint: pycram.description.Joint) -> str

      Get the actuator name for a given joint.



   .. py:method:: joint_has_actuator(joint: pycram.description.Joint) -> bool

      Return whether the joint has an actuator.



   .. py:property:: robot_joint_actuators
      :type: typing_extensions.Dict[str, str]


      Return the joint actuators of the robot.



   .. py:method:: check_object_exists(obj: pycram.world_concepts.world_object.Object) -> bool
      :abstractmethod:


      Check if the object exists in the simulator.

      :param obj: The object to check.
      :return: True if the object is in the world, False otherwise.



   .. py:method:: _init_world(mode: pycram.datastructures.enums.WorldMode)
      :abstractmethod:


      Initialize the physics simulation.



   .. py:method:: _init_events()

      Initialize dynamic events that can be used to react to changes in the World.



   .. py:method:: _init_and_sync_prospection_world()

      Initialize the prospection world and the synchronization between the main and the prospection world.



   .. py:method:: _update_local_transformer_worlds()

      Update the local transformer worlds with the current world and prospection world.



   .. py:method:: _init_prospection_world()

      Initialize the prospection world, if this is a prospection world itself it will not create another prospection,
      world, but instead set the prospection world to None, else it will create a prospection world.



   .. py:method:: _sync_prospection_world()

      Synchronize the prospection world with the main world, this means that every object in the main world will be
      added to the prospection world and vice versa.



   .. py:method:: preprocess_object_file_and_get_its_cache_path(path: str, ignore_cached_files: bool, description: pycram.description.ObjectDescription, name: str, scale_mesh: typing_extensions.Optional[float] = None, mesh_transform: typing_extensions.Optional[pycram.datastructures.pose.TransformStamped] = None, color: typing_extensions.Optional[pycram.datastructures.dataclasses.Color] = None) -> str

      Update the cache directory with the given object.

      :param path: The path to the object.
      :param ignore_cached_files: If the cached files should be ignored.
      :param description: The object description.
      :param name: The name of the object.
      :param scale_mesh: The scale of the mesh.
      :param mesh_transform: The mesh transform to apply to the mesh.
      :param color: The color of the object.
      :return: The path of the cached object.



   .. py:property:: simulation_time_step

      The time step of the simulation in seconds.



   .. py:method:: load_object_and_get_id(path: typing_extensions.Optional[str] = None, pose: typing_extensions.Optional[pycram.datastructures.pose.PoseStamped] = None, obj_type: typing_extensions.Optional[typing_extensions.Type[pycrap.ontologies.PhysicalObject]] = None) -> int
      :abstractmethod:


      Load a description file (e.g. URDF) at the given pose and returns the id of the loaded object.

      :param path: The path to the description file, if None the description file is assumed to be already loaded.
      :param pose: The pose at which the object should be loaded.
      :param obj_type: The type of the object.
      :return: The id of the loaded object.



   .. py:method:: load_generic_object_and_get_id(description: pycram.object_descriptors.generic.ObjectDescription, pose: typing_extensions.Optional[pycram.datastructures.pose.PoseStamped] = None) -> int
      :abstractmethod:


      Create a visual and collision box in the simulation and returns the id of the loaded object.

      :param description: The object description.
      :param pose: The pose at which the object should be loaded.



   .. py:method:: get_object_names() -> typing_extensions.List[str]

      Return the names of all objects in the World.

      :return: A list of object names.



   .. py:method:: get_object_by_name(name: str) -> typing_extensions.Optional[pycram.world_concepts.world_object.Object]

      Return the object with the given name. If there is no object with the given name, None is returned.

      :param name: The name of the returned Objects.
      :return: The object with the given name, if there is one.



   .. py:method:: get_object_by_type(obj_type: pycrap.ontologies.PhysicalObject) -> typing_extensions.List[pycram.world_concepts.world_object.Object]

      Return a list of all Objects which have the type 'obj_type'.

      :param obj_type: The type of the returned Objects.
      :return: A list of all Objects that have the type 'obj_type'.



   .. py:method:: get_object_by_id(obj_id: int) -> pycram.world_concepts.world_object.Object

      Return the single Object that has the unique id.

      :param obj_id: The unique id for which the Object should be returned.
      :return: The Object with the id 'id'.



   .. py:method:: get_scene_objects() -> typing_extensions.List[pycram.world_concepts.world_object.Object]

      :return: A list of all objects in the world except the robot, floor, and apartment.



   .. py:method:: remove_visual_object(obj_id: int) -> bool

      Remove the object with the given id from the world, and saves a new original state for the world.

      :param obj_id: The unique id of the object to be removed.
      :return: Whether the object was removed successfully.



   .. py:method:: _remove_visual_object(obj_id: int) -> bool
      :abstractmethod:


      Remove the visual object with the given id from the world, and update the simulator state in the original state.

      :param obj_id: The unique id of the visual object to be removed.
      :return: Whether the object was removed successfully.



   .. py:method:: remove_object_from_simulator(obj: pycram.world_concepts.world_object.Object) -> bool
      :abstractmethod:


      Remove an object from the physics simulator.

      :param obj: The object to be removed.
      :return: Whether the object was removed successfully.



   .. py:method:: remove_object(obj: pycram.world_concepts.world_object.Object) -> None

      Remove this object from the current world.
      For the object to be removed it has to be detached from all objects it
      is currently attached to. After this is done a call to world remove object is done
      to remove this Object from the simulation/world.

      :param obj: The object to be removed.



   .. py:method:: remove_object_from_original_state(obj: pycram.world_concepts.world_object.Object) -> None

      Remove an object from the original state of the world.

      :param obj: The object to be removed.



   .. py:method:: add_object_to_original_state(obj: pycram.world_concepts.world_object.Object) -> None

      Add an object to the original state of the world.

      :param obj: The object to be added.



   .. py:method:: add_fixed_constraint(parent_link: pycram.description.Link, child_link: pycram.description.Link, child_to_parent_transform: pycram.datastructures.pose.TransformStamped) -> int

      Create a fixed joint constraint between the given parent and child links,
      the joint frame will be at the origin of the child link frame, and would have the same orientation
      as the child link frame.

      :param parent_link: The constrained link of the parent object.
      :param child_link: The constrained link of the child object.
      :param child_to_parent_transform: The transform from the child link frame to the parent link frame.
      :return: The unique id of the created constraint.



   .. py:method:: add_constraint(constraint: pycram.world_concepts.constraints.Constraint) -> int
      :abstractmethod:


      Add a constraint between two objects links so that they become attached for example.

      :param constraint: The constraint data used to create the constraint.



   .. py:method:: remove_constraint(constraint_id) -> None
      :abstractmethod:


      Remove a constraint by its ID.

      :param constraint_id: The unique id of the constraint to be removed.



   .. py:method:: get_joint_position(joint: pycram.description.Joint) -> float

      Wrapper for :meth:`_get_joint_position` that return 0.0 for a joint if it is in the ignore joints list.



   .. py:method:: _get_joint_position(joint: pycram.description.Joint) -> float
      :abstractmethod:


      Get the position of a joint of an articulated object

      :param joint: The joint to get the position for.
      :return: The joint position as a float.



   .. py:method:: get_object_joint_names(obj: pycram.world_concepts.world_object.Object) -> typing_extensions.List[str]
      :abstractmethod:


      Return the names of all joints of this object.

      :param obj: The object.
      :return: A list of joint names.



   .. py:method:: get_link_pose(link: pycram.description.Link) -> pycram.datastructures.pose.PoseStamped
      :abstractmethod:


      Get the pose of a link of an articulated object with respect to the world frame.

      :param link: The link as a AbstractLink object.
      :return: The pose of the link as a Pose object.



   .. py:method:: get_multiple_link_poses(links: typing_extensions.List[pycram.description.Link]) -> typing_extensions.Dict[str, pycram.datastructures.pose.PoseStamped]
      :abstractmethod:


      Get the poses of multiple links of an articulated object with respect to the world frame.

      :param links: The links as a list of AbstractLink objects.
      :return: A dictionary with link names as keys and Pose objects as values.



   .. py:method:: get_link_position(link: pycram.description.Link) -> typing_extensions.List[float]
      :abstractmethod:


      Get the position of a link of an articulated object with respect to the world frame.

      :param link: The link as a AbstractLink object.
      :return: The position of the link as a list of floats.



   .. py:method:: get_link_orientation(link: pycram.description.Link) -> typing_extensions.List[float]
      :abstractmethod:


      Get the orientation of a link of an articulated object with respect to the world frame.

      :param link: The link as a AbstractLink object.
      :return: The orientation of the link as a list of floats.



   .. py:method:: get_multiple_link_positions(links: typing_extensions.List[pycram.description.Link]) -> typing_extensions.Dict[str, typing_extensions.List[float]]
      :abstractmethod:


      Get the positions of multiple links of an articulated object with respect to the world frame.

      :param links: The links as a list of AbstractLink objects.
      :return: A dictionary with link names as keys and lists of floats as values.



   .. py:method:: get_multiple_link_orientations(links: typing_extensions.List[pycram.description.Link]) -> typing_extensions.Dict[str, typing_extensions.List[float]]
      :abstractmethod:


      Get the orientations of multiple links of an articulated object with respect to the world frame.

      :param links: The links as a list of AbstractLink objects.
      :return: A dictionary with link names as keys and lists of floats as values.



   .. py:method:: get_object_link_names(obj: pycram.world_concepts.world_object.Object) -> typing_extensions.List[str]
      :abstractmethod:


      Return the names of all links of this object.

      :param obj: The object.
      :return: A list of link names.



   .. py:method:: simulate(seconds: float, real_time: typing_extensions.Optional[bool] = False, func: typing_extensions.Optional[typing_extensions.Callable[[], None]] = None) -> None

      Simulate Physics in the World for a given amount of seconds. Usually this simulation is faster than real
      time. By setting the 'real_time' parameter this simulation is slowed down such that the simulated time is equal
      to real time.

      :param seconds: The amount of seconds that should be simulated.
      :param real_time: If the simulation should happen in real time or faster.
      :param func: A function that should be called during the simulation



   .. py:method:: get_object_pose(obj: pycram.world_concepts.world_object.Object) -> pycram.datastructures.pose.PoseStamped
      :abstractmethod:


      Get the pose of an object in the world frame from the current object pose in the simulator.

      :param obj: The object.



   .. py:method:: get_multiple_object_poses(objects: typing_extensions.List[pycram.world_concepts.world_object.Object]) -> typing_extensions.Dict[str, pycram.datastructures.pose.PoseStamped]
      :abstractmethod:


      Get the poses of multiple objects in the world frame from the current object poses in the simulator.

      :param objects: The objects.



   .. py:method:: get_multiple_object_positions(objects: typing_extensions.List[pycram.world_concepts.world_object.Object]) -> typing_extensions.Dict[str, typing_extensions.List[float]]
      :abstractmethod:


      Get the positions of multiple objects in the world frame from the current object poses in the simulator.

      :param objects: The objects.



   .. py:method:: get_object_position(obj: pycram.world_concepts.world_object.Object) -> typing_extensions.List[float]
      :abstractmethod:


      Get the position of an object in the world frame from the current object pose in the simulator.

      :param obj: The object.



   .. py:method:: get_multiple_object_orientations(objects: typing_extensions.List[pycram.world_concepts.world_object.Object]) -> typing_extensions.Dict[str, typing_extensions.List[float]]
      :abstractmethod:


      Get the orientations of multiple objects in the world frame from the current object poses in the simulator.

      :param objects: The objects.



   .. py:method:: get_object_orientation(obj: pycram.world_concepts.world_object.Object) -> typing_extensions.List[float]
      :abstractmethod:


      Get the orientation of an object in the world frame from the current object pose in the simulator.

      :param obj: The object.



   .. py:property:: robot_virtual_joints
      :type: typing_extensions.List[pycram.description.Joint]


      The virtual joints of the robot.



   .. py:property:: robot_virtual_joints_names
      :type: typing_extensions.List[str]


      The names of the virtual joints of the robot.



   .. py:method:: get_robot_mobile_base_joints() -> pycram.datastructures.dataclasses.VirtualMobileBaseJoints

      Get the mobile base joints of the robot.

      :return: The mobile base joints.



   .. py:method:: perform_collision_detection() -> None
      :abstractmethod:


      Check for collisions between all objects in the World and updates the contact points.



   .. py:method:: get_object_contact_points(obj: pycram.world_concepts.world_object.Object) -> pycram.datastructures.dataclasses.ContactPointsList

      Same as :meth:`get_body_contact_points` but with objects instead of any type of bodies.



   .. py:method:: get_body_contact_points(body: pycram.datastructures.world_entity.PhysicalBody) -> pycram.datastructures.dataclasses.ContactPointsList
      :abstractmethod:


      Return the contact points of a body with all other bodies in the world.

      :param body: The body.



   .. py:method:: get_contact_points_between_two_objects(obj1: pycram.world_concepts.world_object.Object, obj2: pycram.world_concepts.world_object.Object) -> pycram.datastructures.dataclasses.ContactPointsList

      Same as :meth:`get_contact_points_between_two_bodies` but with objects instead of any type of bodies.



   .. py:method:: get_contact_points_between_two_bodies(body_1: pycram.datastructures.world_entity.PhysicalBody, body_2: pycram.datastructures.world_entity.PhysicalBody) -> pycram.datastructures.dataclasses.ContactPointsList
      :abstractmethod:


      Return a list of contact points between two bodies.

      :param body_1: The first body.
      :param body_2: The second body.
      :return: A list of all contact points between the two bodies.



   .. py:method:: get_body_closest_points(body: pycram.datastructures.world_entity.PhysicalBody, max_distance: float) -> pycram.datastructures.dataclasses.ClosestPointsList

      Return the closest points of this body with all other bodies in the world.

      :param body: The body.
      :param max_distance: The maximum allowed distance between the points.
      :return: A list of the closest points.



   .. py:method:: get_closest_points_between_two_bodies(body_a: pycram.datastructures.world_entity.PhysicalBody, body_b: pycram.datastructures.world_entity.PhysicalBody, max_distance: float) -> pycram.datastructures.dataclasses.ClosestPointsList
      :abstractmethod:


      Return the closest points between two objects.

      :param body_a: The first body.
      :param body_b: The second body.
      :param max_distance: The maximum distance between the points.
      :return: A list of the closest points.



   .. py:method:: reset_joint_position(joint: pycram.description.Joint, joint_position: float) -> bool

      Wrapper around :meth:`_reset_joint_position` that checks if the joint should be ignored.



   .. py:method:: _reset_joint_position(joint: pycram.description.Joint, joint_position: float) -> bool
      :abstractmethod:


      Reset the joint position instantly without physics simulation

      .. note::
         It is recommended to use the validate_joint_position decorator to validate the joint position for
         the implementation of this method.

      :param joint: The joint to reset the position for.
      :param joint_position: The new joint pose.
      :return: True if the reset was successful, False otherwise



   .. py:method:: set_multiple_joint_positions(joint_positions: typing_extensions.Dict[pycram.description.Joint, float]) -> bool

      Wrapper around :meth:`_set_multiple_joint_positions` that checks if any of the joints should be ignored.



   .. py:method:: _set_multiple_joint_positions(joint_positions: typing_extensions.Dict[pycram.description.Joint, float]) -> bool
      :abstractmethod:


      Set the positions of multiple joints of an articulated object.

      .. note::
         It is recommended to use the validate_multiple_joint_positions decorator to validate the
         joint positions for the implementation of this method.

      :param joint_positions: A dictionary with joint objects as keys and joint positions as values.
      :return: True if the set was successful, False otherwise.



   .. py:method:: get_multiple_joint_positions(joints: typing_extensions.List[pycram.description.Joint]) -> typing_extensions.Dict[str, float]

      Wrapper around :meth:`_get_multiple_joint_positions` that checks if any of the joints should be ignored.



   .. py:method:: _get_multiple_joint_positions(joints: typing_extensions.List[pycram.description.Joint]) -> typing_extensions.Dict[str, float]
      :abstractmethod:


      Get the positions of multiple joints of an articulated object.

      :param joints: The joints as a list of Joint objects.



   .. py:method:: reset_object_base_pose(obj: pycram.world_concepts.world_object.Object, pose: pycram.datastructures.pose.PoseStamped) -> bool
      :abstractmethod:


      Reset the world position and orientation of the base of the object instantaneously,
      not through physics simulation. (x,y,z) position vector and (x,y,z,w) quaternion orientation.

      .. note::
         It is recommended to use the validate_object_pose decorator to validate the object pose for the
         implementation of this method.

      :param obj: The object.
      :param pose: The new pose as a Pose object.
      :return: True if the reset was successful, False otherwise.



   .. py:method:: reset_multiple_objects_base_poses(objects: typing_extensions.Dict[pycram.world_concepts.world_object.Object, pycram.datastructures.pose.PoseStamped]) -> bool
      :abstractmethod:


      Reset the world position and orientation of the base of multiple objects instantaneously,
      not through physics simulation. (x,y,z) position vector and (x,y,z,w) quaternion orientation.

      :param objects: A dictionary with objects as keys and poses as values.
      :return: True if the reset was successful, False otherwise.



   .. py:method:: step(func: typing_extensions.Optional[typing_extensions.Callable[[], None]] = None, step_seconds: typing_extensions.Optional[float] = None) -> None
      :abstractmethod:


      Step the world simulation using forward dynamics.

      :param func: An optional function to be called during the step.
      :param step_seconds: The amount of seconds to step the simulation if None the simulation is stepped by the
      simulation time step.



   .. py:method:: get_arm_tool_frame_link(arm: pycram.datastructures.enums.Arms) -> pycram.description.Link

      Get the tool frame link of the arm of the robot.

      :param arm: The arm for which the tool frame link should be returned.
      :return: The tool frame link of the arm.



   .. py:method:: set_link_color(link: pycram.description.Link, rgba_color: pycram.datastructures.dataclasses.Color)
      :abstractmethod:


      Change the rgba_color of a link of this object, the rgba_color has to be given as Color object.

      :param link: The link which should be colored.
      :param rgba_color: The rgba_color as Color object with RGBA values between 0 and 1.



   .. py:method:: get_link_color(link: pycram.description.Link) -> pycram.datastructures.dataclasses.Color
      :abstractmethod:


      :param link: The link for which the rgba_color should be returned.
      :return: The rgba_color as Color object with RGBA values between 0 and 1.



   .. py:method:: get_colors_of_object_links(obj: pycram.world_concepts.world_object.Object) -> typing_extensions.Dict[str, pycram.datastructures.dataclasses.Color]
      :abstractmethod:


      :param obj: The object
      :return: The RGBA colors of each link in the object as a dictionary from link name to rgba_color.



   .. py:method:: get_object_axis_aligned_bounding_box(obj: pycram.world_concepts.world_object.Object) -> pycram.datastructures.dataclasses.AxisAlignedBoundingBox
      :abstractmethod:


      :param obj: The object for which the bounding box should be returned.
      :return: the axis aligned bounding box of this object. The return of this method are two points in
      world coordinate frame which define a bounding box.



   .. py:method:: get_object_rotated_bounding_box(obj: pycram.world_concepts.world_object.Object) -> pycram.datastructures.dataclasses.RotatedBoundingBox
      :abstractmethod:


      :param obj: The object for which the bounding box should be returned.
      :return: the rotated bounding box of this object. The return of this method are two points in
      world coordinate frame which define a bounding box.



   .. py:method:: get_link_axis_aligned_bounding_box(link: pycram.description.Link) -> pycram.datastructures.dataclasses.AxisAlignedBoundingBox
      :abstractmethod:


      :param link: The link for which the bounding box should be returned.
      :return: The axis aligned bounding box of the link. The return of this method are two points in
      world coordinate frame which define a bounding box.



   .. py:method:: get_link_rotated_bounding_box(link: pycram.description.Link) -> pycram.datastructures.dataclasses.RotatedBoundingBox
      :abstractmethod:


      :param link: The link for which the bounding box should be returned.
      :return: The rotated bounding box of the link. The return of this method are two points in
      world coordinate frame which define a bounding box.



   .. py:method:: set_realtime(real_time: bool) -> None
      :abstractmethod:


      Enable the real time simulation of Physics in the World. By default, this is disabled and Physics is only
      simulated to reason about it.

      :param real_time: Whether the World should simulate Physics in real time.



   .. py:method:: set_gravity(gravity_vector: typing_extensions.List[float]) -> None
      :abstractmethod:


      Set the gravity that is used in the World. By default, it is set to the gravity on earth ([0, 0, -9.8]).
       Gravity is given as a vector in x,y,z. Gravity is only applied while simulating Physic.

      :param gravity_vector: The gravity vector that should be used in the World.



   .. py:method:: set_robot_if_not_set(robot: pycram.world_concepts.world_object.Object) -> None

      Set the robot if it is not set yet.

      :param robot: The Object reference to the Object representing the robot.



   .. py:method:: set_robot(robot: typing_extensions.Union[pycram.world_concepts.world_object.Object, None]) -> None
      :staticmethod:


      Set the global variable for the robot Object This should be set on spawning the robot.

      :param robot: The Object reference to the Object representing the robot.



   .. py:method:: robot_is_set() -> bool
      :staticmethod:


      Return whether the robot has been set or not.

      :return: True if the robot has been set, False otherwise.



   .. py:method:: exit(remove_saved_states: bool = True) -> None

      Close the World as well as the prospection world, also collects any other thread that is running.

      :param remove_saved_states: Whether to remove the saved states.



   .. py:method:: exit_prospection_world_if_exists() -> None

      Exit the prospection world if it exists.



   .. py:method:: signal_handler(sig, frame) -> None

      Signal handler for graceful exit of the world when a signal is received (e.g., SIGINT).



   .. py:method:: disconnect_from_physics_server() -> None
      :abstractmethod:


      Disconnect the world from the physics server.



   .. py:method:: reset_current_world() -> None

      Reset the pose of every object in the World to the pose it was spawned in and sets every joint to 0.



   .. py:method:: reset_robot() -> None

      Set the robot class variable to None.



   .. py:method:: join_threads() -> None
      :abstractmethod:


      Join any running threads. Useful for example when exiting the world.



   .. py:method:: terminate_world_sync() -> None

      Terminate the world sync thread.



   .. py:method:: save_state(state_id: typing_extensions.Optional[int] = None, use_same_id: bool = False, to_file: bool = False) -> int

      Return the id of the saved state of the World. The saved state contains the states of all the objects and
      the state of the physics simulator.

      :param state_id: The id of the saved state.
      :param use_same_id: Whether to use the same current state id for the new saved state.
      :param to_file: Whether to save the state to a file.
      :return: A unique id of the state



   .. py:property:: current_state
      :type: pycram.datastructures.dataclasses.WorldState


      :return: The current state of this entity.



   .. py:method:: set_object_states_without_poses(states: typing_extensions.Dict[str, pycram.datastructures.dataclasses.ObjectState]) -> None

      Set the states of all objects in the World except the poses.

      :param states: A dictionary with the object id as key and the object state as value.



   .. py:property:: object_states
      :type: typing_extensions.Dict[str, pycram.datastructures.dataclasses.ObjectState]


      Return the states of all objects in the World.

      :return: A dictionary with the object id as key and the object state as value.



   .. py:method:: save_objects_state(state_id: int) -> None

      Save the state of all objects in the World according to the given state using the unique state id.

      :param state_id: The unique id representing the state.



   .. py:method:: save_physics_simulator_state(state_id: typing_extensions.Optional[int] = None, use_same_id: bool = False) -> int
      :abstractmethod:


      Save the state of the physics simulator and returns the unique id of the state.

      :param state_id: The used specified unique id representing the state.
      :param use_same_id: If the same id should be used for the state.
      :return: The unique id representing the state.



   .. py:method:: remove_physics_simulator_state(state_id: int) -> None
      :abstractmethod:


      Remove the state of the physics simulator with the given id.

      :param state_id: The unique id representing the state.



   .. py:method:: restore_physics_simulator_state(state_id: int) -> None
      :abstractmethod:


      Restore the objects and environment state in the physics simulator according to
       the given state using the unique state id.

      :param state_id: The unique id representing the state.



   .. py:method:: get_images_for_target(target_pose: pycram.datastructures.pose.PoseStamped, cam_pose: pycram.datastructures.pose.PoseStamped, size: typing_extensions.Optional[int] = 256) -> typing_extensions.List[numpy.ndarray]

      Calculate the view and projection Matrix and returns 3 images:

      1. An RGB image
      2. A depth image
      3. A segmentation Mask, the segmentation mask indicates for every pixel the visible Object

      :param target_pose: The pose to which the camera should point.
      :param cam_pose: The pose of the camera.
      :param size: The height and width of the images in pixels.
      :return: A list containing an RGB and depth image as well as a segmentation mask, in this order.



   .. py:method:: register_two_objects_collision_callbacks(object_a: pycram.world_concepts.world_object.Object, object_b: pycram.world_concepts.world_object.Object, on_collision_callback: typing_extensions.Callable, on_collision_removal_callback: typing_extensions.Optional[typing_extensions.Callable] = None) -> None

      Register callback methods for contact between two Objects. There can be a callback for when the two Objects
      get in contact and, optionally, for when they are not in contact anymore.

      :param object_a: An object in the World
      :param object_b: Another object in the World
      :param on_collision_callback: A function that should be called if the objects are in contact
      :param on_collision_removal_callback: A function that should be called if the objects are not in contact



   .. py:method:: get_data_directories() -> typing_extensions.List[str]
      :classmethod:


      The resources directories where the objects, robots, and environments are stored.



   .. py:method:: add_resource_path(path: str, prepend: bool = False) -> None
      :classmethod:


      Add a resource path in which the World will search for files. This resource directory is searched if an
      Object is spawned only with a filename.

      :param path: A path in the filesystem in which to search for files.
      :param prepend: Put the new path at the beginning of the list such that it is searched first.



   .. py:method:: remove_resource_path(path: str) -> None
      :classmethod:


      Remove the given path from the data_directories list.

      :param path: The path to remove.



   .. py:method:: change_cache_dir_path(path: str) -> None
      :classmethod:


      Change the cache directory to the given path

      :param path: The new path for the cache directory.



   .. py:method:: get_prospection_object_for_object(obj: pycram.world_concepts.world_object.Object) -> pycram.world_concepts.world_object.Object

      Return the corresponding object from the prospection world for a given object in the main world.
       If the given Object is already in the prospection world, it is returned.

      :param obj: The object for which the corresponding object in the prospection World should be found.
      :return: The corresponding object in the prospection world.



   .. py:method:: get_object_for_prospection_object(prospection_object: pycram.world_concepts.world_object.Object) -> pycram.world_concepts.world_object.Object

      Return the corresponding object from the main World for a given
      object in the prospection world. If the  given object is not in the prospection
      world an error will be raised.

      :param prospection_object: The object for which the corresponding object in the main World should be found.
      :return: The object in the main World.



   .. py:method:: remove_all_objects(exclude_objects: typing_extensions.Optional[typing_extensions.List[pycram.world_concepts.world_object.Object]] = None) -> None

      Remove all objects from the World.

      :param exclude_objects: A list of objects that should not be removed.



   .. py:method:: reset_world(remove_saved_states=False) -> None

      Reset the World to the state it was first spawned in.
      All attached objects will be detached, all joints will be set to the
      default position of 0 and all objects will be set to the position and
      orientation in which they were spawned.

      :param remove_saved_states: If the saved states should be removed.



   .. py:method:: reset_concepts()

      Reset the concepts of the World.



   .. py:method:: remove_saved_states() -> None

      Remove all saved states of the World.



   .. py:method:: remove_objects_saved_states() -> None

      Remove all saved states of the objects in the World.



   .. py:method:: update_transforms_for_objects_in_current_world() -> None

      Updates transformations for all objects that are currently in :py:attr:`~pycram.world.World.current_world`.



   .. py:method:: ray_test(from_position: typing_extensions.List[float], to_position: typing_extensions.List[float], calculate_distance: bool = False) -> pycram.datastructures.dataclasses.RayResult

      A wrapper around the :py:meth:`~pycram.world.World._ray_test` method that also calculates the distance
       of the ray if the calculate_distance parameter is set to True.

      :param from_position: The starting position of the ray in Cartesian world coordinates.
      :param to_position: The ending position of the ray in Cartesian world coordinates.
      :param calculate_distance: Whether to calculate the distance of the ray.
      :return: A RayResult object.



   .. py:method:: _ray_test(from_position: typing_extensions.List[float], to_position: typing_extensions.List[float]) -> pycram.datastructures.dataclasses.RayResult
      :abstractmethod:


      Cast a ray and return the first object hit, if any.

      :param from_position: The starting position of the ray in Cartesian world coordinates.
      :param to_position: The ending position of the ray in Cartesian world coordinates.
      :return: A RayResult object.



   .. py:method:: ray_test_batch(from_positions: typing_extensions.List[typing_extensions.List[float]], to_positions: typing_extensions.List[typing_extensions.List[float]], num_threads: int = 1, calculate_distances: bool = False) -> typing_extensions.List[pycram.datastructures.dataclasses.RayResult]

      A wrapper around the :py:meth:`~pycram.world.World._ray_test_batch` method that also calculates the distances
      of the rays if the calculate_distances parameter is set to True.

      :param from_positions: The starting positions of the rays in Cartesian world coordinates.
      :param to_positions: The ending positions of the rays in Cartesian world coordinates.
      :param num_threads: The number of threads to use to compute the ray intersections for the batch.
      :param calculate_distances: Whether to calculate the distances of the rays.
      :return: A list of RayResult objects.



   .. py:method:: _ray_test_batch(from_positions: typing_extensions.List[typing_extensions.List[float]], to_positions: typing_extensions.List[typing_extensions.List[float]], num_threads: int = 1) -> typing_extensions.List[pycram.datastructures.dataclasses.RayResult]
      :abstractmethod:


      Cast a batch of rays and return the result for each of the rays (first object hit, if any. or -1)
       Takes optional argument num_threads to specify the number of threads to use
         to compute the ray intersections for the batch. Specify 0 to let simulator decide, 1 (default) for single
          core execution, 2 or more to select the number of threads to use.

      :param from_positions: The starting positions of the rays in Cartesian world coordinates.
      :param to_positions: The ending positions of the rays in Cartesian world coordinates.
      :param num_threads: The number of threads to use to compute the ray intersections for the batch.



   .. py:method:: create_visual_shape(visual_shape: pycram.datastructures.dataclasses.VisualShape) -> int

      Creates a visual shape in the physics simulator and returns the unique id of the created shape.

      :param visual_shape: The visual shape to be created, uses the VisualShape dataclass defined in world_dataclasses
      :return: The unique id of the created shape.



   .. py:method:: _create_visual_shape(visual_shape: pycram.datastructures.dataclasses.VisualShape) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.create_visual_shape`



   .. py:method:: create_multi_body_from_visual_shapes(visual_shape_ids: typing_extensions.List[int], pose: pycram.datastructures.pose.PoseStamped) -> int

      Creates a multi body from visual shapes in the physics simulator and returns the unique id of the created
      multi body.

      :param visual_shape_ids: The ids of the visual shapes that should be used to create the multi body.
      :param pose: The pose of the origin of the multi body relative to the world frame.
      :return: The unique id of the created multi body.



   .. py:method:: create_multi_body(multi_body: pycram.datastructures.dataclasses.MultiBody) -> int

      Creates a multi body in the physics simulator and returns the unique id of the created multi body. The multibody
      is created by joining multiple links/shapes together with joints.

      :param multi_body: The multi body to be created, uses the MultiBody dataclass defined in world_dataclasses.
      :return: The unique id of the created multi body.



   .. py:method:: _create_multi_body(multi_body: pycram.datastructures.dataclasses.MultiBody) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.create_multi_body`



   .. py:method:: create_box_visual_shape(shape_data: pycram.datastructures.dataclasses.BoxVisualShape) -> int

      Creates a box visual shape in the physics simulator and returns the unique id of the created shape.

      :param shape_data: The parameters that define the box visual shape to be created, uses the BoxVisualShape
       dataclass defined in world_dataclasses.
      :return: The unique id of the created shape.



   .. py:method:: _create_box_visual_shape(shape_data: pycram.datastructures.dataclasses.BoxVisualShape) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.create_box_visual_shape`



   .. py:method:: create_cylinder_visual_shape(shape_data: pycram.datastructures.dataclasses.CylinderVisualShape) -> int

      Creates a cylinder visual shape in the physics simulator and returns the unique id of the created shape.

      :param shape_data: The parameters that define the cylinder visual shape to be created, uses the
       CylinderVisualShape dataclass defined in world_dataclasses.
      :return: The unique id of the created shape.



   .. py:method:: _create_cylinder_visual_shape(shape_data: pycram.datastructures.dataclasses.CylinderVisualShape) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.create_cylinder_visual_shape`



   .. py:method:: create_sphere_visual_shape(shape_data: pycram.datastructures.dataclasses.SphereVisualShape) -> int

      Creates a sphere visual shape in the physics simulator and returns the unique id of the created shape.

      :param shape_data: The parameters that define the sphere visual shape to be created, uses the SphereVisualShape
       dataclass defined in world_dataclasses.
      :return: The unique id of the created shape.



   .. py:method:: _create_sphere_visual_shape(shape_data: pycram.datastructures.dataclasses.SphereVisualShape) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.create_sphere_visual_shape`



   .. py:method:: create_capsule_visual_shape(shape_data: pycram.datastructures.dataclasses.CapsuleVisualShape) -> int

      Creates a capsule visual shape in the physics simulator and returns the unique id of the created shape.

      :param shape_data: The parameters that define the capsule visual shape to be created, uses the
       CapsuleVisualShape dataclass defined in world_dataclasses.
      :return: The unique id of the created shape.



   .. py:method:: _create_capsule_visual_shape(shape_data: pycram.datastructures.dataclasses.CapsuleVisualShape) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.create_capsule_visual_shape`



   .. py:method:: create_plane_visual_shape(shape_data: pycram.datastructures.dataclasses.PlaneVisualShape) -> int

      Creates a plane visual shape in the physics simulator and returns the unique id of the created shape.

      :param shape_data: The parameters that define the plane visual shape to be created, uses the PlaneVisualShape
       dataclass defined in world_dataclasses.
      :return: The unique id of the created shape.



   .. py:method:: _create_plane_visual_shape(shape_data: pycram.datastructures.dataclasses.PlaneVisualShape) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.create_plane_visual_shape`



   .. py:method:: create_mesh_visual_shape(shape_data: pycram.datastructures.dataclasses.MeshVisualShape) -> int

      Creates a mesh visual shape in the physics simulator and returns the unique id of the created shape.

      :param shape_data: The parameters that define the mesh visual shape to be created,
      uses the MeshVisualShape dataclass defined in world_dataclasses.
      :return: The unique id of the created shape.



   .. py:method:: _create_mesh_visual_shape(shape_data: pycram.datastructures.dataclasses.MeshVisualShape) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.create_mesh_visual_shape`



   .. py:method:: add_text(text: str, position: typing_extensions.List[float], orientation: typing_extensions.Optional[typing_extensions.List[float]] = None, size: float = 0.1, color: typing_extensions.Optional[pycram.datastructures.dataclasses.Color] = Color(), life_time: typing_extensions.Optional[float] = 0, parent_object_id: typing_extensions.Optional[int] = None, parent_link_id: typing_extensions.Optional[int] = None) -> int

      Adds text to the world.

      :param text: The text to be added.
      :param position: The position of the text in the world.
      :param orientation: By default, debug text will always face the camera, automatically rotation. By specifying a
       text orientation (quaternion), the orientation will be fixed in world space or local space
        (when parent is specified).
      :param size: The size of the text.
      :param color: The color of the text.
      :param life_time: The lifetime in seconds of the text to remain in the world, if 0 the text will remain in the
       world until it is removed manually.
      :param parent_object_id: The id of the object to which the text should be attached.
      :param parent_link_id: The id of the link to which the text should be attached.
      :return: The id of the added text.



   .. py:method:: _add_text(text: str, position: typing_extensions.List[float], orientation: typing_extensions.Optional[typing_extensions.List[float]] = None, size: float = 0.1, color: typing_extensions.Optional[pycram.datastructures.dataclasses.Color] = Color(), life_time: typing_extensions.Optional[float] = 0, parent_object_id: typing_extensions.Optional[int] = None, parent_link_id: typing_extensions.Optional[int] = None) -> int
      :abstractmethod:


      See :py:meth:`~pycram.world.World.add_text`



   .. py:method:: remove_text(text_id: typing_extensions.Optional[int] = None) -> None

      Removes text from the world using the given id. if no id is given all text will be removed.

      :param text_id: The id of the text to be removed.



   .. py:method:: _remove_text(text_id: typing_extensions.Optional[int] = None) -> None
      :abstractmethod:


      See :py:meth:`~pycram.world.World.remove_text`



   .. py:method:: enable_joint_force_torque_sensor(obj: pycram.world_concepts.world_object.Object, fts_joint_idx: int) -> None
      :abstractmethod:


      You can enable a joint force/torque sensor in each joint. Once enabled, if you perform
      a simulation step, the get_joint_reaction_force_torque will report the joint reaction forces in
      the fixed degrees of freedom: a fixed joint will measure all 6DOF joint forces/torques.
      A revolute/hinge joint force/torque sensor will measure 5DOF reaction forces along all axis except
      the hinge axis. The applied force by a joint motor is available through get_applied_joint_motor_torque.

      :param obj: The object in which the joint is located.
      :param fts_joint_idx: The index of the joint for which the force torque sensor should be enabled.



   .. py:method:: disable_joint_force_torque_sensor(obj: pycram.world_concepts.world_object.Object, joint_id: int) -> None
      :abstractmethod:


      Disables the force torque sensor of a joint.

      :param obj: The object in which the joint is located.
      :param joint_id: The id of the joint for which the force torque sensor should be disabled.



   .. py:method:: get_joint_reaction_force_torque(obj: pycram.world_concepts.world_object.Object, joint_id: int) -> typing_extensions.List[float]
      :abstractmethod:


      Get the joint reaction forces and torques of the specified joint.

      :param obj: The object in which the joint is located.
      :param joint_id: The id of the joint for which the force torque should be returned.
      :return: The joint reaction forces and torques of the specified joint.



   .. py:method:: get_applied_joint_motor_torque(obj: pycram.world_concepts.world_object.Object, joint_id: int) -> float
      :abstractmethod:


      Get the applied torque by a joint motor.

      :param obj: The object in which the joint is located.
      :param joint_id: The id of the joint for which the applied motor torque should be returned.
      :return: The applied torque by a joint motor.



   .. py:method:: pause_world_sync() -> None

      Pause the world synchronization.



   .. py:method:: resume_world_sync() -> None

      Resume the world synchronization.



   .. py:method:: add_vis_axis(pose: pycram.datastructures.pose.PoseStamped) -> int

      Add a visual axis to the world.

      :param pose: The pose of the visual axis.
      :return: The id of the added visual axis.



   .. py:method:: _add_vis_axis(pose: pycram.datastructures.pose.PoseStamped) -> None

      See :py:meth:`~pycram.world.World.add_vis_axis`



   .. py:method:: remove_vis_axis() -> None

      Remove the visual axis from the world.



   .. py:method:: _remove_vis_axis() -> None

      See :py:meth:`~pycram.world.World.remove_vis_axis`



   .. py:method:: _simulator_object_creator(creator_func: typing_extensions.Callable, *args, **kwargs) -> int

      Create an object in the physics simulator and returns the created object id.

      :param creator_func: The function that creates the object in the physics simulator.
      :param args: The arguments for the creator function.
      :param kwargs: The keyword arguments for the creator function.
      :return: The created object id.



   .. py:method:: _simulator_object_remover(remover_func: typing_extensions.Callable, *args, **kwargs) -> None

      Remove an object from the physics simulator.

      :param remover_func: The function that removes the object from the physics simulator.
      :param args: The arguments for the remover function.
      :param kwargs: The keyword arguments for the remover function.



   .. py:method:: update_original_state() -> int

      Update the original state of the world.
      :return: The id of the updated original state.



   .. py:method:: update_simulator_state_id_in_original_state(use_same_id: bool = False) -> None

      Update the simulator state id in the original state if use_physics_simulator_state is True in the configuration.

      :param use_same_id: If the same id should be used for the state.



   .. py:property:: original_state
      :type: pycram.datastructures.dataclasses.WorldState


      The saved original state of the world.



   .. py:method:: __eq__(other: World)

      Check if this body is equal to another body.



   .. py:method:: __hash__()


.. py:class:: UseProspectionWorld

   An environment for using the prospection world, while in this environment the :py:attr:`~World.current_world`
   variable will point to the prospection world.

   Example:
       with UseProspectionWorld():
           NavigateAction.Action([[1, 0, 0], [0, 0, 0, 1]]).perform()


   .. py:attribute:: prev_world
      :type:  typing_extensions.Optional[World]
      :value: None



   .. py:method:: __enter__()

      This method is called when entering the with block, it will set the current world to the prospection world



   .. py:method:: __exit__(*args)

      This method is called when exiting the with block, it will restore the previous world to be the current world.



.. py:class:: WorldSync(world: World, prospection_world: World)

   Bases: :py:obj:`threading.Thread`


   Synchronizes the state between the World and its prospection world.
   Meaning the cartesian and joint position of everything in the prospection world will be
   synchronized with the main World.
   The class provides the possibility to pause the synchronization, this can be used
   if reasoning should be done in the prospection world.


   .. py:attribute:: WAIT_TIME_AS_N_SIMULATION_STEPS
      :value: 20


      The time in simulation steps to wait between each iteration of the syncing loop.



   .. py:attribute:: world
      :type:  World


   .. py:attribute:: prospection_world
      :type:  World


   .. py:attribute:: terminate
      :type:  bool
      :value: False



   .. py:attribute:: pause_sync
      :type:  bool
      :value: False



   .. py:attribute:: object_to_prospection_object_map
      :type:  typing_extensions.Dict[pycram.world_concepts.world_object.Object, pycram.world_concepts.world_object.Object]


   .. py:attribute:: prospection_object_to_object_map
      :type:  typing_extensions.Dict[pycram.world_concepts.world_object.Object, pycram.world_concepts.world_object.Object]


   .. py:attribute:: equal_states
      :value: False



   .. py:attribute:: sync_lock
      :type:  threading.Lock


   .. py:method:: run()

      Main method of the synchronization, this thread runs in a loop until the
      terminate flag is set.
      While this loop runs it continuously checks the cartesian and joint position of
      every object in the World and updates the corresponding object in the
      prospection world.



   .. py:method:: get_world_object(prospection_object: pycram.world_concepts.world_object.Object) -> pycram.world_concepts.world_object.Object

      Get the corresponding object from the main World for a given object in the prospection world.

      :param prospection_object: The object for which the corresponding object in the main World should be found.
      :return: The object in the main World.



   .. py:method:: get_prospection_object(obj: pycram.world_concepts.world_object.Object) -> pycram.world_concepts.world_object.Object

      Get the corresponding object from the prospection world for a given object in the main world.

      :param obj: The object for which the corresponding object in the prospection World should be found.
      :return: The corresponding object in the prospection world.



   .. py:method:: sync_worlds()

      Syncs the prospection world with the main world by adding and removing objects and synchronizing their states.



   .. py:method:: remove_objects_not_in_world()

      Removes all objects that are not in the main world from the prospection world.



   .. py:method:: add_objects_not_in_prospection_world()

      Adds all objects that are in the main world but not in the prospection world to the prospection world.



   .. py:method:: add_object(obj: pycram.world_concepts.world_object.Object) -> None

      Adds an object to the prospection world.

      :param obj: The object to be added.



   .. py:method:: remove_object(obj: pycram.world_concepts.world_object.Object) -> None

      Removes an object from the prospection world.

      :param obj: The object to be removed.



   .. py:method:: sync_objects_states() -> None

      Synchronizes the state of all objects in the World with the prospection world.



   .. py:method:: check_for_equal() -> bool

      Checks if both Worlds have the same state, meaning all objects are in the same position.
      This is currently not used, but might be used in the future if synchronization issues worsen.

      :return: True if both Worlds have the same state, False otherwise.



