You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DeviceLock lock = device->lock();
device->currentConfiguration(q, lock.data());
device->computeForwardKinematics(lock, lock.data());
joint->jacobian(lock.data());
lock.release(); // Or destroy the object to release
or
DeviceDataLock deviceData = device->acquireData();
deviceData->currentConfiguration(q);
deviceData->computeForwardKinematics();
joint->jacobian(deviceData);
deviceData.release(); // Or destroy the object to release
The first is more interesting as it gives to users the opportunity to handle tread management by themselves.
device->lock() is blocking only if all the internal Data are already locked. This should have very little impact on the single-thread case as the same data will be acquired. On multi-threaded cases, it may happen that we re-compute the kinematics for the same configuration if two different data are returned.
The text was updated successfully, but these errors were encountered:
As of now, HPP can only be used with a single thread. Here are some thoughts to add thread safety.
Inside hpp-pinocchio
Except for class Device, which will handle all the thread safety work, I think there is relatively little work to be done.
compute (..., se3::Data)
. Access to result can be done with data.Packages that depends on hpp-pinocchio
The impact on dependent packages should also not be very important. Something like replacing:
into
or
The first is more interesting as it gives to users the opportunity to handle tread management by themselves.
device->lock()
is blocking only if all the internal Data are already locked. This should have very little impact on the single-thread case as the same data will be acquired. On multi-threaded cases, it may happen that we re-compute the kinematics for the same configuration if two different data are returned.The text was updated successfully, but these errors were encountered: