diff --git a/test/test_roslaunch/test/test_xmlloader.py b/test/test_roslaunch/test/test_xmlloader.py
index e8e05829..1b5e191e 100755
--- a/test/test_roslaunch/test/test_xmlloader.py
+++ b/test/test_roslaunch/test/test_xmlloader.py
@@ -836,7 +836,9 @@ class TestXmlLoader(unittest.TestCase):
def test_remap_invalid(self):
tests = ['test-remap-invalid-1.xml',
- 'test-remap-invalid-2.xml',
+ 'test-remap-invalid-2.xml',
+ 'test-remap-invalid-3.xml',
+ 'test-remap-invalid-4.xml',
'test-remap-invalid-name-from.xml',
'test-remap-invalid-name-to.xml',
]
diff --git a/test/test_roslaunch/test/xml/test-remap-invalid-3.xml b/test/test_roslaunch/test/xml/test-remap-invalid-3.xml
new file mode 100644
index 00000000..79d839ae
--- /dev/null
+++ b/test/test_roslaunch/test/xml/test-remap-invalid-3.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/test/test_roslaunch/test/xml/test-remap-invalid-4.xml b/test/test_roslaunch/test/xml/test-remap-invalid-4.xml
new file mode 100644
index 00000000..a9bd2e1e
--- /dev/null
+++ b/test/test_roslaunch/test/xml/test-remap-invalid-4.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/roslaunch/src/roslaunch/loader.py b/tools/roslaunch/src/roslaunch/loader.py
index ef729db7..25c78595 100644
--- a/tools/roslaunch/src/roslaunch/loader.py
+++ b/tools/roslaunch/src/roslaunch/loader.py
@@ -205,6 +205,8 @@ class LoaderContext(object):
@type remap: (str, str)
"""
remap = [canonicalize_name(x) for x in remap]
+ if not remap[0] or not remap[1]:
+ raise RLException("remap from/to attributes cannot be empty")
if not is_legal_name(remap[0]):
raise RLException("remap from [%s] is not a valid ROS name"%remap[0])
if not is_legal_name(remap[1]):