Hi all, I'd like to partecipate to the summer race in the monster class so I have downloaded the code from source forge and started the simulator... wow, wow and WOW.
Very good job, I'm so excited!
Now the tricky question. I was writing the very first race code for the upcoming test session:
while LapCount() < laps: # Wait until we reach the first corner WaitForWaypoint(2) Speed(80) WaitForWaypoint(9) Speed(100) if tracklane > -2: tracklane = tracklane -1 AimForLane(tracklane) # Wait until we reach the start / finish line WaitForWaypoint(1)
My willing is to have the robot change lane exiting the last turn. However in the simulator it changes lane, and speed, crossing the starting line. After a while I have found the speed goes to 80% exiting turn 1 and not when entering.
Are the waypoint changed ?
Any suggestion ?
Thanks,
Fabio
Images:
Basically this is our fault :)
The simulation has the wrong speed for the MonsterBorgs at the moment, confusing the distance calculation code. The reason it changes lane at the start line is the code realises it must have already passed waypoint 9 and lets the code carry on.
We should put a fix out for the simulation speeds sometime in the next few days which will have the robot moving a fair bit faster (it should lap at about 19.5 seconds with our standard example) and correct the distance calculation settings so the waypoints are where they should be :)
Your code should work as described once the speeds in the simulation have been updated.
How can I also get access to the code?
You can get access to the Formula Pi code by signing up for either the summer or winter series:
Summer 2017 series signup
Winterer 2017 series signup
I've pledge on Kickstarter inclusive Formula Pi Entry, so it feels a little bit strange to add it to a shopping cart again.
If you have already pledged for an entry you do not need to buy one as well :)
We will be contacting our Kickstarter backers regarding entry details and code access soon.
Thanks Arron. I think you are doing a very good job with the libraries and simulation.
For me it's the same to have fixed the speed or tweak the distance in configuration file.
I will take this time to take a look to the ImageProcessor part.
F.
Thanks for the compliment, though I cannot take all of the credit :) In particular it was computernerd486 who wrote the Java half of the simulation.
I have just checked in some changes to the Monster code which should straighten out the speed and waypoint differences. Bear in mind the waypoints are only a guess from the code, they are not completely accurate each lap. They should happen in roughly the same places in the simulation and on the real track though.
Add new comment