CAVE setup problems

General discussion area.
User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: CAVE setup problems

Post by steffen » Fri 9. Jul 2010, 15:08

csm5125 wrote:Ok, I've run into another problem in compiling the trackd dll. I'm using Cygwin on top of Windows xp.

I have a directory with the following files:

TrackdApi.c (from the native folder)
TrackdAPI.o (compiled using: gcc -c -mno-cygwin -I /usr/include -I $JAVA_HOME/include/win32 -I . TrackdAPI.c)
de_jreality_devicedriver_TrackdJNI.h (created using javah)
trackdAPI.h (from mechdyne)
libtrackdAPI.a (from mechdyne)

I'm trying to compile using :
gcc -shared -mno-cygwin -Wl -o libJavaTrackdAPI.dll -I de_jreality_devicedriver_TrackdJNI.h TrackdAPI.o libtrackdAPI.a
(basically copied from the included build file)

which results in:
TrackdAPI.o:TrackdAPI.c:(.text+0xf): undefined reference to `_trackdGetNumberOfSensors'
TrackdAPI.o:TrackdAPI.c:(.text+0x26): undefined reference to `_trackdGetNumberOfButtons'
TrackdAPI.o:TrackdAPI.c:(.text+0x7a): undefined reference to `_trackdGetMatrix'
TrackdAPI.o:TrackdAPI.c:(.text+0x12a): undefined reference to `_trackdGetButton'
TrackdAPI.o:TrackdAPI.c:(.text+0x148): undefined reference to `_trackdGetValuator'
TrackdAPI.o:TrackdAPI.c:(.text+0x15f): undefined reference to `_trackdGetNumberOfValuators'
TrackdAPI.o:TrackdAPI.c:(.text+0x19c): undefined reference to `_trackdInitTrackerReader'
TrackdAPI.o:TrackdAPI.c:(.text+0x1ac): undefined reference to `_trackdInitControllerReader'
collect2: ld returned 1 exit status

I've searched google for related problems, but they have not helped in this case
does anyone know what's going on here?
Looks to me like some linking problem, but I am not a C expert. I think however it is not jreality related (is the libtrackdAPI.a really there?), maybe you can ask someone who is experienced in compiling/linking C code...

Steffen.

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: CAVE setup problems

Post by Andre » Fri 9. Jul 2010, 17:28

I've added our jreality_cave_settings to jreality. When you update your jReality project you will find at the folder jreality_cave_settings an archive with the same name.

The script-files for our cave-setup are at /bin/ folder

if you try to use our scripts you probably have to change the 'BASE'-path at the jrSettings-script (/bin/jrSettings)

you should also toggle the following lines at /config/portal.left

Code: Select all

# screen.offset.x = 100
# screen.offset.y = 0

# screen.width = 1500
# screen.height = 1200
toggle the same lines at /config/portal.right and /config/portal.center
This is just a config for our cave, because we have beamers with 16:9 resolution, but our walls-size is 5:4

EDIT: I'm starting to improve the cave-setup-tutorial on monday

STRESS
Posts: 141
Joined: Mon 19. Jan 2009, 12:10

Re: CAVE setup problems

Post by STRESS » Wed 14. Jul 2010, 10:01

steffen wrote:
csm5125 wrote:Ok, I've run into another problem in compiling the trackd dll. I'm using Cygwin on top of Windows xp.

I have a directory with the following files:

TrackdApi.c (from the native folder)
TrackdAPI.o (compiled using: gcc -c -mno-cygwin -I /usr/include -I $JAVA_HOME/include/win32 -I . TrackdAPI.c)
de_jreality_devicedriver_TrackdJNI.h (created using javah)
trackdAPI.h (from mechdyne)
libtrackdAPI.a (from mechdyne)

I'm trying to compile using :
gcc -shared -mno-cygwin -Wl -o libJavaTrackdAPI.dll -I de_jreality_devicedriver_TrackdJNI.h TrackdAPI.o libtrackdAPI.a
(basically copied from the included build file)

which results in:
TrackdAPI.o:TrackdAPI.c:(.text+0xf): undefined reference to `_trackdGetNumberOfSensors'
TrackdAPI.o:TrackdAPI.c:(.text+0x26): undefined reference to `_trackdGetNumberOfButtons'
TrackdAPI.o:TrackdAPI.c:(.text+0x7a): undefined reference to `_trackdGetMatrix'
TrackdAPI.o:TrackdAPI.c:(.text+0x12a): undefined reference to `_trackdGetButton'
TrackdAPI.o:TrackdAPI.c:(.text+0x148): undefined reference to `_trackdGetValuator'
TrackdAPI.o:TrackdAPI.c:(.text+0x15f): undefined reference to `_trackdGetNumberOfValuators'
TrackdAPI.o:TrackdAPI.c:(.text+0x19c): undefined reference to `_trackdInitTrackerReader'
TrackdAPI.o:TrackdAPI.c:(.text+0x1ac): undefined reference to `_trackdInitControllerReader'
collect2: ld returned 1 exit status

I've searched google for related problems, but they have not helped in this case
does anyone know what's going on here?
Looks to me like some linking problem, but I am not a C expert. I think however it is not jreality related (is the libtrackdAPI.a really there?), maybe you can ask someone who is experienced in compiling/linking C code...

Steffen.
Yes that's a C linker problem. TrackdAPI has references that can not be resolved, that is either because a library is missing which this references are pointing, none of the library has actually any of these symbols (you can check that with ar) or a name mangling problem that you mix C++ with C. C++ usualy uses __ for name mangling while C uses _. Your GCC compile directive also looks a bit strange I think it should be
-llibTrackdApi (without the .a) if your library is in the same directory than the code otherwise you need -L to point to the directory where your library is located if it is not in /usr/lib or /usr/lib64

csm5125
Posts: 19
Joined: Tue 6. Jul 2010, 19:45

Re: CAVE setup problems

Post by csm5125 » Wed 14. Jul 2010, 16:50

I have it all taken care of now. Thanks for the help.

glickenstein
Posts: 10
Joined: Wed 30. Jun 2010, 22:03

Re: CAVE setup problems

Post by glickenstein » Wed 21. Jul 2010, 05:03

Here's an update from us and some more issues. We have managed to get ViewerVR running on all four screens and also get trackd working! Here are some issues we are still having:

1) The floor screen is not at the right level. Is there a configuration file that allows us to change its height independent of the other screens? I only see x and y offsets. Currently, the floor screen is rendering things about twice as large as they should be.

2) We have run the jreality tests for tracking the headset and the hand-held mechanism, and they seem to be reading all the right data. However, ViewerVR does not seem to be adjusting to it. When the head is moved, there is no change to the screens (and the little popup window says that head tracking is enabled), so there is distortion in the 3D view. Also, it does not adjust the movement to orientation of the hand mechanism (the joystick moving forward always moves in the absolute forward direction).

3) We have not been able to run IcosahedronVR or other basic programs (like Icosahedron), only ViewerVR seems to work. They show they are using the portal viewer, but nothing comes up (although all the screens are affected, so it is doing something). Should these work? We run with the following arguments:

-Djava.library.path=/home/vrco/geocam/workspace/jreality/jni/linux64
-Dde.jreality.scene.Viewer=de.jreality.portal.PortalServerViewer
-Dde.jreality.viewerapp.env=portal
-Dde.jreality.scene.tool.Config=portal
-Dde.smrj.clients="192.168.128.201 192.168.128.202 192.168.128.203 192.168.128.204"
-Dde.smrj.clients.port=4444

4) Where is the control for the speed of rotation. It is really fast and hard to control. We can control how fast you walk forward, but not how fast you rotate (with the joystick).

Thanks for all your help.

- Dave

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: CAVE setup problems

Post by Andre » Wed 21. Jul 2010, 09:22

to 1)
CONFIG={path-to-your-config-folder}
-Djreality.config='$CONFIG'/portal.$HOSTNAME

We are also using some config-files for our Cave-setup. You will find some examples at the zipped folder jreality_portal_settings/config/

to 2, 3 and 4)
try to use:

-Djava.library.path=/home/vrco/geocam/workspace/jreality/jni/linux64
-Dde.jreality.scene.Viewer=de.jreality.portal.PortalServerViewer
-Dde.jreality.viewerapp.env=portal-remote
-Dde.jreality.scene.tool.Config=portal-remote
-Dde.smrj.clients="192.168.128.201 192.168.128.202 192.168.128.203 192.168.128.204"
-Dde.smrj.clients.port=4444

the normal portal-toolconfig ist not up to date. I'm working on it...

to 4)
If the rotation is still to fast, after you have switched to the portal-remote-config, then you have to change some rotation settings at the tool-config files. At src-tool/de/jreality/toolsystem/config/chunks/portal-remote-config you should probably lower the 'gain-value' at "de.jreality.toolsystem.virtual.VirtualTimestepEvolution" or at "de.jreality.toolsystem.virtual.VirtualExtractAxis". But I,m not sure about that, maybe Steffen should confirm first.

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: CAVE setup problems

Post by steffen » Wed 21. Jul 2010, 16:06

to 1)
CONFIG={path-to-your-config-folder}
-Djreality.config='$CONFIG'/portal.$HOSTNAME
The config file is not the problem here - a floor is not yet supported. We need to adapt the class de.jreality.portal.PortalCoordinateSystem and make it more flexible. I'll do that right now and let you know when it works...

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: CAVE setup problems

Post by steffen » Wed 21. Jul 2010, 20:03

to 2, 3 and 4)
try to use:

-Djava.library.path=/home/vrco/geocam/workspace/jreality/jni/linux64
-Dde.jreality.scene.Viewer=de.jreality.portal.PortalServerViewer
-Dde.jreality.viewerapp.env=portal-remote
-Dde.jreality.scene.tool.Config=portal-remote
This is not a good idea, this is unfortunately not yet documented... One has to use MasterApplication for starting the app etc.

I have adapted the code to work with a screen on the floor - I'll check that in soon...

Now I am going to see if I can reproduce (and maybe fix) the problems with trackd.

Steffen.

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: CAVE setup problems

Post by steffen » Wed 21. Jul 2010, 23:57

1) The floor screen is not at the right level. Is there a configuration file that allows us to change its height independent of the other screens? I only see x and y offsets. Currently, the floor screen is rendering things about twice as large as they should be.
I have added support for a screen on the floor. See the folder cave-demo, there are demo.{left,right,center,floor} files. Run the startup script, and look into the script to see what to run in eclipse test this on a single machine. Note: I have changed the names of several configuration attributes that are used in the portal.* files. If you have modified your own config files, these need to be adapted to the new attribute names. (mostly screen has been renamed to frame - screen now denotes the cave walls)

About the rotation: in src-tool/de/jreality/toolsystem/config/chunks/{toolconfig-portal.xml,toolconfig-portal-remote.xml}, look at the end of both files. The last two virtualdevice sections of both files (they are identical) have a gain parameter, both should affect the rotation speed.
2) We have run the jreality tests for tracking the headset and the hand-held mechanism, and they seem to be reading all the right data. However, ViewerVR does not seem to be adjusting to it. When the head is moved, there is no change to the screens (and the little popup window says that head tracking is enabled), so there is distortion in the 3D view. Also, it does not adjust the movement to orientation of the hand mechanism (the joystick moving forward always moves in the absolute forward direction).
The forward direction does not depend on joystick orientation, so this is not a tracking issue (but we should enable that). Otherwise, all screens should be affected by head tracking. And there is also a stick in the scene that shows the joystick pointer.
We have not been able to run IcosahedronVR or other basic programs (like Icosahedron), only ViewerVR seems to work. They show they are using the portal viewer, but nothing comes up (although all the screens are affected, so it is doing something). Should these work?
Yes, all these apps should work. Is there any output on the clients?

Please look into the startup-portal file and try to run ViewerVR (and also IcosahedronVR etc.) as described there. I have just tested this in our portal, it works at least here. There you can also find how to use the "portal-remote" thing, that Andre has mentioned. If this does not work please post all output you find...

Good luck ;-)

Steffen.

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: CAVE setup problems

Post by steffen » Thu 22. Jul 2010, 00:13

I mean JRViewer -vr instead of ViewerVR. ViewerVR is deprecated (but it still works) - please check if JRViewer runs...

glickenstein
Posts: 10
Joined: Wed 30. Jun 2010, 22:03

Re: CAVE setup problems

Post by glickenstein » Thu 22. Jul 2010, 01:47

This is from my system administrator:
Definitely the floor display is looking perfect, and the head tracking is
definitely enabled now (and I can disable/enable it with the panel). The
only problem is that the system thinks our wand is the head and vice versa.
I looked around briefly for a config file to switch those 2 tracking
sensors, but didn't see anything before I had to quit testing for the
evening.

Both the new JRViewer and the deprecated ViewerVR work with the multiple
displays, but I have not had a chance yet to try the Cube and Icosahedron
examples.
Thanks!

- Dave

glickenstein
Posts: 10
Joined: Wed 30. Jun 2010, 22:03

Re: CAVE setup problems

Post by glickenstein » Thu 22. Jul 2010, 05:52

Update: Managed to switch the head and wand. From the system administrator:
So the head tracking works great and I am seeing the wand pointer that Steffen described in his message. Looks great!

I also was able to run the Cube05 demo just fine on all 4 screens. The head tracking works as expected and the wand can manipulate the cube. Button 0 supports rotation of the cube and Button 1 supports translation.

Looking very nice!
Hopefully we'll have some of our own stuff up and running in a week or two! Thanks again for your help.

- Dave

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: CAVE setup problems

Post by Andre » Thu 22. Jul 2010, 09:45

glickenstein wrote:This is from my system administrator:
Definitely the floor display is looking perfect, and the head tracking is
definitely enabled now (and I can disable/enable it with the panel). The
only problem is that the system thinks our wand is the head and vice versa.
I looked around briefly for a config file to switch those 2 tracking
sensors, but didn't see anything before I had to quit testing for the
evening.

Both the new JRViewer and the deprecated ViewerVR work with the multiple
displays, but I have not had a chance yet to try the Cube and Icosahedron
examples.
Thanks!

- Dave

For the direction-mix you have to change the toolconfig-settings. Depending on the tool-config-file you are now using you have to change the sign at X- axsis:

<virtualdevice type="de.jreality.toolsystem.virtual.VirtualMergedNDC">
<inputslot>PrimaryNavigationNDC_X</inputslot>
<inputslot>PrimaryNavigationNDC_Y</inputslot>
<outputslot>PrimaryNavigationNDC</outputslot>
<prop name="factorX">
<double>1</double> -> -1
</prop>
<prop name="factorY">
<double>-1</double>
</prop>
</virtualdevice>

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: CAVE setup problems

Post by steffen » Thu 22. Jul 2010, 12:13

Update: Managed to switch the head and wand. From the system administrator:
The right way to switch that is to edit the file src-tool/de/jreality/toolsystem/config/chunks/toolconfig-portal-trackd.xml
So the head tracking works great and I am seeing the wand pointer
...
Looking very nice!
Great! I'd love to see jreality running with a floor. What is the screen size of the floor, is it quadratic?

Btw: Did you compile the trackd lib for 64bit? We are still using a 32bit version of it (when I compiled that there was no 64bit API available...)

Steffen.

marvinl
Posts: 1
Joined: Thu 22. Jul 2010, 17:11

Re: CAVE setup problems

Post by marvinl » Thu 22. Jul 2010, 17:30

Hi, I'm Marvin and I'm the system administrator of the CAVE system that David is using. I just thought I would go ahead and register and avoid having to relay messages through David.
steffen wrote:The right way to switch that is to edit the file src-tool/de/jreality/toolsystem/config/chunks/toolconfig-portal-trackd.xml
Yes, that is exactly what I did.
steffen wrote:Great! I'd love to see jreality running with a floor. What is the screen size of the floor, is it quadratic?
All of our displays, including the floor, are 10 ft x 8 ft.
steffen wrote:Btw: Did you compile the trackd lib for 64bit? We are still using a 32bit version of it (when I compiled that there was no 64bit API available...)
Yes, Mechdyne now includes a lib64 directory with hpux, irix, linux_ia64, linux_x86_64, sun, and win_vc8 in their trackdAPI, so I did compile for 64-bit (linux_x86_64).

Marvin

Post Reply