diff --git a/realsense2_description/launch/launch_utils.py b/realsense2_description/launch/launch_utils.py index c25d1f7086..2f65eeb220 100644 --- a/realsense2_description/launch/launch_utils.py +++ b/realsense2_description/launch/launch_utils.py @@ -21,7 +21,7 @@ def to_urdf(xacro_path, parameters=None): * xacro_path -- the path to the xacro file * parameters -- to be used when xacro file is parsed. """ - urdf_path = tempfile.mktemp(prefix="%s_" % os.path.basename(xacro_path)) + urdf_path = tempfile.TemporaryFile(prefix="%s_" % os.path.basename(xacro_path)) # open and process file doc = xacro.process_file(xacro_path, mappings=parameters)