• user warning: Got error 28 from storage engine query: SELECT t.*,v.weight AS v_weight_unused FROM term_node r INNER JOIN term_data t ON r.tid = t.tid INNER JOIN vocabulary v ON t.vid = v.vid WHERE r.vid = 2450 ORDER BY v.weight, t.weight, t.name in /var/www/html/myrobotlab/modules/taxonomy/taxonomy.module on line 640.
  • user warning: Got error 28 from storage engine query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND b.delta = r.delta WHERE b.theme = 'superclean' AND b.status = 1 AND (r.rid IN (1) OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in /var/www/html/myrobotlab/modules/block/block.module on line 460.

Moving 3D model with JMonkey in MRL

Last week I manage to get a 3d model of InMoov taking the position in synch of my InMoov. So let me explain how I did it

I start with the VinMoov model that Gareth post some time ago. Unfortunatly, I did not manage to be able to move it's armature (or did not found how to do). So I try something else

in Blender, I disasemble the VinMoov and saved each robot part that represent my DHLink in IK individually. I modify the part slightly so the origin of the part (rotation point) is at 0,0,0. I then export the part using OGRExml exporter.

Then, in the jMonkeyEngine SDK, I import the files exported from blender. By default, the SDK create the Assets folder inside it's own working folder. But I need to have the asset inside MRL environment. I follow those instruction to set the asset folder in the root directory of myrobotlab


Now I can modify the 3d models that will be use in MRL.

So I import the blender model to the MRL Assets folder. Unfortunatly, the material in the blender file did not import well, so I need to fix it

  1. I convert the .scene file to jme binary (.j3o) by right clicking on the .scene file
  2. I right click on the .j3o file and select edit in SceneComposer
  3. in the SceneExplorer Window, I expand the items until I see the Material set on the 3d object and select it
  4. In the Properties window, I change Material to an existing Material or create a new default one. The defautl material is white so I was fine with it
  5. I then it SaveAll to save the j3o object
  6. I repeat those step for all the 3d model I use end then I was done with jmeSDK

Back in Eclipse, I create a class that extends JME SimpleApp (https://github.com/MyRobotLab/myrobotlab/blob/develop/src/org/myrobotlab...) just like we will do in jmeSDK. That class will render 3d model and updates their position. Some thing noteworthy to said to have it work in MRL

  • We need to tell him where to look for the 3d files since the assets folder are not at the default location. this is done with assetManager.registerLocator("inmoov/jm3/assets", FileLocator.class) command
  • SimpleApp need that we don't modify items from another thread. So item setting and updating must be done inside the simpleInitApp() and simpleUpdate(float) methods. Otherwise jmonkey will crash

the class also have 

addPart() -> use to set the 3d model in position. each part create a Node, place the 3d model in it, add that node to a parent node with a position relative to the parent node and set an initial rotation.

updatePosition(IKData) will update the rotation of the 3d model. IKData is a class that output by the servo (ServoEvent) that contain the name and position of the servo and is output every time a servo position change.