import requests import logging # OUR MODULES import robot.config as config # DEFINE GLOBAL VARIABLES X = None Y = None Z = None ConnectedModule = None def InitRobot(): # TODO: get amount of joints and connected module from the esp (greifer) res = requests.post(config.robot_control_server_url + "/robot", json={ "id": config.robot_id, "type": config.robot_type, "firmwareVersion": config.robot_firmware_version }) logging.info(res.status_code) if res.status_code == 403: logging.error("Permit join is disabled") exit(1)