Skip to content

Commit 2cb22f8

Browse files
stephane-caronStéphane Caron
authored andcommitted
Test PyBullet loader on an empty robot description
1 parent d542003 commit 2cb22f8

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ All notable changes to this project will be documented in this file.
1717

1818
- A1: Split description again into URDF and MJCF again
1919
- Command-line: refer to yourdfpy for animation
20+
- eDO: update cache path to match package name
2021
- Flatten cache directory structure
2122
- Ginger: update cache path to match package name
2223
- Go1: Split description again into URDF and MJCF again
2324
- Match cache path with package name when it helps PyBullet
2425
- Remove ``MESHES_PATH`` attribute
25-
- eDO: update cache path to match package name
2626

2727
### Fixed
2828

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Copyright 2022 Stéphane Caron
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
"""
19+
Empty description, used in unit tests.
20+
"""
File renamed without changes.

tests/test_pybullet.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ def tearDown(self):
4242
"""
4343
pybullet.disconnect()
4444

45+
def test_value_error_when_no_urdf(self):
46+
"""
47+
Test exception raised when a description has no URDF_PATH.
48+
"""
49+
with self.assertRaises(ValueError):
50+
load_robot_description("_empty_description")
51+
4552
@staticmethod
4653
def get_test_for_description(description: str):
4754
"""

0 commit comments

Comments
 (0)