Hi,
If I define 2 rigid bodies with the same name and different ids is it possible to be pass these on to the vrpn client?
This would come very handy because the vrpn_TRACKERCB structure contains a member called "sensor" which I guess should contain the number of the sensor of which the data is sent from.
Data from the rigid body toolkit however always has sensor number 0.
Is it possible to configure the rigid body toolkit to send the id information over VRPN? If not would it be possible for you to add that information?
Many thank,
Bernhard
Rigid Body ID as VRPN Sensor ID?
Re: Rigid Body ID as VRPN Sensor ID?
Hi Bernhard,
Rigid Bodies are identified by their name over VRPN. I will take a look and see where the ID is in the sensor structure.
D
Rigid Bodies are identified by their name over VRPN. I will take a look and see where the ID is in the sensor structure.
D
Re: Rigid Body ID as VRPN Sensor ID?
I would also be interested in knowing how to register a single change handler for multiple trackers and getting the name or ID of it. Also, is there good API documentation for VRPN anywhere? The VRPN website isn't too helpful. Thanks.
Re: Rigid Body ID as VRPN Sensor ID?
I believe when you register the callback handler, the first parameter in register_change_handler is 'user data'. So you can use that parameter to pass any information or reference specific to that rigid body. When the callback triggers it gives that user data back to you so you can do what you need to do with it.
This user data could be as simple as an index of what rigid body. So you could register the same callback for multiple rigid bodies and pass '1', '2', '3', etc... for the user data, and then this way you would know which callbacks were for which rigid bodies. If you needed more than a single user data value, you could pass a pointer to a more complicated structure as your 'user data' and store multiple parameters.
The VRPN site has plenty to get you going. Another good resource is the mailing list. Once on the mailing list you can ask the active VRPN community of which I am a member.
This user data could be as simple as an index of what rigid body. So you could register the same callback for multiple rigid bodies and pass '1', '2', '3', etc... for the user data, and then this way you would know which callbacks were for which rigid bodies. If you needed more than a single user data value, you could pass a pointer to a more complicated structure as your 'user data' and store multiple parameters.
The VRPN site has plenty to get you going. Another good resource is the mailing list. Once on the mailing list you can ask the active VRPN community of which I am a member.