everything seems to work together as expected

(if not perfectly)
This commit is contained in:
Pavel Lutskov
2019-01-29 12:07:17 +01:00
parent 2d0441306a
commit b6e7ab8aa4
7 changed files with 71 additions and 43 deletions

View File

@@ -57,12 +57,6 @@ if __name__ == '__main__':
# print trans
# continue
permission = _inform_controller('move')
if not permission:
mp.stopMove()
continue
movement = [0, 0, 0]
#-1 1 -1 1
for i, dr in enumerate((BK, FW, RT, LT)):
@@ -74,12 +68,19 @@ if __name__ == '__main__':
break
if not any(movement):
rospy.loginfo('WALKER: STOP')
rospy.logdebug('WALKER: STOP')
_inform_controller('stop')
mp.move(0, 0, 0)
else:
rospy.loginfo('WALKER: TRANS: {}'.format(trans))
rospy.loginfo('WALKER: MOVMT: {}'.format(movement))
mp.moveToward(*movement)
continue
permission = _inform_controller('move')
if not permission:
mp.stopMove()
continue
rospy.loginfo('WALKER: TRANS: {}'.format(trans))
rospy.loginfo('WALKER: MOVMT: {}'.format(movement))
mp.moveToward(*movement)
mp.rest()