Saturday, June 15, 2013

AVC Part 2

The world does not want me to write this post....
I'd worked on it for about an hour and  forgot to open a new tab when navigating away to find a link and blogger lost it.....

On the day of the event I arrive at the venue at around 7:45, Unloaded my stuff and setup on the provided worktables under the tent. They open the course for testing at 8am and I slowly walk the doping class car around the course gathering way point data.  For the first turn I decide to go waaay long so as to try and avoid some of the traffic. In the videos you can see the car goes way past the first turn this is intentional.

My first heat is with Cheapshot the little car. Its heat two and a rush to be ready. I strip out the RC code and setup so the system arms on reset..... I test this in the pits by pressing the go button and it seems to work.
I sit at the line its time to go I hit the button and nothing happens..... I then hit rest and wait out the 20 seconds of gyro zero and other things then the car finally takes off just after the first place car finishes.....
The car goes out about 10 feet and turns in a large never ending never varying circle round and round...
Heat 2 round 0 Zero....

So I have 6 heats or so to get the big car ready.... I revert the code to what it was for testign last night. Rather than hurrying to strip otu the RC arming code I just comment out the one line of processing received chars from the DSM2 receiver and add a serial port command to arm the car....
I press the button and the car turns hard right smacking into other cars... then it straightens out and runs the course solidly.  (Here is the heat one video..)
Video by Ben Brockert

The car makes it through the hoop but misses the ramp... slightly to the left.... I'm faster than Savage solder, but they hit the ramp... after the first heat the score is Savage Solder 440 NetBurner (me) 412.. so I was 22 seconds faster... but missed the 50pt hoop bonus.

I hurry back and look at the small car code.... I see where I commented out too much and that my {} in the state machine did not line up as expected, id turned off the IMU/gyro processing. It is with high hopes I go back to run heat two of the Cheapshot small car.... This time the car starts right up, turns hard just like its big brother and flips over on the start ramp.... I'm now zero for 2 on this vehicle.

Time to adjust the course to try and hit the ramp and run the big car again....I move the way points over about 3 ft to hit the ramp and we run heat two.... It lurches off the start gets going solidly.... just three feet before the hoop it swerves out of the way just missing the hoop.... when it gets to the ramp it goes way wide and actually rubs on the curb..... I moved the way points the wrong way.... it scrapes along the curb recovers and finishes the race..... I'm now solidly in first place.
(After heat 2 Photo by Ben Brockert)


They now take a break and let everyone practice for an hour before the next heats. Realistically the small car has no chance of even placing so I focus on the getting the big car to hit the ramp. I go out on the course and carefully measure the center of the ramp.....

I do a quick review of the code for the small car and realize that steering code has a static variable in it to measure the rate of turn... between loops and  since most of my testing had the course starting to the north this would not be apparent.. I change the code so it ignores this for the first pass through navigation and prepare to try again.... This time the small car ends up in the fence... I'm zero for 3  very frustrating..

I'd planned on going faster than I was going. In testing I ran the straightaways at 3X the speed and 50% faster on the corners, but for the last run I had such a lead that if I just finished I would win. No incentive to go faster... It was still fast enough to jump the finish line:


(picture by maushammer)

So I left the car just as it was and the third heat looked just like the first two....it went straight at the hoop and the ramp and dodged away just missing at the last possible minute.
It did not matter I was not fastest, I was most consistent I'd won.
I think I had 1131 points and the 2nd place car (the team that won last year 0x27) had 571 points.
That is a pretty solid win.  If Id just focused on the one car I could have fixed a few bugs and gotten another 250 pts...(2 hoops and 3 ramps).

So what did I learn?  Again I relearned the don't try and do too much... one entry, not three. I Was lucky that my starting out weirdness did not cause a crash and if the 2nd/3rd place cars had been consistent I would have taken third.

The way I tested I drove the car around an area laying out a track... then placed way points on the map. Since the map faced north all of my testing had me starting to the north.... something about my starting code worked on a heading of 0... but not at a heading of ~270 I thought I was testing like I'd race... alas that was not the case.

The BD960 trimble GPS and Omnistar service was flawless the entire time I used it. Sitting in the tent at the race it was reporting an estimated error of between 5 and 15cm. Without this level of accuracy winning the race would have required a lot more work.  Its pretty amazing when you realize that its measuring better than 20cm at 20hz.

The GPS track was flawless. better than 20cm accuracy at 20Hz, so why did I miss the hoop twice and the ramp every time? After my midnight suspension repair the car pulled to the right. The code took care of this with an integral steering term in the PID that turned heading into steer direction.  As all the turns were in the same direction and I did not want windup I zeroed the I term at each waypoint switch.... so since I put waypoints right before the hoop and the ramp.... right before the hoop and the ramp the I term was zeroed and the car swerved to the right until the error built up again.... I should have checked  the heading change and not zeroed the I term for changes less than some value.  I should have figured this out in testing,....

In my testing I'd set the hoop in the track and made sure the car was consistent. I never tested hitting a spot the was pre-configured, only in being consistent run after run... (You can see the in the video from my previous post) The track was very consistant, but it wasn't wher eI wanted it to be.

Last year I handicaped myself by not using the good GPS. This year I wanted to prove a point that the lowest cost NetBurner device was powerful, so I gave myself a deliberate handicap by choosing our lowest powered CPU. In testing I recorded telemetry and got data from the devices.  During the actual race I had no on board data recording. If I had I would have easily seen both the the start up and ramp missing problems in the data in a way that I could fix them... regardless the car won with an SBL2E cpu, a network attached CPU for less than $15.

I've now won with a car so next year I'm going to finally enter a flying machine. Id prefer to enter a plane, but if the rules don't change they heavily favor a VTVL vehicle. So I'll probably pull my autonomous helicopter out of mothballs and use a new modern CPU. For fun here is the best piece of video my autonomous helicopter ever took:





Lastly I get requests for the code on these projects.... since I write code for a living for NetBurner I'm hesitant to post my hobby code because its not up to the standard of code that I would release in my professional capacity.  So as long as you realize that this is hobby code written in a hurry while suffering from sleep deprivation you can have at it..
.
Here is the code for the car.. as a a few days before the AVC...
and
here is the QT code for taking logs and placing waypoints... again a few days before the AVC....
https://github.com/pbreed/QTMap

I'll try to update the code as run some time in the next week....


23 comments:

Ben Brockert said...

Timestamp on that video is before 11AM, so I'm fairly sure that's heat 1. Heat 3 I watched from the sideline, trying and failing to get a good pic of it jumping the finish line.

I haven't processed my photos yet, but I found a couple of you on Flickr. http://www.flickr.com/photos/94313015@N03/8993463518/ http://www.flickr.com/photos/94313015@N03/8993455552/ in this set http://www.flickr.com/photos/94313015@N03/sets/72157634019372762/with/8993463518/

Mike Shimniok said...

Awesome job!! You really overcame a lot of hardship in the final days/hours. Wow. Sorry we didn't get a chance to chat.

Unknown said...

How did you use Omnistar? The subscriptions are very expensive, do you get it through your work?

Model Baju Jas Pria 2015 said...

The post is absolutely fantastic! Lots of great information and inspiration, both of which we all need! Also like to admire the time and effort you put into your blog and detailed information you offer! I will bookmark your blog.

hlthask.com said...

I write my essay about it. Your post inspired me on new ideas.

tadalafil said...

You are such a "life-hacking" person, well done!

Selling followers said...

شركة فحص فلل بالرياض
عندما تحتاج إلى عملية فحص فلل
جدية وعلى مستوى عالي من الدقة فأن شركة البيت السعيد لـ فحص فلل بالرياض هي المطلوبة ، فمن المعروف أن هناك الكثير من الفلل تتعرض للتلف الشديد سواء كان هذا التلف من الداخل أو من الخارج مما يعمل على تشوه الشكل العام للفيلا فان شركة البيت السعيد لـ فحص فلل بالرياض
هي الحل الامثل
شركة البيت السعيد
شركة فحص فلل بالرياض
0543578920
اتصلو على شركة فحص فلل بالرياض

شركة فحص فلل بالرياض
او زورو موقعنا على الانترنت

http://www.elbaytelsaeed.com/2017/08/25/%D9%81%D8%AD%D8%B5-%D9%81%D9%84%D9%84-%D8%A8%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6/

yanmaneee said...

nike sneakers
off white
pg 1
adidas nmd
paul george shoes
michael kors outlet
coach outlet
kyrie irving shoes
yeezys
supreme

mystrikingly said...

They have a surprisingly light substance and take away a more well, it's better than anything standard to see how some people still make a quality post.

토토사이트
온라인카지노
파워볼사이트
카지노사이트

phd-qt.unina said...

I am exceptionally content with the substance of your article, it is advantageous and I anticipate the following article to refresh the data once more.

사설토토
카지노
파워볼
바카라사이트

worldbeyblade org said...

I just want to say thanks for your wonderful post, it is contain a lot of knowledge and information that i needed right now. You really help me out my friend, thanks!

스포츠토토
토토
안전놀이터
토토사이트

racesite.pro said...

It is extremely nice to see the greatest details presented in an easy and understanding manner
온라인경마

reelgame.site said...

Fabulous! This is just amazing! Not just high quality, however additionally valuable info. And that is rare to come by nowadays! 릴게임

Anonymous said...

In my testing I'd set the hoop in the track and made sure the car was consistent. I never tested hitting a spot the was pre-configured, only in being consistent run after run... (You can see the in the video from my previous post) The track was very consistant, but it wasn't wher eI wanted it to be.
army dress material
khaki twill fabric

Anonymous said...

i simply couldn’t leave your internet site before suggesting that i absolutely loved the usual records an man or woman offer for your visitors? Is gonna be back regularly so one can look at new posts. I discovered your weblog thru google at the same time as searching for first useful resource for a heart assault and your submit seems very interesting for me. That is my first visit in your weblog! We are a team of volunteers and beginning a brand new challenge in a network within the same niche. Superb post however , i was looking to recognize if you could write a litte more on this concern? I’d be very thankful if you could difficult a little bit further. Bless you! 온라인카지노추천

Anonymous said...

Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me . You have a real talent for writing unique content. I like how you think and the way you express your views in this article. I am impressed by your writing style a lot. Thanks for making my experience more beautiful. Nice post. I was checking constantly this blog and I am impressed! Extremely helpful information specially the last part I care for such info a lot. I was seeking this particular information for a very long time. Thank you and good luck. This article was written by a real thinking writer without a doubt. I agree many of the with the solid points made by the writer. I’ll be back day in and day for further new updates. 우리카지노가입

Anonymous said...

Thanks for the message. I like the fact that the internet allows you to get tickets that you really need. I just stumbled upon your blog. I hope you'll continue to do it. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have. 코인카지노쿠폰

Anonymous said...

Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me . You have a real talent for writing unique content. I like how you think and the way you express your views in this article. I am impressed by your writing style a lot. Thanks for making my experience more beautiful. Nice post. I was checking constantly this blog and I am impressed! Extremely helpful information specially the last part I care for such info a lot. I was seeking this particular information for a very long time. Thank you and good luck. This article was written by a real thinking writer without a doubt. I agree many of the with the solid points made by the writer. I’ll be back day in and day for further new updates. 토토사이트추천

Unknown said...

c0h96i3r23 o7d41a7n34 r6x38o6w94 v6a41o0l76 i1l02d5g71 y4p57v1l44

cragro.com/먹튀검증 said...

I completely agree with the text. I can learn good and new information. 토토사이트 먹튀검증

Anonymous said...

Glad to see the best information. Thank you for sharing this valuable information. 토토사이트

Micheal Jackson said...

I'm a professional engineer and I always specify www.flangessteel.com
products in my designs. I know that I can count on their flanges steel to be of the highest quality and to meet all of my specifications. They are a trusted supplier that I know I can rely on.

Jackson Wylie said...

Planning a trip abroad? Don't forget to invest in Stonewell Financial's 해외 여행자 보험 for comprehensive coverage. Their commitment to customer satisfaction ensures you're in good hands