From 9b422587d2f4f942832811fbfd6c22fc6f7d3635 Mon Sep 17 00:00:00 2001 From: kursatyurt Date: Thu, 4 Apr 2024 10:56:35 +0200 Subject: [PATCH 1/2] Fix for obstacle error, inform user --- dronesim/envs/BaseAviary.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/dronesim/envs/BaseAviary.py b/dronesim/envs/BaseAviary.py index 2c71c6c..3e62baa 100644 --- a/dronesim/envs/BaseAviary.py +++ b/dronesim/envs/BaseAviary.py @@ -1937,6 +1937,7 @@ def _addObstacles(self): These obstacles are loaded from standard URDF files included in Bullet. """ + print("Adding obstacles from BaseAviary is not possible anymore. Please load them as URDF in the main script.") # p.loadURDF("samurai.urdf", # physicsClientId=self.CLIENT # ) @@ -1946,18 +1947,6 @@ def _addObstacles(self): # p.loadURDF(os.path.dirname(os.path.abspath(__file__))+"/../assets/voliere.urdf", # physicsClientId=self.CLIENT # ) - shape_id = p.createVisualShape( - shapeType=p.GEOM_MESH, - fileName="/media/ge79qad/FastScratch/GFlow-3D/build/ball.obj", - physicsClientId=self.CLIENT, - ) - body_id = p.createMultiBody( - baseVisualShapeIndex=shape_id, - basePosition=(0, 0, 2.5), - baseOrientation=(0, 0, 0, 1), - physicsClientId=self.CLIENT, - # useFixedBase=1 - ) # p.loadURDF("duck_vhacd.urdf", # [-.5, -.5, .05], # p.getQuaternionFromEuler([0, 0, 0]), From 27566b62f40d78b9a081921ec7a14b312a5d9103 Mon Sep 17 00:00:00 2001 From: kursatyurt Date: Thu, 4 Apr 2024 11:15:08 +0200 Subject: [PATCH 2/2] Fix formatting, disable isort which causes conflict --- .pre-commit-config.yaml | 6 ------ dronesim/envs/BaseAviary.py | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d34ff1b..221ba98 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,4 @@ repos: - # isort for python imports - - repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - name: isort (python) # black repo for python formatting - repo: https://github.com/ambv/black rev: 22.12.0 diff --git a/dronesim/envs/BaseAviary.py b/dronesim/envs/BaseAviary.py index 3e62baa..3d0f45a 100644 --- a/dronesim/envs/BaseAviary.py +++ b/dronesim/envs/BaseAviary.py @@ -1937,7 +1937,9 @@ def _addObstacles(self): These obstacles are loaded from standard URDF files included in Bullet. """ - print("Adding obstacles from BaseAviary is not possible anymore. Please load them as URDF in the main script.") + print( + "Adding obstacles from BaseAviary is not possible anymore. Please load them as URDF in the main script." + ) # p.loadURDF("samurai.urdf", # physicsClientId=self.CLIENT # )