Programming Artificial Intelligence in Robots/Autonomous Robots - artificial-intelligence

Im looking into to starting to do some AI programming especially aiming at robots. Creating robots that think and act for themselves. Just wanting some advice on what coding platforms/languages are out there that are best suited to this area?
Im a microsoft developer through and through, so would I be able to accomplish this with the MS Robotics studio at all. Or is that all based on remote control robot development?
Am a little confused because there is so much contradicting information out there. Please help.
Thanks in advance

What kind of robotics are you trying to do? (i.e. is it a robot where a laptop or another powerful device might be an acceptable controller? Or are you looking at a small true embedded robot?)
If it's the first, MS Robotics might be right for you. It uses .Net IIRC so there's a nice low entry barrier. If you wanna do something smaller, maybe look at Arduino, which has so much support around its platform that you'll probably find what you need. Arduino uses something very very much like C++.
Regardless of what you choose, find a kit robot. I can't stress this enough. You want to spend time doing AI, not getting hardware to all work correctly.
If you wanna try something weird and interesting, the Parallax Propeller Microcontroller is a relatively cheap arudino-weight processor with 8 cores. Might be nice for AI, where thinking generally is best done in parallel.

Try using webots for designing the control. I found it very intuitive and friendly... lets you focus on your core programming logic. Hardware should start from Boebot (the very basics) and graduate to Arduino platforms as you gain knowledge.
Try getting a Pioneer, once you move to real robotics (excellent sensor suite but prohibitively priced). Or try flying bots like A.R.Drone etc. It would be nice to program and will give you insight into UAVs as well.

Related

What do you think about Mobile Robotics Programming Toolkit?

Did anyone use Mobile Robotics Programming Toolkit? What do you think about it?
I am currently studying the SLAM problem (I am quite new in this area) and I am planning to implement a Mono Slam solution based on Extended Kalman Filter (C++). Do you recommend to implement my solution on top of Mobile Robotics Programming Toolkit, or it would be better to start from scratch?
Well, I'd say it depends. Why would you use it? Does it provide anything special that you need, like feature extraction or visualization? Since it's for learning purposes, I'm assume their monoslam implementation is of little interest.
If not, why bother? Once you have your measurements, you pretty much only need a decent linear algebra library. I recommend Eigen; it's easy to use and does everything you need.
Disclaimer: I haven't actually used MRPT.
FYI, Eigen is also included in MRPT. I am starting to use MRPT as well. It's quite a good tool for SLAM beginner->advanced I think.

2D game development basics

I would like to write some simple Mario-like game from scratch using language C. But honestly I have no idea how to do so, and I canĀ“t find any good tutorial for this, which is for free.
But to the actuall question, I have only written WinAPI programs so far, so all event handling and user input was handled by OS, with minimum work, But to develope game, with for example menus with non-rectangular buttons, animations, and so, I guess, there is no such thing in WinAPI taht could help me with this more than just some basic routines mouse pointer location and keypresses.
So, is the right way to write your game to write entire draw part of game engine by manipulating objects for player, enemies, and even background yourself, and than just use directdraw for output to screen?
EDIT:
I actually want to learn how to write games from scratch, becouse it must be great programming experience, and if you consider games like Commander Keen on DOS, created with no framework or libraries, but still so great.
A good approach to this would be to have a look at the SDL library. I'm not saying it's necessarily the best library for 2D games, but it's easy to get started with and the web is flooded with tutorials and open source code samples for simple homebrew 2D games written using SDL.
I do recommand the SDL too, but you should definitely have a look on lazyfoo tutorial, which is just great.
When I started programming I started doing it with Allegro, back in the good old DOS days. It was the first usable library which worked with SVGA libraries, and had a good sprite support. Then version3 came and they added support for windows (using GDI and Directy X, you could choose at runtime which engine to use). The linux port came to life, and all is good.
It's a very basic 2D library, and it will teach you the very basics of graphics and animations. Now it even contains audio support which is a very needed addition (well, I still remember V 2.9X...). They are in betas for version 5, and I think this is an interesting project for you to look into.
http://www.talula.demon.co.uk/allegro/
What are you guys talking about, the WinAPI has low level drawing routines.
Although using an established library like SDL is probably a better idea you could create your own abstractions to the WinAPI drawing routines without too much difficulty.
Then it's just a matter of creating the while loop that has all the drawing instructions and interpreting input. For 2D games this isn't too difficult.
I also used SDL, but try to look at HGE. It requires at least DirectX 8.0 so your applications will work only on Windows but on their forum you will find many topics on how to port it to OpenGL. In my opinion HGE will be easier to learn than SDL, because SDL is a low level library and you will have to learn how to handle many things by yourself. HGE is more ready to start just out of the box.
In short, yes - there's nothing in the WinAPI that will help you much. However, there are dozens of game engines that you could build your game on that would take a huge amount of gruntwork out of creating the game itself. A bit of Googling will help you.
(Personal recommendation: although it's technically a 3D engine, something like Unity is an excellent engine that includes tutorials for creating 2D games. Unity isn't C, but it does make your life a lot easier...)
EDIT: I actually want to learn how to write games from scratch, becouse it must be great programming experience, and if you consider games like Commander Keen on DOS, created with no framework or libraries, but still so great.
This is actually not quite right. Commander Keen (and any DOS games) do use libraries: the ones provided by DOS, BIOS, etc. Without libraries of one form or another, you wouldn't be able to do anything useful with C. For game programming, you really do want to leave all the low level details to someone else.
I'd recommend Allegro as a beginning game programming library.
Check out this one Game dev starting
They have realy a big resource related to game programming and a lot of beginner stuff. SDL is good, but you should consider about learning basic game techniques before start coding and even before start thinking about the api/libs you use.
Clear out how much "intelligence" you need (Ki), consider about loading/Saving a an early time, ... so much things that you should keep in mind if you want to finish your project.
Do you need a game editor? (Also..work) What about sound/graphics? Writing all this stuff on your own will take a lot of time (if you do not have experience). Creating the content is another big issue which can consume a lot of time, if you make it at all.
Maybe it will help you to have a look on some dev kids, because that will give you the idea how their engine works. Like this one (outdated) Dev kid
I've just started a similar project a few days ago, you can check it out over at GitHub.
It should give you some ideas about how the game is structured. As well as some details on a scrolling 2D map with collision (which turns out to be quite complicated if you want to get it 100% bug free). Oh, and it's using SDL as many here have already suggested.
As for me, this is my first C project. But I'll have to admit that I've done similar stuff in Java and Python before, so this was a good way for me to quickly learn C. And since it's learning and not any productive stuff, I'm using plain C99, which makes the task even "funnier".
But back to the game, you really need to think about your design before you start coding, write it down on a sheet of paper, or if you're like me and you don't have tree stuff in reach write it in pseudocode.
Think about as many possible game states as you can, nothing's worse than having to re-implement the whole player/map/whatever stuff from scratch just because you did not think about feature XYZ before.
Design is very important, if you don't have a goal to begin with, your project will reach a point where it fails, just like my Tuff did, well it also failed due to missing music and somebody who would have designed enemies, etc.
Speaking of graphics and such, bear in mind that the game will consist of much more than just the plain code. If you aren't good in graphics then take that into account while designing. Because you will quickly lose your motivation when the only things on the screen are colored rectangles.
Action Arcade Adventure Set (originally published as a book) is probably one of the most complete tutorials on how to write a 2D side-scrolling game. Although an older reference, many fundamentals for developing a 2D side-scroller have not changed.
Full source code examples and some tools to develop a side-scroller are provided as downloads. There is only one external library used to handle graphics primitives. As this is an older DOS program, you may have to use a DOS emulator like DOSBox or modify the examples for more modern environments.
I suggest you skim chapters 1 to 9 and focus on chapters 10 to 17.

Is it worth it to learn Silverlight and develop applications using it?

I'm mainly asking this to professionals who know the playing field of professional developing. Is it worth it to learn and develop skills in Silverlight?
I know that penetration for Silverlight is obviously low in comparison to Flash but Silverlight seems lighter and a more cutting edge technology.
What are some of the benefits Silverlight has over Flash?
Is there a lot of work for Silverlight developers (of course combining them with ASP.net)?
Thank you very much for all the responses. :)
Edit: I program mainly in C# so there will be an obvious plus side to using it.
Also, how reliable are these results: BubbleMark
It's a huge topic and you can read articles all day on Flash-vs-Silverlight-vs-AJAX.
I use Silverlight and was completely over the moon when it was released due to the ability to employ the CLR in browser based applications. Javascript/DHTML development drives me nuts and for me Silverlight was my way to escape its clutches. As far as Flash goes my very brief foray into it found ActionScript to be more painful than Javascript but that was years ago and things have undoubtedly improved since then.
Basically if you're using .Net for your back end then it makes perfect sense to use Silverlight for the front end. It means you only have one development environment and language to deal with and where appropriate you can reuse a lot of your back end code on the client.
In practice it's not quite that easy and my experience has been that there is a lot of resistance in user land towards Silverlight. The main bone of contention is generally that the cross browser and operating system support is not good enough. Users that employ Opera or use Linux or PowerPC Macs can't use Silverlight (Moonlight isn't there yet). Those users are generally vocal ones.
If you know all your users will be on IE/Firefox on Windows/Mac Intels or you have a compelling application that users will change their set ups for then Silverlight is almost certainly your best option. If you have an application that you want to hit a wide range or disparate users you may need to weigh up the options a bit more.
The fact that Microsoft has thrown their weight behind Silverlight as the Web Application Framework of choice gives it a pretty decent chance of becoming widely used (though certainly no guarantee).
To position yourself in the most versatile way, though, you might want to consider first learning about the capabilities and limitations of both systems and then learning how to implement with both.
There will probably be many projects done with Flash, and many done with Silverlight. If you can program to either, you will be in a good position. If you are able to provide skillful assistance in deciding which one is best for a given project, you will be in a great position.
I tried it and did not like it. I didn't like the split development environment, xaml, or the limited install base and platforms it runs on. The IDE and platform itself still has a ways to go before I would consider it for use in a production environment.

What is the best path for working with 3d graphics?

Right now, I think a combination of C and openGL is what I need to learn, but it seems like there is still more to it that I need. Also, I'm not sure where to start. I know some C, from reading the C Programming Language (K&R).
If you understand the concepts behind 3D computer graphics then OpenGL + C is about all you need. If you need some help with the concepts then I'd suggest the NeHe OpenGL tutorials and a good reference book like The Red Book.
It depends on what you are trying to do:
If games interest you and you just want to develop amateur stuff without all the fuss, XNA + C# is by far the easiest way to start.
If you plan on becoming a professional game developer, your best bet is DirectX + C++.
If you like open source and just want to mess around with general 3D, OpenGL + C/C++ will offer you a nice community of dedicated people.
There are of course a number of engines and library you can use on top of the last two, such as Torque, Geometric Tools, etc.
I suggest you to take a look at .NET possibilities, i.e XNA Framework
I don't think there is more to it. What makes you think so ?
C and OpenGL is enough to begin with.
I've found that using 3D Studio Max and actually making models helped a lot when it came to learning some OpenGL. I could understand all the intricacies with normals and whatnot.
I would really recommend against trying to learn C and OpenGL at the same time. They are both complicated and more so when you mix them.
I would recommend extremely highly getting, reading, and working through some of the examples in the book Computer Graphics: Principles and Practice. Yes, the book is MASSIVELY out of date; it's still the canonical reference for this sort of thing.

Best way to get started with programming other things than your computer? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
What is the best way to get started with programming things outside of your computer?
I don't mean mainstream things like cell phones with APIs.
Please assume working knowledge of C/C++
I vote for the Nintendo DS:
Nice hardware : 2 CPUs, 2 screens, touchscreen, mic, speakers, wireless, 2D and 3D acceleration
No OS to speak of
Freedom to talk to the bare metal without restriction
Well-documented
Very active dev community
Enthusiastic audience for anything cool you create
Cheap (shockingly so if you go for 1st-gen units)
All-in-all it's really excellent fun to play with.
To get started:
Get a DS
Get a SLOT1 flash-cart (I've got a DS-X, but there are plenty of others)
Get devkitpro
Go here for help or advice
Brian, you might find the Arduino interesting. It is inexpensive and pretty popular. I started playing around with micro controller boards and such a few years back and that lead to an interest in robots. Kind of interesting, at least to me.
If one is interested in a .NET-flavored development environment, there is an analog to the arduino call netduino that is worth a look.
Embedded programming is fun.
You can start with things like the Basic stamp or PIC, or since you know c/c++ you can use a real microcrontroller like an Atmel AVR. look at the Butterfly or Arduino kit
The Arduino has an amazing community of projects and info behind it.
It's not a microcontroller, but the Lego Minstorm is a good place to start learning the ins and outs of embedded programming.
I recently heard about the BUG which calls itself "open source hardware development". Is this the sort of thing you're looking for?
Buy yourself an HP 10C Calculator, and then program all those "programming 101" math algorithms using its insanely small but practical calculator language. Reminds me of assembler, but it's not.
I'd strongly recommend to find an open-source project next to one of your leisure occupations.
First, open-source because the support is mostly very friendly, then open-source because other contributors will have at least one comparable hobby, and then favorite pastime occupation so you can see a need for tools etc.
Two projects I have been playing around with very successfully:
Music: Rockbox, a firmware replacement for many mp3-players and portable media players.
Photography: CHDK, a firmware addition to numerous Canon compact still cameras.
Give SparkFun a shot. For me, servos are what I love to hack around with.
You can try with BeagleBoard, though its kind of mainstream, nonetheless very impressive performance to speak off at just 149$.
I'd look into stuff like (unofficial) GBA development or the like, sure there are "Libraries" but you can go digging and just stick bits into specific addresses and make stuff happen. You can't get more "No API" then raw memory-mapped hardware access.
Maybe start with small microcontroller projects.
This may be helpful: http://www.kmitl.ac.th/~kswichit%20/
What sort of things do you want to program?
Sounds like you might be interested in MAKE magazine, and some of their compilations, such as Making Things Talk. With a little bit of experience with basic electronics, you can follow their recipes to do all sorts of odd and interesting things. When you get more comfortable, you can start modding their designs.
Good luck, :)
I have personal experience and would recommend using these products to program PICs:
Programming board
GCBasic (Open Source Basic)
The PICs are cheap ($2 bucks or so) and the board will cost you around $120.
Recently, I have been impressed with TIs wireless USB chips/programmers. You can get 2 chips and a programmer for $50 bucks. It also comes with a free C compiler. By default it comes with a sample remote temperature program.
TI wireless target board
I think it's fun to hack old iPods. You can get a fourth generation iPod (or any of a number of supported devices), run Rockbox on it, then get the source and help hack on it.
I would also recommend AVR (8-bit) and Butterfly or DB101 kit. The main advantage is that there is a GCC compiler available and that you can program them through the Serial Port, without the need of a tool. Inexpensive programming and debugging tools are also available. There is a very strong AVR community in AVRFreaks
Another alternative is ARM7 and ARM9 microcontrollers (32bit). If you are interested in using an OS (ucLinux/FreeRTOS for ARM7, Linux for ARM9), you should go that way. There is of course a free GCC compiler. You can buy kits and tools at Olimex
If you would like to create a cool gadget using a microcontroller as a learning experience, you can look at the starter kits from Rabbit (website). They have a variety of low-cost kits with 8-bit microcontrollers to get started with a particular technology.
There are a lot of programmable robots around. In fact, even some of the Roombas (automated vacuums) can be programmed. This is particularly good if you want to teach kids how to program.
If you have a Nintendo Wii, you can crack it using Twilight Princess. You don't even have to buy it. I just rented it for a couple days. Go to WiiBrew.org and check out some of the projects that are available there. Most if not all are open source, and should give you a good starting point. Lots of ports of existing stuff, along with some original programs written specifically for the Wii. You would of course do the programming on your computer, and transfer the compiled binaries to the Wii. I haven't looked into how hard it is to get a development environment set up and having it build for the Wii, but if you email they project maintainers from wiibrew.org, they may be able to set you up.
[EDIT]
Just browsing around, I found DevkitPro, which seems to be the toolkit of choice for developing on many different console and handheld systems, including the Wii.
To ease yourself into embedded programming, you may want to try using XNA for either the Xbox or the Zune. You won't be doing memory management, but you'll get used to the constrained hardware if you do it on the Zune. Admittedly, it's using C#; but you could always do the programming itself using CIL.

Resources