Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
H3D.org Feeds

Forum Index


Board index » All Posts (ymajeed)




Re: Using Leap Motion with H3D
#1
Not too shy to talk
Not too shy to talk


Thanks for the suggestions, hao.

I tried a few things and eventually just gave up on using the UDP channel altogether. I incorporated grabbing the leap data into the main protocol (python script node in H3D). I also upgraded the display adapter driver and turned off all funky anti-aliasing stuff. This seems to have reduced the problem but did not eliminate it.

you mentioned checking the fps, is there a way to do that within the python/H3D environment? I'm not sure how I would go about monitoring fps in this case.

Posted on: 2018/8/16 22:19
Top


Using Leap Motion with H3D
#2
Not too shy to talk
Not too shy to talk


Hello,

I'm trying to make the Leap Motion work with H3D in linux (which is surprisingly much harder to do than in windows). I got it to mostly work using the Leap python documentation and it can now communicate cursor positions with H3D.

The issue I'm facing is with flickering in the leap cursor (represented as a sphere in the scene) and some delay when moving my hand quickly in the environment above the leap. The leap-provided diagnostics screen shows no lag, but for some reason there is some in H3D.

The way I set it up might be to blame, or it could be that in combination with the difference in the leap and H3D frequencies (If I understand correctly, H3D updates the scene at 60Hz +- 4Hz and the leap runs at anywhere between 100-120Hz). The message from the leap is read in the python script associated with the x3d file by listening to a UDP channel message.

Another observation I made is that the flickering seems worse when the objects in the scene interact (example: the leap sphere is going inside a semi-transparent spherical target). I should mention that the robot sphere in the same scene does not exhibit any of these issues (Using --deviceinfo argument for that).

I attached the code files I'm using. The first file to run is Controller_leap.py in the calibration folder.

Edit: Fixed statement about robot, using --deviceinfo, not HDEV

Attach file:


Link only for registered users

Posted on: 2018/7/12 22:38
Top


Re: Running H3D window on second screen
#3
Not too shy to talk
Not too shy to talk


Reporting on the solution for this (not perfect, but a good fix for my needs)

When calling H3D, I'm now running it as a bash script with H3DLoad calling the x3d visual scene file. I'm using the --deviceinfo argument to specify my robot, and -f for full screen. I'm running the bash script from a terminal that I had moved to the second monitor, and that seems to do the trick.

Posted on: 2018/7/12 22:24
Top


Re: Running H3D window on second screen
#4
Not too shy to talk
Not too shy to talk


I have the latest trunk compiled on Linux, I can take a crack at it. Can you point me to where this is implemented in H3DViewer?

Posted on: 2018/5/23 19:53
Top


Running H3D window on second screen
#5
Not too shy to talk
Not too shy to talk


Hello,

I am trying to run an H3D process on my second screen under Ubuntu. Previously, I was using python to handle this in Windows through the win32process library. This library does not exist under Linux, and the subprocess library in python doesn't seem to have this functionality, at least not under Linux.

Basically, what I need is for H3D to always run in fullscreen on my second monitor when it's called.

In my x3d file, I currently have:
<H3DWindowNode fullscreen='1' />


This gets called in python through:
subprocess.Popen(['H3DLoad'process_name], stdout=PIPEstderr=PIPE)

where process_name is the path to the x3d file.

From my understanding of the H3DWindowNode documentation, there doesn't seem to be an option to 'select a screen' or to set the pixel position of one of the window corners, unless it's a field/option I'm not seeing. What is the way to achieve this under Linux?

Thanks,
-Yaz

Posted on: 2018/5/20 20:16
Top


Re: Adding a custom force node to H3D
#6
Not too shy to talk
Not too shy to talk


Thanks for the clarification, it does make sense.

So here's what I changed: Since the ForceNV files in HAPI calculate damping as a 3D vector, I changed damping from SFFloat to SFVec3f in H3DAPI, and changed the initFields entry from
setValue(0)
to
setValue(Vec3f(0,0,0))
then changed the
Vec3(1,1,1)*damping
back to simply
damping


I recompiled and it compiles correctly. I think this avoids having to tweak the values in Vec3(1,1,1) to suit a specific condition by getting the damping value as a Vec3 directly.

Is my logic correct here? Please let me know if there are any logical steps I'm missing here.

-Yaz

Posted on: 2018/3/16 22:01
Top


Re: Adding a custom force node to H3D
#7
Not too shy to talk
Not too shy to talk


Thank you very much Markus!

It compiled perfectly. Sorry it took me some time but I finally looked through the differences in the code. Besides the variable naming issues (which it seems were confusing the field names and even the H3D database), it seems the significant change was to the damping input.

I only know basics in C++ and had no idea about the Vec3(1,1,1)*damping->getValue() trick. It makes perfect sense now, but my previous understanding was that it gets the value even if it was Vec3 and I didn't need to tell it explicitly in the get command.

Next step is incorporating it into my protocol, hopefully the robot doesn't end up punching me!

Thanks again,
-Yaz

Posted on: 2018/3/15 22:12
Top


Adding a custom force node to H3D
#8
Not too shy to talk
Not too shy to talk


Hello,

I'm trying to add a new node to H3D. I had issues getting H3D and Visual Studio 2017 to recognize and begin compiling the files, but was able to resolve them with much appreciated help from Markus on this forum.

Now that Visual Studio is compiling my code, I managed to fix some bugs and get HAPI to compile successfully. H3DAPI is, however, another story. I keep getting errors with the constructor in both the cpp file and the header file. At Markus' request, I'm attaching the four files (HAPI and H3DAPI, header and cpp files) here.

What I ultimately need is a custom force that behaves as a sigmoid, providing negative viscosity (F proportional to -v) up to a force cap, and transitioning smoothly to the cap. HAPI is okay with the force calculations (at least at the compiling stage), so I don't think the problem is the forces.

Thank you,
-Yaz

Attach file:


Link only for registered users

Posted on: 2018/2/26 8:07
Top


Re: Recompiling H3D API in Windows 10 "timespec" error
#9
Not too shy to talk
Not too shy to talk


Thank you Markus, the instructions worked perfectly.

I deleted the new files from the project, changed the include statement to H3D/X.h and added them to the project again. Now the compiler sees all the files.

HAPI compiled successfully, had a few errors at first that I fixed without much trouble. H3DAPI is not compiling at all though.

I don't know if this forum/thread is the appropriate place to ask about this, since it is related to the node I'm adding to H3D. The first error (sorted by line, the way I usually debug) states that one of my node elements is not a member of H3D::[Node name]. I thought the code in the header file will define that node and its members, but it seems I'm missing something.

Posted on: 2018/2/21 6:25
Top


Re: Recompiling H3D API in Windows 10 "timespec" error
#10
Not too shy to talk
Not too shy to talk


Hello Markus,

Thank you! Adding the files to the existing solution in visual studio worked. Now the project is seeing (most) files and compiling at least. There are few issues with my code but those are not related to the compilation.

I have a small issue that popped up with two of the header files I wrote. The files are part of the H3DAPI project. The cpp files are seen and are compiling, but the first line is returning an error saying it cannot find the associated header files. the line in the cpp file is written as:

#include <X.h>


I also tried:
#include <H3D/X.h>

#include <H3DAPI/X.h>

and, trying to follow the folder structure, I tired:
#include <H3DAPI/H3D/X.h>


for some reason it still cannot find the header files. Am I missing something here? Should I just move the two offending header files (both of which I wrote) to the same folder as the cpp files under H3DAPI?

Best,
-Yaz

Posted on: 2018/2/2 23:32
Top



TopTop
(1) 2 »






(C) 2012 SenseGraphics AB    ---    Powered by XOOPS