Skip to content

Commit

Permalink
[Test] Fixed bug in tests resource pathing.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsch420 committed Mar 26, 2024
1 parent cefa364 commit 7f8ad1f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/new-pycram-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
pip3 install -r requirements.txt
pip3 install -r requirements-resolver.txt
- name: Install pytest, pyjpt & mlflow
- name: Install pytest & pyjpt
run: |
pip3 install --ignore-installed pytest pyjpt
Expand Down
12 changes: 6 additions & 6 deletions test/test_database_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class DatabaseResolverTestCase(unittest.TestCase,):
def setUpClass(cls) -> None:
global pycrorm_uri
cls.world = BulletWorld("DIRECT")
cls.milk = Object("milk", "milk", "../resources/milk.stl", pose=Pose([1.3, 1, 0.9]))
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)
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_costmap_no_obstacles(self):
grasp=sample.grasp).perform()

def test_costmap_with_obstacles(self):
kitchen = Object("kitchen", "environment", "../resources/kitchen.urdf")
kitchen = Object("kitchen", "environment", "kitchen.urdf")
self.plan()
pycram.orm.base.ProcessMetaData().description = "costmap_with_obstacles_test"
pycram.task.task_tree.root.insert(self.session)
Expand All @@ -106,14 +106,14 @@ def test_costmap_with_obstacles(self):
kitchen.remove()

def test_object_at_different_location(self):
kitchen = Object("kitchen", "environment", "../resources/kitchen.urdf")
kitchen = Object("kitchen", "environment", "kitchen.urdf")
self.plan()

pycram.orm.base.ProcessMetaData().description = "object_at_different_location_test"
pycram.task.task_tree.root.insert(self.session)
self.world.reset_bullet_world()

new_milk = Object("new_milk", "milk", "../resources/milk.stl", pose=Pose([-1.45, 2.5, 0.95]))
new_milk = Object("new_milk", "milk", "milk.stl", pose=Pose([-1.45, 2.5, 0.95]))
cml = DatabaseCostmapLocation(new_milk, self.session, reachable_for=self.robot)

sample = next(iter(cml))
Expand All @@ -135,8 +135,8 @@ def test_object_at_different_location(self):

@unittest.skip
def test_multiple_objects(self):
kitchen = Object("kitchen", "environment", "../resources/kitchen.urdf")
new_milk = Object("new_milk", "milk", "../resources/milk.stl", pose=Pose([-1.45, 2.5, 0.9]))
kitchen = Object("kitchen", "environment", "kitchen.urdf")
new_milk = Object("new_milk", "milk", "milk.stl", pose=Pose([-1.45, 2.5, 0.9]))

object_description = ObjectDesignatorDescription(names=["milk"])
object_description_new_milk = ObjectDesignatorDescription(names=["new_milk"])
Expand Down
2 changes: 1 addition & 1 deletion test/test_orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def test_setGripperAction(self):
self.assertEqual(result[0].motion, "open")

def test_open_and_closeAction(self):
apartment = Object("apartment", ObjectType.ENVIRONMENT, "../resources/apartment.urdf")
apartment = Object("apartment", ObjectType.ENVIRONMENT, "apartment.urdf")
apartment_desig = BelieveObject(names=["apartment"]).resolve()
handle_desig = object_designator.ObjectPart(names=["handle_cab10_t"], part_of=apartment_desig).resolve()

Expand Down

0 comments on commit 7f8ad1f

Please sign in to comment.