15 gAuthVCode = 1574444059
21 gDomain =
"willowgarage.com" 22 gROSBridgePort =
":8068" 24 LOGIN_TIMEOUT = 60*60*4
27 REFRESH_COOKIE_TIMEOUT = 60*60
29 ROS_VAR_DIR = os.environ.get(
"ROS_VAR_DIR",
"/var/ros")
31 ROS_VAR_DIR =
"/var/ros" 33 ACTIVE_USER_FILE = os.path.join(ROS_VAR_DIR,
"active_user.dat")
34 ACTIVE_USER_TIMEOUT = 3600
36 VALID_USER_COOKIE_FILE = os.path.join(ROS_VAR_DIR,
"user_cookie.dat")
38 gDBPath = os.path.join(ROS_VAR_DIR,
"db")
40 ROS_CONFIG_DIR =
"/etc/ros/env" 41 ROS_CONFIG_FILE =
"/etc/ros/robot.yaml" 44 path = os.path.join(gDBPath, module)
48 path = os.path.join(gDBPath, module)
52 if not os.path.isdir(path):
53 os.makedirs(path, 0700)
57 if gWebUserID
is not None and gWebGroupID
is not None:
58 os.chown(path, gWebUserID, gWebGroupID)
61 if os.path.exists(ROS_CONFIG_FILE):
63 with open(ROS_CONFIG_FILE,
'r') as conf: 64 return yaml.load(conf)[
'robot'][
'type']
68 return open(os.path.join(ROS_CONFIG_DIR,
"ROBOT")).read().strip()
73 if os.path.exists(ROS_CONFIG_FILE):
75 with open(ROS_CONFIG_FILE,
'r') as conf: 76 return yaml.load(conf)[
'robot'][
'name']
80 return open(os.path.join(ROS_CONFIG_DIR,
"ROBOT_NAME")).read().strip()
85 gDefaultModule =
"app/texas_web_teleop/texas_web_teleop" 87 gDefaultModule =
"webui" 89 gDefaultPage =
"webui" 95 gLobby =
"http://priv1.texai.com" 96 gLobbyHost =
"priv1.texai.com" 97 gHomeServer = gLobby +
"/lobby/lobby/robot_data.py" 100 gLobbyReturnPage =
"https://www.texai.com/lobby/lobby/disconnect.py"
def getSiteDBPath(module)