Monster simulation and Waypoint

8 posts / 0 new
Last post
fdrago
Monster simulation and Waypoint

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: 
Arron Churchill
Arron Churchill's picture
We have the wrong speed in the monster simulation :)

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.

Thomas
Access

How can I also get access to the code?

Arron Churchill
Arron Churchill's picture
Formula Pi code access

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

Thomas
hmm

I've pledge on Kickstarter inclusive Formula Pi Entry, so it feels a little bit strange to add it to a shopping cart again.

Arron Churchill
Arron Churchill's picture
Kickstarter entry

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.

fdrago
Thanks Arron. I think you are

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.

Arron Churchill
Arron Churchill's picture
Thanks :)

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

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: bash, cpp, perl, python.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Comment Images
Files must be less than 10 MB.
Allowed file types: png gif jpg jpeg.
Comment Attachments
Files must be less than 10 MB.
Allowed file types: txt pdf nfo doc docx rtf jpg png gif bmp zip tar gz csv xls.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.