I meet a problem in the example operation of using haptic device interaction, such as Example- PBDThinTissueContact. When running, the command line shows that the device is initialized successfully, but when operating the haptic device, the virtual tool in the scene does not respond, and the haptic device does not have corresponding haptic feedback. However,as you press the space bar once, the Thin Tissue and tool in the scene will respond once.
Is it because the performance of my laptop is so poor that the rendering speed is too slow?
Possibly performance. But also maybe just snapping to origin/zero. If you hit p it should display physics and visual update rates.
Also PbdThinTissueContact example has no haptic response. Only movement with the phantom omni.
You can also checkout VirtualCoupling example and SDFHaptics example which should both be very easy to compute. PbdTissueContact (tetrahedral, not thin tissue) example has haptics.
I don’t understand why it takes up so much CPU resources. The seventh generation i7 processor of my laptop can’t guarantee its normal operation at all.
The Example-VirtualCoupling’s scene is no response as Example- PBDThinTissueContact,but Example-SDFHaptics is running well.
It should be using your entire CPU. It’s running as fast as possible, without any throttle. You could add a sleep if you’d like. Or do other things sequentially/inbetween the scene updates.
If you hit space you can start the simulation (SDF haptics is the only one that starts automatically). If you hit p it should show “physics update rate” and “visual update rate” which would be very informative in how it is performing on your device (let it run for a few seconds as the visual framerate starts off high and averages down after a handful of frames).
Also FYI, I am on a 3.5Ghz 4 core i5-6600k.
Thanks very much,I have understanded that the key space can start the simulation.However,my laptop with 2.8GHz 4 core i7-7700HQ still can’t run the scene smoothly.
You can try changing SimulationManager::setDesiredDt to a larger value. This changes the amount of physics updates vs visual it is doing.
You should only need 1000hz (lower is doable too) on physics for good haptics.