Beispiel #1
0
    def __init__(self, robotfile):
        """
		Initialize the simulator.
		"""

        # Initialize the Cluster
        self.cluster = Cluster()

        # Load robot data
        self.loadRobotData(robotfile)
        self.gait = 0

        # Get the module ID correspondence
        self.getKeyOrders(self.config)

        # Initialize the time
        self.starttime = time.time()
Beispiel #2
0
import math, time, copy, sys
sys.path.append("../../../../../Downloads/CKBot/trunk")
from ckbot.logical import Cluster

"""
CKBot Hardware Calibration Script
[Sebastian Castro - Cornell University]
[Autonomous Systems Laboratory - 2011]
"""

if (__name__ == '__main__'):
	
	# Instantiate a Cluster
	print "Generating Cluster...\n"
	c = Cluster()
	c.populate()

	# Prompt the user to confirm is the number of modules detected is correct.
	print "There are %d modules in the current cluster." %len(c)
	okay = raw_input("Is this OK? Y/N: ")
	
	# Quit if the user does not agree with the number of modules detected in the cluster.
	if (okay.lower()=="n"):
		pass
	else:
		# Continue prompting the user to enter yes(Y) or no(N) if they enter anything else.
		while(okay.lower()!="y"):
			okay = raw_input("Please enter Y/N: ")
	
		# Loop through all the modules and prompt the user to say what number the module is.