Logging the 360 angle of Monsterborg

3 posts / 0 new
Last post
Megawhat
Logging the 360 angle of Monsterborg

Hi,

Hoping this is not too much of ask. I am really excited and having lots of fun with the simulator.

I was wondering if there is any sort of "call" or calculation that we can do to work out which way the Monsterborg is facing? I would like to add this to my log file so that i can visually see where it is going...

Ie. if it is facing the following directions, I would like the following values
Left = 0
Up = 90
Right = 180
Down = 270

Is this something that I can derive within "RaceCodeFunction.py" file?

Many thanks in advance,
Megawhat

Arron Churchill
Arron Churchill's picture
I think you just set yourself a challenge

The short answer is that the MonsterBorg cannot tell which direction it is facing, that would require additional sensors :)

Having said that you might be able to generate a "best guess" using calculations. If you look in ImageProcessor.py for the IncreaseDistance function you can see how we attempt to approximate how far the MonsterBorg has travelled around the track.

You would probably need to do something similar based on the amount of steering applied to keep a running total of angular change, but bear in mind it will tend to drift over time and it would not compensate very well for collisions.

Megawhat
I'll give it a go

Aaron,

Thanks for the prompt response.

I won't be able to get it ready for submission this round, but will look into the code for ImageProcessor.py and see if I can decipher and back-calculate the accumulated angle change.

Hope you have a good day!

Cheers,
Megawhat

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.