Microcontroller and Robot Construction [closed] - java

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am looking for an answer to a question relating to programming and robots..
I have been learning java over the past 2 years, and just recently started working with and Arduino microcontroller for a robot that is near completion(2 servos, 1 ultrasonic sensor, 2 parallax servo-controllers, 12v battery, all in a toy car that i ripped apart).
I was hoping to build a much more complex machine that would do all of the following:
Control 4 servos that would move treads
Powers a few cameras, possibly relaying several feeds to a monitor or pc wirelessly to help with user-controlled movement
Control a pan-tilt servo system for a top mounted camera or paintball/airsoft gun or some such similar device
Maybe a gps system, so that having it can return to the user when low battery, or when the user is done controlling it( NOTE: Not a necessary component, but would be very nice)
My Question is this: What microcontroller or controller do you know of that could be used to control all of that effectively, and not be maxed out(Also hoping that the suggested could control multiple systems at once)? What programming language would effectively be able to control all of the above robot effectively(or is great for this type of system in general)? Does the programming language that must be used change depending on the microcontroller?
There may be more to that, but currently, the base at minimum must be built before I can go anywhere else. My budget is not large, and would prefer to keep this cheaper than $1000-$1500 excluding the mounted tool on top.

I'd say you should take a look at the Raspberry PI for the time being. It cannot do it all alone, you will have to combine it with a real micro controller as io expansion.
The raspi is cheap, and got a strong community, easy to get help when you are stuck.
For micro controller I would chose an ATmega328 from Atmel (~$4 on ebay). with that one you can stay Arduino compatible, which again has a super strong community.
I know the newer BeagleBoneBlack will be able to handle both tasks in one unit, but the product seems to be a little less mature right now, and the community is nowhere close to raspi or arduino!
Over at LetsMakeRobots we are building robots too, some even as advanced as your project, you might find some inspiration. And there are definitely some motor driver geeks there!

You're looking for an Arduino with an Adafruit motor shield to start with. I won't post a link to either due to the commercial nature but that will put you in the right direction. I'm not sure Stackoverflow is the right place to ask this question though. You may have much better luck elsewhere.

Related

How to programm the AI for a chess game [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am considering making a chess game for android apps. The only thing I don't know how to do is write code for the opponent AI or how it even works.
Do I have to write the code for the AI from scratch or are there packages that I can just implement?
There are many ways you can go. Most of the chess engines rely on approved chess theortical investigations and have quiet a large bibliothek of them to evalute to first 12 moves of a game. This is why some of them get pretty confused when doing unusual things, which was a winnig approach in the older generations of chess enginges.
Bascially it's the taks of encoding the rules of the game and then, of course, find an algorithm to find the best solutions.
For that again there are many different approaches, linear optimization is one but has its impacts as the game is rather complex and solving systems of linear inequations is both a memory and cpu consumig task and cannot be multithreaded properly.
Another approach is the use of genetic algorythms, which imho fits best to this kind of problem domain as it's encoding of the rules and possible strategies into the genstructer and rating the individuals of an population in the fitness function.
This can be spread of multiple threads pretty well, but this approach also has its own impacts, as the required population size will be high which obviously again is a memory consumption.
There are existing solutions such as the metioned http://stockfishchess.org/download/ stockfishchess engine or http://cinnamonchess.altervista.org/, which provide an android api and many resources on the web about how to do it are also available in the net such as http://chessprogramming.wikispaces.com/Chess+for+Android (a starting point).
Also you could try to port an existing chess engine for linux to android such as
http://cinnamonchess.altervista.org/ which should't be to heavy as android is Linux -based and the android replacement for glibc is mostly compatible.
Or you could try a Java chess engine such as https://github.com/albertoruibal/carballo and port it to android, too. Just search for open source chess engine and you will find many existing solutions.
"The only thing " is pretty amusing in this case, because the main part of writing a chess game is to write the Ai for it.
Another approach could be to use a http://de.wikipedia.org/wiki/Schachserver chess server and communicate with it so that your player can connect to the net and play agains others.

Android only game in OpenGL: performance in C++ (NDK) vs Java (Dalvik) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I know that similar questions have been asked before, but...
We want to develop (at least hope) an indie game but still a game with high quality graphics with hundreds if not thousends of moving objects on the screen so we expect very high number of polygons and requirements for hittest and perhaps some AI.
I know the basic problem with java is garbage collection. But it's not an issue, we plan to allocate all of the required memory before the game starts and for transient objects we will use pooling (so in the game loop the new keyword will never be written). And we plan to use every possible techique mentioned here (Google I/O 2009 - Writing Real-Time Games for Android).
The main reason we insist on Java is deployment and we only want to develop for Android (for now at least)
So can the same performance in a game be achived with Java (even if that means ugly/not idiomatic code) as if we did it with c++. If not, what are the specifics? Or perhaps if it's possible but very-very unpractical what are these reasons?
(For example I read something about java Buffers and OpenGL are not the best pairing but don't remember the specifics - maybe some expert)
You're going to be paying a fixed additional cost per call to use OpenGL from Java source code. Android provides Java-language wrappers around the calls. For example, if you call glDrawArrays, you're calling a native method declared in GLES20.java, which is defined in android_opengl_GLES20.cpp. You can see from the code that it's just forwarding the call with minimal overhead.
Nosing around in the file, you can see other calls that perform additional checks and hence are slightly more expensive.
The bottom line as far as unavoidable costs goes is that the price of making lots of GLES calls is higher with Java source than native source. (While looking at the performance of Android Breakout with systrace I noticed that there was a lot of CPU overhead in the driver because I was doing a lot of redundant state updates. The cost of doing so from native code would have been lower, but the cost of doing zero work is less than the cost of doing less work.)
The deeper question has to do with whether you need to write your code so differently (e.g. to avoid allocations) that you simply can't get the same level of performance. You do have to work with direct ByteBuffer objects rather than simple arrays, which may require a bit more management on your side. But aside from the current speed differences between compute-intensive native and Java code on Android, I'm not aware of anything that fundamentally prevents good performance from strictly-Java implementations.

Media player libraries in Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am evaluating libraries for playing audio/video in Java. It does not need to be 100% Java; Java bindings to native libraries are perfectly OK. An external application that can be controlled from Java is also fine, as long as it can render video on a Java component.
The target platform is Linux. Windows support is a plus, but not required.
I have played with VLC using the VLCj bindings, and it works pretty well in general, but keeps crashing occasionally when put under stress. I have also used mplayer in slave mode, which looks good. But I'd like to evaluate other options as well.
These are the requirements:
Live playback of H.264, MPEG4 through RTP using RTSP. Extra points for MJPEG over HTTP.
Able to render video on a Java (Swing or AWT) Component
Open source, and actively maintained
Stable, rock-solid
Suggestions? Advice?
Ok, I've spent the last month playing with several options and these are the results:
VLC. This was my first thought, as everybody keeps saying that it "plays everything". I have used both the VLCj Java bindings, and the built-in remote interface (-I rc). I found this to work pretty well in general, but had some issues. I kept seeing ocassional crashes under heavy load (not VLCj's fault as it also happens when using the binary directly). Also I've found memory consumption to be relatively high when compared to other options.
MPlayer. This actually performs better than VLC in my experience, no crashes, and memory consumption is lower. No Java bindings, although the slave mode works very well.
GStreamer. Very powerful, very flexible, while still easy to get started with. Tried both the Java bindings and running the gst-launch binary from Java. Both approaches work remarkably well.
Xuggler looked good, however it seems to have issues with RTP (as stated in the FAQ). Since both GStreamer and MPlayer worked so well, I did not get past the initial research.
I found GStreamer to be the best solution given the requirements, with MPlayer being the second option.
have you looked at gstreamer?
I've also spent a while researching my options, and I've actually come to the conclusion that VLCJ is the best option - however here's the clincher, you need to run it out of process (especially with multiple players) for it to give you 100% reliable operation. That's the approach I'm taking and I've yet to see it crash. With it rock solid in this way it also has other advantages:
It can play pretty much anything. Yes it's a bit of a cliche, but this includes DVDs, Youtube videos, pretty much any video file...
Should support Linux / Mac / Windows, though I've yet to verify Mac working.
Actively maintained, and if you ask a good (as in well thought out) question on the discussion group the owner often replies in minute in my experience!
Open source, and the Google group activity at the time of writing is high.
Uses all the graphics acceleration VLC does
Able to play to any heavyweight Canvas component (and if you use the direct player, you get the BufferedImage to display anywhere you like, even in JOGL 3D land if you're that crazy!
I haven't found it that heavy on the resources front either, though I haven't done any thorough testing (but 3 players work fine in tandem as well as my relatively power-hungry application on my 4 year old basic laptop!)
Disadvantages? There's no official framework for out of process players, so you have to build one yourself (see here for how I did it). And you do sometimes have to do some fiddling to get it working. But as far as I can see, it's working well for me so far!

Has Java ever been used in outer space? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
In response to a question about examples of Java usages, I bumped across some articles where NASA used Java for ground control in a mission to Mars but I couldn't find out if it has ever been used outside of Earth. Do you know of any such instances?
Here you will find a paper discussing the current state of using Java in space applications:
REAL-TIME JAVA IN SPACE: POTENTIAL BENEFITS AND OPEN CHALLENGES
They say:
In short time, it is unlikely that
with current Java implementations the
whole spacecraft on-board software
could be written in Java. However,
Java could be used as an isolation
platform for software that has not
been assigned the highest criticality,
while the critical code would still be
written in Ada or C.
Here one of the same authors reports on a successful test flight of an unmanned aerial vehicle (UAV) that uses Ovm (open source RTSJ (Real Time Specification for Java) implementation):
A Real-time Java Virtual Machine for Avionics
One fact often overlooked is that most space probes use older processors. They simply cannot run current commercial software. They are not fast enough or powerful enough. IC chips in space are exposed to high levels of cosmic rays. They energetic particles can destroy the small nanometer components on modern CPUs and other IC chips. To work reliably in space you either need specially designed ICs with redundant components, spend a lot on heavy shielding, or use older IC chips which have larger components that can take a hit from a cosmic ray without being destroyed.
Most of these older CPUs will run with a RTOS such as VxWorks and are either programed in assembler or using a language like C and still get decent performance.
Probably on the documentation laptops they take up there on the Shuttle, at the very least.
Java is also mentioned here, which implies that there is at least Java code that can talk to some spacecraft, if not actually run on them: http://www.dtnrg.org/wiki/Code
According to this article, the Ground Operations Center uses it for 3D Mapping and Planning. A comment on this forum claims the Mars Lander runs VxWorks.
Edit: Confirmed by Wind River, the Spirit and Opportunity run VxWorks RTOS. No other references where Java has been explicitly used in Space.
I think I read a few years ago that some probe or satellite used Java as part of their analyzation equipment but I doubt that mission critical software will be developed in Java today.
However: With all the applications used by astronauts on their Laptops I wouldn't be surprised if there were applications written in Java. Maybe some locally installed webapp that is used as a bugtracker.
I cannot speak with any authority with respect to the software onboard spacecraft, but I can say definitively that Java is used by NASA (or its affiliates) to handle the data from the various missions. I recently worked at a laboratory for space physics, which handled data and telemetry for in-orbit spacecraft, and the development team (of which I was a part) worked almost exclusively in Java.

An idea about developing an agile wall web tool [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 5 years ago.
Improve this question
I'm thinking about developing a web app to visualize the agile wall. The reason is that the project I'm working in has multiple distributed teams, so it is very difficult to share the information on the agile wall across the teams. I know some tools like JIRA do have agile wall functionality built in, what I want to have is a dedicated agile wall web app which could potentially integrate with those popular project management systems.
Does this idea sound sensible and interesting to you? Please let me know if you get better idea about sharing the agile wall across distributed teams.
Thanks.
John
Have you looked at Mingle from ThoughtWorks?
I haven't looked at it recently, but I'd expect it to be open to integration with other systems.
Even if you end up wanting to write your own, you should look at Mingle to see what a similar system looks like.
I'm not sure how well the card wall translates to a small screen. I've seen one similar implementation of something like this (www.cardmeeting.com) that I was not impressed with. One of the drawbacks to it is that the cards are unreadable until you click on them. That being the case, the tools used by most commercial vendors to capture stories at least the advantage that you can immediately see the titles on the stories even if they don't implement the wall format.
Another concern that I have is trying to take a passive information radiator and insert it into an active presentation medium. The wall format works partly (or even mainly, I haven't really looked at the research closely) because it's highly visible but not intrusive. Whenever you see it you get an immediate snapshot of the current state of the project. Translated into a web browser, you lose this aspect. It's not clear to me that in an active medium, where users need to navigate to information rather than simply absorb it, if the wall is still the right tool.
Take a look at Simple-Kanban. All done in a single HTML file.
Before you start implementing your own tool, take a look at:
http://www.userstories.com/products
I'm sure you can choose something appropriate :-)
Guess which one is ours...
Regards,
Marcin

Categories

Resources