#!/usr/bin/env python # Copyright (C) 2020 Copter Express Technologies # # Author: Oleg Kalachev # # Distributed under MIT License (available at https://opensource.org/licenses/MIT). # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # TODO: add custom header, footer # TODO: symlinks or copy param import os import shutil import rospy import rospkg rospy.init_node('roswww_static') rospack = rospkg.RosPack() www = rospkg.get_ros_home() + '/www' index_file = rospy.get_param('~index_file', None) default_package = rospy.get_param('~default_package', None) shutil.rmtree(www, ignore_errors=True) # reset www directory content os.mkdir(www) packages = rospack.list() index = '

Packages list

\n