Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thanks for the hint @KenYN!

import os
from datetime import datetime
import launch

starttime = datetime.utcnow()
log_dir = "/path/log/" + starttime.strftime("launch_%Y-%m-%d_%H-%M-%S/")
os.mkdir(log_dir)
launch.logging.reset()
launch.logging.launch_config.log_dir = log_dir

def generate_launch_description():
<SNIP>