Version 17 (modified by welberge, 7 years ago) (diff)


This documentation is mostly outdated and should be updated to reflects AsapRealizer's new environment setup

Start making your own project

This page presumes that you have successfully started the first demo program (following the QuickStart instructions), you have seen a virtual human, and you have been able to experiment with a few BML instructions. The next step is to start building your own application, or connecting Elckerlyc to your own application. This page gives some pointers to get you started.

Building a project that includes Elckerlyc

variant 1: Eclipse

If you want to program in Eclipse, you need to include the right versions (for your machine and operating system) of all dependent Elckerlyc libraries in the Eclipse classpath; you need to add the necessary resources to the classpath; and you need to set a few virtual machine variables (memory etc). Complete documentation on how to do this can be found at the wiki page UsingElckerlycInEclipse.

variant 2: Using Apache Ant, command prompt, and the HMI build system

If you prefer to use Apache Ant and a command prompt for compiling your Java software, then you might like to use the Ant based build system that is shipped with Elckerlyc. One of the great advantages of this system is that it allows you to easily deploy your application on various operating systems for 32bit and 64bit machines. At another wiki page you find the documentation for this BuildSystem.

Connecting your application to Elckerlyc

Extended documentation about how to connect your application to Elckerlyc can be found on then page about the RealizerPort. A short summary for two variants:

variant 1: Directly integrate Elckerlyc in your Java program

A good example of how to start an Elckerlyc Environment, load a virtual human, and send BML to it can be found in the demo HmiDemo/EnvironmentDemos/src/hmi/examples/ The runBML method shows how you can take a RealizerPort and use it to send BML commands directly to the BML Realizer.

variant 2: Connecting to Elckerlyc using a TCPIP Adapter

You can also start a TCPIP server for your virtual human. The Realizer will then listen on a certain port for messages containing BML, and will send the feedback back over another channel. The VirtualHumanSpec? documentation explains how to specify the server. The demo HmiDemo/EnvironmentDemos/src/hmi/examples/ shows one way to connect to the Elckerlyc Realizer via a TCPIP connection. This allows you to run the virtual human on a separate machine.

Changing the configuration of your Virtual Human

See the VirtualHumanLoader documentation for information on how you can configure your Virtual Human with a different body, new face and gesture repertoires, other TTS voices, various GUI elements such as a face expression editor or a voice selection dropdown, etcetera.

Loading a nice background scene for the Virtual Human

The Elckerlyc graphical environment supports the Collada graphics format. Below, you see an example of how to load a scene into the environment.

The example assumes the following directory setup:

 <resource directory that is on the resource path>/
 <resource directory that is on the resource path>/modeldirectory/
 <resource directory that is on the resource path>/modeldirectory/room.dae

See UsingResources for information on how to make sure that the directory <resource directory that is on the resource path> can be found and used by Elckerlyc.

Required imports:

import hmi.animation.VJoint;

The code to load the room:

    ElckerlycEnvironment env; //of course, this variable needs to be initialized
    public void initRoom()
      String roomDir = "modeldirectory";
      String room = "room.dae";

      GLScene glScene = null;
      glScene = SceneIO.readGLScene(roomDir, room, null) ;
      GLRenderList shapeListRoom = glScene.getGLShapeList();
      VJoint roomJoint = new VJoint ("room");
      VGLNode roomNode = new VGLNode(roomJoint, shapeListRoom); // 

See the MyFirstProject example for how you initialize the ElckerlycEnvironment variable.

User contributions


Reply here to add comments, suggestions, etcetera