pycram.external_interfaces.pycramgym
====================================

.. py:module:: pycram.external_interfaces.pycramgym


Classes
-------

.. autoapisummary::

   pycram.external_interfaces.pycramgym.PyCRAMGym


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

.. py:class:: PyCRAMGym(inWorld: str, inRobot: str, inPlan: pycram.language.LanguageMixin)

   Bases: :py:obj:`gymnasium.Env`


   First small implementation of the PyCRAMGYM, this class can either be used to store necessary information for an experiment or let
   a robot explore an environment, with a set of actions. The exploration will be done via reinforcement learning.


   .. py:attribute:: world
      :type:  str

      The world should be an real World Object, but sadly this is not possible, because if we close and open multiple 
      bulletworlds in quick succession, then there is a problem with objects not being loaded properly. Thus we decided to
      let the user create the world they want to use and just load the environment urdf of the file they give to this class



   .. py:attribute:: robot
      :type:  str

      The robot should be a real Robot Object, but in order to stay in line with the world it is just the name of the 
      urdf that will be loaded as a robot.



   .. py:attribute:: plan
      :type:  pycram.language.LanguageMixin

      Plan langauge object that can get executed. 



   .. py:method:: step(action: gymnasium.core.ActType)

      Ticks the world, in our case this means we pick one possible action and perform it.

      :ivar action: The action to take.



   .. py:method:: reset()

      Returns the environment to the normal state.



   .. py:method:: close()

      Resets the world to a completely empty state. (Should close world at some point)



