debug changes

This commit is contained in:
Olivier R-D 2013-08-21 14:28:44 +02:00
parent e9014ccb92
commit f4e23b0b67
2 changed files with 6 additions and 3 deletions

View File

@ -277,13 +277,14 @@ class SecondaryMonitor(Thread):
returns something that looks like a packet, nothing is guaranted
"""
while True:
self.logger.debug("data queue size is: {}".format(len(self._dataqueue)))
#self.logger.debug("data queue size is: {}".format(len(self._dataqueue)))
ans = self._parser.find_first_packet(self._dataqueue[:])
if ans:
self._dataqueue = ans[1]
#self.logger.debug("found packet of size {}".format(len(ans[0])))
return ans[0]
else:
self.logger.debug("Could not find packet in received data")
#self.logger.debug("Could not find packet in received data")
tmp = self._s_secondary.recv(1024)
self._dataqueue += tmp

View File

@ -229,6 +229,7 @@ class URRobot(object):
"""
# it is important to sleep since robot may takes a while to get into running state,
# for a physical move 0.5s is very short
self.logger.debug("Waiting for move completion")
for i in range(3):
self.secmon.wait()
while True:
@ -239,10 +240,11 @@ class URRobot(object):
for i in range(0, 6):
#Rmq: q_target is an interpolated target we have no control over
if abs(jts["q_actual%s"%i] - jts["q_target%s"%i]) > self.joinEpsilon:
#print("Waiting for end move, q_actual is {}, q_target is {}, diff is {}, epsilon is {}".format( jts["q_actual%s"%i], jts["q_target%s"%i] , jts["q_actual%s"%i] - jts["q_target%s"%i], self.radialEpsilon))
print("Waiting for end move, q_actual is {}, q_target is {}, diff is {}, epsilon is {}".format( jts["q_actual%s"%i], jts["q_target%s"%i] , jts["q_actual%s"%i] - jts["q_target%s"%i], self.radialEpsilon))
finished = False
break
if finished and not self.secmon.is_program_running():
self.logger.debug("move has ended")
return
def getj(self, wait=False):