I`m developing a new robot for a Rescue Competition, and we want to use SLAM to do the mapping and Localization.
One of the main problems is to match a list of dots with another list of dots.
We are running the robot on an Android 2.4Ghz, with a self made app.
Does anyone know about any Java Library for ICP (Iterative Closest Point) or PSM (Polar Scan Matching) algorithm?
If not, do you know how to implement it in Java?
Thanks
This is a pretty vague answer, but you could try your luck with the MITK (Medical Imaging Toolkit) Framework. Some filters there employ the ICP Algorithm. Since the whole thing is open source you should be able to find what you need there. It's all written in C++ though. Plus Side: They are working on an improved version, the Anisotropic ICP. Also check the point based registration module from the 3m3 branch of MITK: The Point Based Registration Module
Related
I am a beginner and is given a project by my professor. I am in a process of making a console based game (Tetris) and want to implement controls to it for performing specific tasks i.e for movement and rotation. I have found out that KeyListener can be used but it is strictly GUI based. So I am looking for an alternate way to get the work done. If you have a solution or an article or web link related to it, it will be appreciated. Thanks!
Take a look at this thread, there are some solutions here: How to read a single char from the console in Java (as the user types it)?
To accomplish this you need to set your console into raw mode. Apparently there is no built-in way to do so with Java, but there are some libraries you could use to get there, like jCurses or jLine3.
I have a goal to build a robot that can collect table tennis balls and put them into the goals A and B seen to the left and right side of the added picture. For info, the course is rectangular with one single obstacle; a four-walled cross.
For now I have bought the Pixy 2 to recognize the balls it needs to pick up.
My two questions are:
Is Lego Mindstorm (LM) an easy/reasonable programming language to solve this, and can LM also easily control the robot’s movements?
Is it possible to use Java instead of LM to solve this? (This would be preferred, as I know Java but not LM)
As I understand LM is not a programming language and you can use several software kits to deploy a program on the LM. Some of them are Java based.
See
https://en.wikipedia.org/wiki/Lego_Mindstorms
Lego Mindstorm's default programming language is visual/blocks based. It's intended for kids with not programming experience. So, if you know Java you'll have no problem using it. Indeed you'll find it too simple.
Programming a robot's movement is very easy, and it comes as a sample project in the Mindstorm's set.
Plus: Your camera comes with plugins to add it's own block to the Mindstorms programming environment. You even have a sample project to build a chaser robot.
From my experience (with Mindstorms NXT2) trying to use LeJOS() was not straightforward. But that was several years ago, with an older version you've indicated in the tags (ev3).
I am currently working on a RCP-Application where i can draw an Internal-Block-Diagram.
Maybe most of you know "Papyrus" from eclipse. This modelling tool provides an Internal-Block-Diagram but I think it is a little bit overloaded so I decided to do it on my own.
I found this awesome tutorial :
https://www.vainolo.com/tutorials/gef-tutorials/
It helped me a lot how GEF works but one thing is not explained. How to draw ports. In the picture below you can see what i am capable of.
I am trying to modify my application that a user is able to draw ports. Like in the next picture:
Does somebody know how this is done in GEF ?
As far as I understand it, it has something to do with the figure of a node. Every node has a figure which is displayed inside the diagram. A port is an extension of the edge of a node and it is not possible to exceed the edge of a node. So I think that papyrus uses a different way to make this happen.
I tried to get the source code of Papyrus but i found nothing neither a documentation about it...
I am thankfully for every opinion.
Papyrus use GMF to create these ports.
You may check classes with containing BorderItem, for example AbstractBorderItemEditPart.
Be careful, the tutorial you are following seems to have been written for GEF3.
As far as I know, there is no "easy" way to manage port in pure GEF3.
There was a major change in GEF last year, you should be able to easily create port with the new GEF4 API.
I am a cameraman and I want to make an app for my Moto Droid that will
calculate my depth of field given four inputs.
I am literally brand
new to javascript and this programming stuff, so I was wondering if
anyone could help me out.
I have a very basic GUI set up using Droiddraw which allows me to
input my 4 variables, which are:
Focus (#+id/focust)
Focal Length (#+id/flt)
Aperture (#+id/apt)
Circle of Confusion (#+id/coct)
Equations for this calculation are located here
for example...
to get hyperfocal distance I need to get: ((f^2)/(N*c))+f
all of these variables will be drawn from inputs in the GUI, but I don't know how to call them, how to write the actual math, and how to address the results so I can make them appear in the "results area" on the bottom of the screen.
I've never done java before and I only want to make this app because the existing ones don't fit my needs.
Can someone help?
Thanks!
If I'm not mistaken, DroidDraw is a tool for building the XML user interface description used by the Java API. If you want to program for Android in JavaScript, something like PhoneGap might be a better choice. It lets you build real Android application using HTML and JavaScript.
On the other hand, if you want to use the XML and Java APIs, then you should probably run through the Android tutorials. The first one is Hello, World.
Since you're just getting started with programming, I can't stress tutorials enough. It's true that your idea shouldn't be too hard to implement, but you need to understand the basics first.
I don't mean to give the impression that one style (PhoneGap vs. Java and XML) is better. For your purposes, either should be fine. It's more a question of what you prefer. Java/XML is the paradigm supported by Google, and provides access to more functionality. On the other hand, if you already know HTML or JavaScript (or are interested in learning them), PhoneGap will certainly provide everything you need. I think PhoneGap is also intended to make it easier for beginners, though I haven't used it, so I don't know how successful they have been.
The XML file that is generated by DroidDraw can't be used within PhoneGap. If you do choose to use PhoneGap, then you will need to build the interface in HTML. You might be able to use something like DreamWeaver or FrontPage or one of any number of HTML editors to help you with this step.
The XML file is just a description of an interface. When you start your application, the Android platform uses this description to build the user interface that you see. Once that has happened, you can move data from the interface to Java, or from Java to the interface, without any hassle. You certainly won't be limited by the XML interface description - it's pretty flexible.
If you've been going through the Android tutorials, then it might be best to forget that I even mentioned PhoneGap. It's a wildly different alternative that is the right choice for some people and some applications. But the Android tutorials won't help you to understand it. I only brought it up because you mentioned JavaScript in your original post.
My current problem is not so much a blackberry issue as it is a java
package issue.
In the application I have a rectangular region. This region is rotated by
about 30%.
I need to accomplish two things:
when a user clicks, is he inside the region?
when a user draws a straight line on the screen,
does any part of that line intersect the region? if so, what is the
length of the line inside the region?
I know that I can write my own functions to accomplish this (after dusting
off some algebra and geometry skills that aren't needed for web forms) but
I was thinking that this is a common issue in game programming. I found
some libraries for c++ and some for c# but nothing for java.
Does anyone have suggestions for good java packages? The packages don't need to have graphical components. In fact it would be best if they just handled the geometry and calculations based on x,y co-ordinates alone.
The usefulness of this answer will depend on exactly what type (SE or ME) and what version (and, for ME, what config and profile) of JVM you are targeting. Since it's a blackberry, you are likely J2ME of some flavor - YMMV.
That said, the functions you want appear to be present in java.awt.Rectangle, java.awt.geom.Rectangle2D and java.awt.geom.Line2D.