Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:cram2/pycram into abstract_world (fi…
Browse files Browse the repository at this point in the history
…xed missing import and use of World instead of BulletWorld in test_database_resolver.py)
  • Loading branch information
AbdelrhmanBassiouny committed Jan 24, 2024
1 parent ed33735 commit 49a7026
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/test_database_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pycram.plan_failures
from pycram.world import Object
from pycram import task
from pycram.world import World
from pycram.designators import action_designator, object_designator
from pycram.orm.base import Base
from pycram.process_module import ProcessModule
Expand Down Expand Up @@ -32,7 +33,7 @@
@unittest.skipIf(not jpt_installed, "jpt is not installed but needed for the definition of DatabaseCostmapLocations. "
"Install via 'pip install pyjpt'")
class DatabaseResolverTestCase(unittest.TestCase,):
world: BulletWorld
world: World
milk: Object
robot: Object
engine: sqlalchemy.engine.Engine
Expand All @@ -41,20 +42,20 @@ class DatabaseResolverTestCase(unittest.TestCase,):
@classmethod
def setUpClass(cls) -> None:
global pycrorm_uri
cls.world = BulletWorld("DIRECT")
cls.world = World("DIRECT")
cls.milk = Object("milk", "milk", "milk.stl", pose=Pose([1.3, 1, 0.9]))
cls.robot = Object(robot_description.name, ObjectType.ROBOT, robot_description.name + ".urdf")
ProcessModule.execution_delay = False
cls.engine = sqlalchemy.create_engine(pycrorm_uri)
cls.session = sqlalchemy.orm.Session(bind=cls.engine)

def setUp(self) -> None:
self.world.reset_bullet_world()
self.world.reset_world()
pycram.orm.base.Base.metadata.create_all(self.engine)
self.session.commit()

def tearDown(self) -> None:
self.world.reset_bullet_world()
self.world.reset_world()
pycram.task.reset_tree()

@classmethod
Expand Down

0 comments on commit 49a7026

Please sign in to comment.