Overview / Info

Hi all,

this site is still under construction and it is a try of helping if someone want to simulate a robot too.
I´m sure there some errors int the text because i´m not an native english speaker, but nerver mind here we go:

As wished in the jme forum (under physics→Roboter Simulation Servo Problem) i will post the latest progress
of my tries to move a robot with jme2Physics JBullet integration and share the code.
The robot stands but still wiggle a bit. This seems to me because the joints couldn´t be set complet stiff.
I came to this conclusion by erasuring all code from the methode update() in class Servo and run the programm.
What I excepted was that the modell would be complete stiff but it wasn´t so.


Never mind, here´s the code if some one would try it out feel free to do so.
If somebody know how this code could be made better it will be great if he post the upgraded version here.

The code contains still some comments which allows to switch between some tries but this shouldn´t bother.

positions.xml.zip some positions of the robot, which can be loaded or rather are coded in the main.java file. If you get the simulation to run you can press + for next position and * (star/mult) for previous position (on the numpad).



Now a little summary what stepps has been done and be needed.

Dependencies are:

  • jme2, the stable2.0.1 version should be fine. i use a svn version a bit after the stable version comes out.
  • jme2physics with jbullet integration, but a bit modiefed from me (one methode added, enableAngulareMotor() in JBulletJoint.java) see attach someneededjars.zip contains the modified jme2physics.jar file
  • the files which contains the models (see attach)
  • and the jars and natives which are needed from jme2physics and jme2

A little Translation \ Explanation

The names of the different robot parts are symetric ordered, that means if the name start with a r it is a right part of the robot from his point of view, same for l means left. There are also some small cubes in the modelles, which name starts with h. This cubes are created/placed to know the position of the rotation axis of the different robot parts.

The names are chosen in German language, so this means:
kopf = head
brust = thorax

oberarm = upper arm
unterarm = forearm
hand = hand

huefte = hip
oberschenkelServo = (a help part, put over oberschenkel)
oberschenkel = thigh
unterschenkel = lower leg
fussServo = (a help part, put over fuss)
fuss = foot

Modelling

You can use blender to model the single parts of the robot or use roboterblendermodelle.zip or the with hottbj-03e converted versions model.zip which contains the two modelles, that could be loaded with the XMLLoader class.

  1. make sketches from the diffrent robot parts (i mean of every board of the robot)
  2. scan the sketches and build the boards
  3. combine the boards to robo parts
  4. combine the parts to the whole robot
  5. add some help cubes in the model where later should be the rotation axis

Export your model from blender with hottbj-0.3e.zip. add the contain of this zip file to your blender/scripts folder.

Development

You can use Netbeans (e.g. version 6.7) as IDE.

  1. make a project from existing code. use the files which are in src.zip
  2. right click on the project, click properties on the context menu
  3. catogerie: Libraries, add all jars which are in someneededjars.zip by clicking on add JAR/Folder button

You will also need

and maybe

(the SNAPSHOT jars were to big for uploading. But you will normally have them on your system if you have installed jme2.)

  1. categorie: Run, add this -Djava.library.path=“natives” -Xss512m -Xmx512m , if you created on folder in your project with the name natives and extract all files from nativespart1.zip and nativespart2.zip there, in the line with VM Options before. If you extract them any where else add the path to them there.

hint: Relative paths starts with no backslash e.g ../foldername means go from the project folder one above and search for one folder with name foldername. Absolut paths starts with backslash e.g (Unix) /Users/path/to/natives or (Windows) c:/path/to/natives


Comments / Updates

If you want to help too, please post your updates below this section or add a link to your site or make some improvement suggestions under:
forums → Physics → Roboter Simulation Servo Problem.

Robot Simulation Version 0.2


Changes

You got now the possibility to load a robot that is free every time you press the key 1 and if you press 2 the new instance is pinned into air and can´t fall over.
Next keys for next and privious position are set to 0 and 9 because of + and * works only on the numpad and on notebooks its a bit unconfortable.

There are now CollisionGroups and -Rules added so that not every collision has an effect.
This means collisions, which takes place because of inexact modelldata like between torax and upper arm, are now ignored from jmePhysic. Generally all neighbour parts collision are ignored.
This leads to that the robot is now more stable.
Collisions which are more interressent will be written on the output. The information you can read there shows which parts collides.

New Data & Source Code

In the zip-file model.zip there are two subfolder.
In data for the texture, the model file which was made with blender and the exported -jme.xml file which is used to load the robot.
In src there are all source file you should need.

I´m adding also the jmePhysics.jar jme2physics.jar.zip (with falkens jBullet-integration for jme) file because i played a bit with the source but don´t know exactly if i change something dramatically. I belive all should also work with the old one, but sure is sure 8-).

Trial Bundle

At the german webpages Simulation von RB1000 Fortgeschrittenen Praktikum there is a download link “Zip-Datei herunterladen” where you can download the complete simulation/program and running it without makeing any compilations.
Extract the zip file and start the script run-unix for Linux and Mac OS or run-windows for Windows if you want run the programm the simplest available way.


/var/www/wiki/data/pages/starter/move_a_robot_with_jme2physics.txt · Last modified: 2010/04/27 07:42 by cupido  
Recent changes · Show pagesource · Login

Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki

subscribe to jME latest jme headlines


site design by bleedcrimson designs © 2008