Robotics & Voronoi

So my 3rd homework in Robot Motion Planning class was about voronoi diagrams. Nice isn’t it?

 

It’s about generating a voronoi diagram of environment so that robot can move safely as that diagram using it as a roadmap. Neat idea actually, surely not the best and somewhat cumbersome but still good one.

But the diagram generation technique was different this time, we were supposed to create the diagram by walking on it while keeping the distances in balance etc etc.

 

Anyway the paper is here, not my best work but it’s there anyway so it could be on my blog as well right?

 

www.barankahyaoglu.com/robotics/voronoirobot

 

Shadow Casting

I did this a few weeks ago actually but didn’t have time to write a post about it.

Well I was planing to write a longer post about it but considering it’s not that fast ( not as fast as it should be ) and buggy ( got some corner cases ), I decided to skip the post thingy and just put it here as is ( mainly because I have no intention to fix&improve it further )

Oh and again, it is inspired by Amit and his Shadow Casting post.

 

 

And here it is;

http://barankahyaoglu.com/shadowcasting/

( You might need to refresh the page right away )

 

Potential Fields

There isnt much to say really.  

Potential fields and navigation function was my Robotic Motion Planning  2nd homework. Implementing both algorithms, comparing them etc.  

 

There it is in all details;

www.barankahyaoglu.com/robotics/potential/

 

Tangent Bug

Yet another bug algorithm. Pretty much same as others I posted earlier this week ( bug 0,1 and 2 ) but this one has a ranged sensor so it can detect obstacles from a distance and act properly.

Well at least it’s supposed to, my implementation is horribly broken at the moment, hope my professor won’t see this haha. Oh yea this was our first homework on “Robot Motion Planning and Control” class. It was a great homework as well but I was ( still am ) total newbie to javascript, html5, continues space calculations and bug algorithms of course, I my progress was terribly slow, had to rewrite lots of things again and again.

I think the presentation is fine though, if I can make this work properly ( I hope to keep working on it when I have time ( read never )), it’ll be a nice and probably useful to many people.

 

You can find my report on this homework and implementation details on the page as well, there is also a bugs-eye chart there as well, which I believe is neat.

 

Anyway it’s all here;

http://www.barankahyaoglu.com/robotics/tangent/

 

Oldies – Pirates

It was a project based on my random island generator thing. It’s just something like a tech demo, generating multiple islands at once etc. Nothing fancy but it was a good start I say.

I still keep dreaming about that pirates game actually, I still believe it would be glorious and damn successful. I won’t go into that, not talking about my precious billion dollar ideas here for sure HARRR!

It looks something like this;

I know it looks ridiculous but the concentration point was turning that one map generator to work on a giving coordinate. Then I was planing to create a big huge voronoi diagram and create an island on each voronoi site etc etc.

I’m pretty sure I’ll go back to this in future. Damn pirates have so much wenches… ehm I mean potential. Until that I’ll just keep playing Sid Meier’s Pirates…

And here comes the…

I must warn you though, code is most likely horrible. It might give you various kinds of disease, start a hurricane, place you right by the Gandhi on map or make you want to gauge your eyes out. All these projects are “as is” and I won’t be able to help you much further with them ( I really don’t remember much ) or fix bugs etc etc.

If you like them though, you’re obliged to let me know and feel happy. I want to feel happy. Don’t be mean. ( you can use the comments below or mail brnkahyaoglu@gmail.com )

Download: Pirates.zip (517.63 kb)

Oldies – The Corridors

I didn’t even named this one. Solution files are saved as “Maze” though, probably because I used a maze generation algorithm to create the level. ( I believe it was depth first search )

 

Anyway, this was a nice one actually. I really had hopes that I would finish this. I have something for 3rd person action games I guess, I believe they would be extremely fun and really underrated at the moment. Anyway, no way I’m finishing this one so here it is.

 

 

I tested it before uploading though it was rather slow. There are probably some debugging stuff running in the background ( or just my code sucks ) so beware. Also all 3d stuff should be in there as well, let me know if it doesn’t run or missing anything, I’ll check.

 

I’ll just copy paste the rest from previous post;

I must warn you though, code is most likely horrible. It might give you various kinds of disease, start a hurricane, place you right by the Gandhi on map or make you want to gauge your eyes out. All these projects are “as is” and I won’t be able to help you much further with them ( I really don’t remember much ) or fix bugs etc etc.

If you like them though, you’re obliged to let me know and feel happy. I want to feel happy. Don’t be mean. ( you can use the comments below or mail brnkahyaoglu@gmail.com )

Download: Maze.zip (2.97 mb)

Oldies – Fedora

So I was bored and started checking some old stuff today. Eventually I got to the projects folder. Good god, so many unfinished XNA project….

So decided to dump them here. One in a million chance but someone may find them interesting, read and/or use them.

Guess I’ll start with Fedora. It’s a silly name, I know. I started this with the intention of making a Fez ripoff and then got bored and decided to go for something like Bastion. The only point of interest is that boxes fall from sky, floor rises from depths of hell. Looks kinda cool though.

I must warn you though, code is most likely horrible.  It might give you various kinds of disease, start a hurricane, place you right by the Gandhi on map or make you want to gauge your eyes out. All these projects are “as is” and I won’t be able to help you much further with them ( I really don’t remember much ) or fix bugs etc etc.

If you like them though, you’re obliged to let me know and feel happy. I want to feel happy. Don’t be mean. ( you can use the comments below or mail brnkahyaoglu@gmail.com )

Download : Fedora.zip (70.69 kb) 

 

 

Bug Algorithms

First Javascript post ever! Wohoooo… I guess…

Or not. I actually hate it, rather passionately too ( especially after trying typescript ).

http://barankahyaoglu.com/robotics/bug/

Anyway,

I’ve done this little simulation after the first day Robot Motion Control and Planning class. It simulates the behaviours of 3 different bug algorithms ; Bug 0, Bug 1 and Bug 2. Creative names indeed.

 

I’ll just copy paste the description here as well;

All robots ;

have tenticle sensor ( no range ).
have no information other than the relative position of the goal.

Bug 0
It moves towards the goal.
If it runs into an obstacle;
Turns left or right ( this should be fixed but kinda random in my implementation ),
Follows the obstacle until it can freely move towards the goal again.
Rinse repeat.

Bug 1
This one is a little smarter.
Non greedy, rather safe compared to Bug 0 and Bug 2.
It moves towards the goal.
If it runs into an obstacle;
Turns left or right ( this should be fixed but kinda random in my implementation ),
Follows the obstacle until it reaches the starting point again, ( so it travels all around the obstacle )
Keeps track of all points around the obstacle,
Goes back to the one closest to the goal,
Moves towards the goal.
Rinse repeat.

Bug 2
This one is also a bit smart, in a different way though.
It’s greedy.
Finds the shortest path to goal as if there are no obstacles ( going through obstacles ), let’s call it “direct path” It moves towards the goal.
If it runs into an obstacle;
Turns left or right ( this should be fixed but kinda random in my implementation ),
Follows the obstacle until it reaches a point on direct path
Now that it’s back on the direct path again, it just move towards the goal.
Rinse repeat.

 

It’s unstable though, gets confused or just simply break down on some occasions. By no means a full implementation, just the simple barebone  algorithm, vulnerable to every corner case situation. Don’t even bother trying to use the javascript code for whatever, it’s horrible. ( again, first javascript project ever )

 

Oh and I used KineticJS for it. Actually using it for almost everything these days, works brilliant with typescript as well. One of the better libraries out there I guess ( not that I know anything about JS community but still )

 

TypeScript

Soooo guess it’s time to learn some Javascript eh? Now that even Anders Hejlsberg doing it.

Just in case you don’t know, TypeScript, created by Ander Hejlsberg, is a typed superset of Javascript with a much more C#-like flow and ECMA standards. Pretty much like CoffeeScript one might say. Or somewhat comparable to Dart I guess. Yea it’s like the 1000th attempt to fix Javascript and probably no one would have taken it seriously if it wasn’t for Microsoft and Hejlsberg.

Feels kinda weird really. Hejlsberg? Doing Javascript? I mean after Turbo Pascal, Delphi and C#, Javascript feels kinda odd.

But if all mighty & all knowing Anders think this might work, I sure won’t dare to question his wisdom.

One interesting thing though, from Miguel de Icaza’s blogpost on TypeScript;

Dart on the other hand is more ambitious as it uses the type information to optimize the quality of the generated code. This means that a function that adds two numbers (function add (a,b) { return a+b;}) can generate native code to add two numbers, basically, it can generate the following C code:

double add (double a, double b)
{
return a+b;
}

While weakly typed Javascript must generated something like:

JSObject add (JSObject a, JSObject b)
{
if (type (a) == typeof (double) &&
type (b) == typeof (double))
return a.ToDouble () + b.ToDouble ();
else
JIT_Compile_add_with_new_types ();
}

This is kinda interesting. I never knew that but sounds like a great idea. For some reason, TypeScript doesn’t go into that kinda of optimization. Makes me wonder though, why? My first guess is that TypeScript ( unlike Dart ) is a superset of JavaScript and such optimizations might break that. Or maybe they thought it just doesn’t worth it? ( scratch that. surely it’s because of the standard javascript engine compatibility. Silly me. )

Oh well, guess I’ll post some JS stuff soon. It can’t be THAT bad, right?

Towel Progress Update

Well not really a progress update, but I just wanted to post the latest setup. ( I really don’t want this to rot on my hdd like that ).

I haven’t worked on this one for a while now. Kinda lost interest. Especially after not being able to find a decent flash developer to make a simple player for me…. I hate flash.

First of all; You can DOWNLOAD towel here.

-OK so what is this exactly?

It’s a modular news&event&stream aggregator created mainly for Starcraft2 community. But since it’s modular, it’s rather easy to make it support any game/community out there. It’s not only modular, it’s also totally customizable…. and supports localization with just a bunch of text files…. gah it has too many features to just die like that.

-Why would anyone need it?

Basically it pops up notifications for streams and events ( tournaments etc ). It uses TeamLiquid Calendar and Stream data for that but you can add your own favorite stuff too.

With Towel, you can just mark a stream as favorite and then you’ll get a notification whenever that stream goes online again. Better than refreshing TL every 5 minutes isn’t it? Same goes for events too. Haven’t you ever missed a tournament while playing something and totally forget about the time?

All in all, I can say at this stage ( with just 2 base modules, streams and events ) it’s TL on desktop with increased usability.

-What does it looks like? Is it customizable?

Oh well, visuals aren’t really done but in general;

Menu – Calendar – Streams

Towel Progress Update - Windows Live Writer Towel (10)Towel (11)

Is it customizable you say? Hell yes it is! It’s totally customizable, style files are NOT compiled, they are just basic xaml files which you can open with notepad and edit. You can change simple stuff like colors, font etc OR redo the most of the layout. All you need is notepad…

-Does it also have a player? Why?

Yes Towel has a stand alone player, just like any media player out there, to play the streams. Why? Because watching streams in a browser window kinda blocks whatever else you’re doing. This is pretty much the whole point of Towel Player;

WindowClipping (26)

You really shouldn’t have to switch tabs to post something on forums while watching a stream. ( that player is pinned so it’ll be always on top of whatever else you’re doing ) Or to watch 2+ streams…

WindowClipping (27)

 

-How many modules are there?

There are just Streams and Events module for now. Obviously I was planning for much much more before I lost my appetite.

-Lost your appetite? After like months of work? Why?

Because flash is a pain in the ass. I need a somewhat decent flash developer for a simple basic flash player but naah, couldn’t find anyone. And without flash player, it’s really hard to support quality changes in player ( pretty much doesn’t work at this stage )

-And if you find a flash developer?

I’ would probably go back to this. I would like to add a few more modules and improve current ones. Trust me I don’t like trashing 6 months hard work just like that.

-Why do you need flash anyway?

Because Twitch developers refuses to fix their broken Javascript player and/or document it. I know it’s not all roses and daisies over there but how hard can it be to fix a resolution bug… If they don’t have a Html5 player up and working until this fall, I’m pretty much done with twitch & sc2 fan stuff.

-Do you need help in any other way?

Well of course. It’s hard to be a single developer you know, pretty much like a single mother. When there is no interest or anyone gagging you for bug and stuff, you lost interest in it. That’s pretty much why&how I kept ScCalendar alive for almost a year

-There are lots of bugs!

Well of course, it’s not a full release after all. It’s pretty much beta, almost alpha version. Basic functionality should be OK though.

Oh just beware, “Run on Windows Startup” doesn’t work.

-So that’s it?

Yep, pretty much. Don’t hesitate to contact me for whatever, questions, comments…