alvinsunyixiao / vrpn_mocap

MIT License
11 stars 7 forks source link

Update Frequency fixed at 60Hz #10

Open Joao-G-Martins opened 3 months ago

Joao-G-Martins commented 3 months ago

Hello!

Congratulations on implementing the vrpn client for ros2. I was able to get it working with our system, but the update frequency was stuck at 60Hz, even with the camera refresh rate being at 360Hz or changing the value of the update_freq parameter.

I checked the code and didn't find the reason why it is happening, since a timer use this parameter. Do you have any clue what might be the problem? Have you faced this issue before?

alvinsunyixiao commented 3 months ago

Could it be that your motion capture device is running at 60Hz? The update_freq param determines how fast a VRPN tracker calls it's main loop function. However, it may not trigger a pose publisher every time the main loop gets called. For example, if your motion capture device runs at 60Hz, even if you have update_freq set to 200Hz, the actual publishing frequency is still approximately 60Hz.

aditya-penumarti commented 3 months ago

I have a similar problem. Setting the cameras to 120Hz and setting the update_freq to 100Hz does not translate to the nodes. They still run at 60Hz. I'm using an Optitrack Setup with the motive software.

Joao-G-Martins commented 3 months ago

Could it be that your motion capture device is running at 60Hz? The update_freq param determines how fast a VRPN tracker calls it's main loop function. However, it may not trigger a pose publisher every time the main loop gets called. For example, if your motion capture device runs at 60Hz, even if you have update_freq set to 200Hz, the actual publishing frequency is still approximately 60Hz.

@alvinsunyixiao no. I even changed the camera's output rate and there wasn't any change in the output rate, it was always at 60Hz.