By Jimmy Alexander Eco Disaster is probably one of the most mind-boggling challenges of PiWars yet (not counting the maze but that’s just my personal hatred of mazes). I have started working on the code for that challenge and was able to quickly get the robot to travel to the correct zones. That was no issue at all after the headache of last years nebula challenge. The next step was to find barrels. That shouldn’t be an issue I thought. WRONG. Even though it could find the barrel just fine using the pixy2 (and even when there were no zones behind the barrels), when the robot was in the course with the zones it acted like the barrel wasn’t there. Turns out it was just a minor issue in the code shown below. Not valid Bonus points for anyone who can comment what the issue was. After a quick fix we were back at a point where we could start continuing with our programming when we ran out of time for the day. Hopefully we can give an update tomorrow with a robot bringing barrels to zones. if count > 0 and blocks[0].m_signature ==cur_sig: print 'frame %3d:' % (frame) frame = frame + 1 for index in range (0, 1): print '[BLOCK: SIG=%d X=%3d Y=%3d WIDTH=%3d HEIGHT=%3d]' % (blocks[0].m_signature,blocks[index].m_x,blocks[index].m_y, blocks[index].m_width, blocks[index].m_height) #PerformSpin(12) Figure 1 Practicing for the driving portion of the competition just in case automation doesnt work
Comments are closed.
|
Photo by Rock'n Roll Monkey on Unsplash
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2020
Categories |