Hermes SDK Documentation
|
Classes | |
class | HermesSDK::CareTaker |
struct | HermesSDK::ErrorMessage |
class | HermesSDK::Hive |
Typedefs | |
typedef std::function< void(const Hermes::Protocol::Devices &_devices)> | HermesSDK::deviceDataCallback |
Typedef to support callback for device data. | |
typedef std::function< void(const Hermes::Protocol::Hardware::DeviceLandscape &_landscape)> | HermesSDK::deviceLandscapeCallback |
Typedef to support callback for landscape (connected devices) data. | |
typedef std::function< void(const Hermes::Protocol::Polygon::Data &_data)> | HermesSDK::polygonDataCallback |
Typedef to support callback for Polygon data. | |
typedef std::function< void(const Hermes::Protocol::TrackerData &_data)> | HermesSDK::trackingDataCallback |
Typedef to support callback for tracking data. | |
typedef std::function< void(Hermes::Protocol::Pipeline &_pipeline)> | HermesSDK::filterSetupCallback |
Typedef to support callback for filter pipeline data. | |
typedef std::function< void(const ErrorMessage &msg)> | HermesSDK::errorMessageCallback |
Typedef to support callback for error messages. | |
typedef std::function< void(void)> | HermesSDK::connectedToCoreCallback |
Typedef to support callback on connect to manus core. | |
typedef std::function< void(void)> | HermesSDK::disconnectedFromCoreCallback |
Typedef to support callback on disconnect from manus core. | |
typedef std::function< void(Hermes::Protocol::HiveNode _node)> | HermesSDK::hiveNodeCallback |
|
strong |
We have two types of errorcode (maybe more in the FUTURE) hard errors that will break the system and need to be addressed immediately soft errors that wont break the system
bool HermesSDK::AddOrUpdatePolygonSkeleton | ( | Hermes::Protocol::Polygon::Skeleton | _skeleton | ) |
Adds or updates the given Polygon skeleton in Hermes.
_skeleton | The Skeleton to add or update in Hermes. |
bool HermesSDK::AddTargetSkeleton | ( | Hermes::Protocol::Polygon::TargetSkeleton & | _Skeleton | ) |
Add a target skeleton that can be used for the retargeting (ie. an animated skeleton).
_Skeleton | the skeleton (should be in T-Pose). |
bool HermesSDK::CheckIfPolygonVersionIsCompatible | ( | Hermes::Protocol::Polygon::Version | _Version | ) |
Checks if the version of the SDK matches the version of Hermes.
_Version | the current version of the SDK. |
void HermesSDK::ConnectLocal | ( | const std::string & | _clientName, |
const std::string & | _clientInfo, | ||
HermesSDK::filterSetupCallback & | _onFilterSetup, | ||
HermesSDK::deviceDataCallback & | _onDeviceData, | ||
HermesSDK::deviceLandscapeCallback & | _onDeviceLandscape, | ||
HermesSDK::polygonDataCallback & | _onPolygonData, | ||
HermesSDK::trackingDataCallback & | _onTrackingData, | ||
HermesSDK::errorMessageCallback & | _onError, | ||
HermesSDK::connectedToCoreCallback & | _onConnectedToCore, | ||
HermesSDK::disconnectedFromCoreCallback & | _onDisconnectedFromCore | ||
) |
Connect to a Hermes host running on this local pc.
_clientName | The client name that will be advertised to the Hermes host. |
_clientInfo | The client description that will be advertised to the Hermes host. |
_onFilterSetup | Callback that will be called when setting up the filters. |
_onDeviceData | Callback that will be called when devicedata is available. |
_onDeviceLandscape | Callback that will be called when landscape (connected devices) data is available. |
_onPolygonData | Callback that will be called when Polygon data is available. |
_onTrackingData | Callback that will be called when tracking data is available. |
_onError | Callback that will be called when there is an error encountered. |
_onConnectedToCore | Callback that will be called when the sdk is connected to core. |
_onDisconnectedFromCore | Callback that will be called when the sdk is disconnected from core. |
void HermesSDK::ConnectNetworkAddress | ( | const std::string & | _clientName, |
const std::string & | _clientInfo, | ||
const std::string & | _address, | ||
HermesSDK::filterSetupCallback & | _onFilterSetup, | ||
HermesSDK::deviceDataCallback & | _onDeviceData, | ||
HermesSDK::deviceLandscapeCallback & | _onDeviceLandscape, | ||
HermesSDK::polygonDataCallback & | _onPolygonData, | ||
HermesSDK::trackingDataCallback & | _onTrackingData, | ||
HermesSDK::errorMessageCallback & | _onError, | ||
HermesSDK::connectedToCoreCallback & | _onConnectedToCore, | ||
HermesSDK::disconnectedFromCoreCallback & | _onDisconnectedFromCore | ||
) |
Connect to a Hermes host running on the network by address.
_clientName | The client name that will be advertised to the Hermes host. |
_clientInfo | The client description that will be advertised to the Hermes host. |
_adddress | The address of the host you are connecting to. |
_onFilterSetup | Callback that will be called when setting up the filters. |
_onDeviceData | Callback that will be called when devicedata is available. |
_onDeviceLandscape | Callback that will be called when landscape (connected devices) data is available. |
_onPolygonData | Callback that will be called when Polygon data is available. |
_onTrackingData | Callback that will be called when tracking data is available. |
_onError | Callback that will be called when there is an error encountered. |
_onConnectedToCore | Callback that will be called when the sdk is connected to core. |
_onDisconnectedFromCore | Callback that will be called when the sdk is disconnected from core. |
void HermesSDK::ConnectNetworkHostName | ( | const std::string & | _clientName, |
const std::string & | _clientInfo, | ||
const std::string & | _hostName, | ||
HermesSDK::filterSetupCallback & | _onFilterSetup, | ||
HermesSDK::deviceDataCallback & | _onDeviceData, | ||
HermesSDK::deviceLandscapeCallback & | _onDeviceLandscape, | ||
HermesSDK::polygonDataCallback & | _onPolygonData, | ||
HermesSDK::trackingDataCallback & | _onTrackingData, | ||
HermesSDK::errorMessageCallback & | _onError, | ||
HermesSDK::connectedToCoreCallback & | _onConnectedToCore, | ||
HermesSDK::disconnectedFromCoreCallback & | _onDisconnectedFromCore | ||
) |
Connect to a Hermes host running on the network by hostname.
_clientName | The client name that will be advertised to the Hermes host. |
_clientInfo | The client description that will be advertised to the Hermes host. |
_hostname | The hostname of the host you are connecting to. |
_onFilterSetup | Callback that will be called when setting up the filters. |
_onDeviceData | Callback that will be called when devicedata is available. |
_onDeviceLandscape | Callback that will be called when landscape (connected devices) data is available. |
_onPolygonData | Callback that will be called when Polygon data is available. |
_onTrackingData | Callback that will be called when tracking data is available. |
_onError | Callback that will be called when there is an error encountered. |
_onConnectedToCore | Callback that will be called when the sdk is connected to core. |
_onDisconnectedFromCore | Callback that will be called when the sdk is disconnected from core. |
void HermesSDK::FindNetworkHosts | ( | HermesSDK::filterSetupCallback & | _onFilterSetup, |
HermesSDK::deviceDataCallback & | _onDeviceData, | ||
HermesSDK::deviceLandscapeCallback & | _onDeviceLandscape, | ||
HermesSDK::polygonDataCallback & | _onPolygonData, | ||
HermesSDK::trackingDataCallback & | _onTrackingData, | ||
HermesSDK::errorMessageCallback & | _onError, | ||
HermesSDK::connectedToCoreCallback & | _onConnectedToCore, | ||
HermesSDK::disconnectedFromCoreCallback & | _onDisconnectedFromCore | ||
) |
find hermes hosts connected to the network (please check your firewall to not block anything)
_onFilterSetup | Callback that will be called when setting up the filters |
_onDeviceData | Callback that will be called when devicedata is available |
_onDeviceLandscape | Callback that will be called when landscape (connected devices) data is available |
_onPolygonData | Callback that will be called when Polygon data is available. |
_onTrackingData | Callback that will be called when tracking data is available. |
_onError | Callback that will be called when there is an error encountered |
_onConnectedToCore | Callback that will be called when the sdk is connected to core. |
_onDisconnectedFromCore | Callback that will be called when the sdk is disconnected from core. |
Hermes::Protocol::Pipeline * HermesSDK::GetActivePipeline | ( | ) |
Gets the currently active filter pipeline.
bool HermesSDK::GetAllUsers | ( | Hermes::Protocol::UserCollection & | _userCollection | ) |
Gets all the users as defined in the Manus Dashboard.
_userCollection | Collection of users to fill with all existing users. |
bool HermesSDK::GetFilterInventory | ( | Hermes::Protocol::FilterInventory & | _inventory | ) |
Gets the list of available filters to apply. This is the list of filters currently available to Hermes, filled in to the provided inventory. From here you can add them to your filter pipeline by name.
_inventory | Inventory to fill with all available filters |
std::map< std::string, std::string > HermesSDK::GetFoundHosts | ( | ) |
Get the hosts that are found after a FindNetworkHosts() call
LeafInfo HermesSDK::GetLeafInfo | ( | Hermes::Protocol::Hardware::DeviceLeaf & | leaf | ) |
Support function to get a generalized LeafInfo of the leaf. to prevent having to check which type of leaf it is, if you just want its basic info like battery percentage, name, etc etc. (see LeafInfo for more details) The Leaf represents a type of glove, like the PrimeOne, PrimeTwo, Haptics or Appololegacy.
DeviceLeaf | ref that we want to generalize |
void HermesSDK::GetSdkAndCoreVersion | ( | Hermes::Protocol::Version & | _sdkVersion, |
Hermes::Protocol::Version & | _coreVersion | ||
) |
Get the version number of the SDK and Core.
_sdkVersion | The version number of the SDK. |
_sdkVersion | The version number of Core. |
bool HermesSDK::IsRunning | ( | ) |
bool HermesSDK::RemovePolygonSkeleton | ( | Hermes::Protocol::Polygon::RemoveSkeletonArgs | _Args | ) |
Remove skeleton with the given ID in Hermes.
_Args | The skeleton ID that has to be removed. |
bool HermesSDK::RemoveTargetSkeleton | ( | std::string & | _Name | ) |
Remove a target skeleton.
_Name | the name of the skeleton that should be removed. |
bool HermesSDK::SetPipeline | ( | Hermes::Protocol::Pipeline * | _pipeline | ) |
Sets the currently active pipeline.
_pipeline | Pointer to a Pipeline object to commit. |
bool HermesSDK::SetSkeletonSettings | ( | Hermes::Protocol::Polygon::Retargeting::SettingsArgs & | _Args | ) |
Set the retargeting settings of a specific skeleton.
_Args | the retarget settings the skeleton should use. |
bool HermesSDK::SetSkeletonTarget | ( | Hermes::Protocol::Polygon::SetTargetArgs & | _Args | ) |
Set the target of a specific skeleton. This can either be the body estimation of a user or a target skeleton
_Args | the target which the skeleton should retarget on. |
void HermesSDK::Stop | ( | ) |
Stops the SDK (Caretaker and Hive) Joins all threads, then logs out of its session with Hermes.
void HermesSDK::UpdateTargetSkeleton | ( | Hermes::Protocol::Polygon::TargetSkeleton & | _Skeleton | ) |
Update a target skeleton pose.
_Skeleton | the target skeleton. |
bool HermesSDK::UpdateTrackers | ( | const Hermes::Protocol::TrackerData & | _trackerData | ) |
Send tracker data from the client to Hermes. This allows clients to add their own custom trackers and use them in Hermes. It can also be used to create a "fake" tracker for testing, when no hardware is available
_trackerData | The trackerdata to send to Hermes. |
bool HermesSDK::VibrateFingers | ( | uint32_t | _dongleId, |
Hermes::Protocol::HandType | _handType, | ||
const std::array< float, 5 > & | _powers | ||
) |
Sends haptic data to the specified haptics module Internally, this opens a socket (if one is not open already) to communicate with Hermes for extra responsiveness.
_dongleId | The id of the haptics dongle to send the data to. |
_handType | Left, right, or unknown (which will send data to both hands) |
_powers | An array of 5 floats [0.0, 1.0], thumb to pinky, with the strength of vibration for each actuator |
bool HermesSDK::VibrateWrist | ( | uint32_t | _deviceId, |
float | _unitStrength, | ||
uint16_t | _durationInMilliseconds | ||
) |
Sends a rumble command to the specified glove. Note that this is the wrist actuator - Prime Haptics modules use a different interface for more precise feedback.
_deviceId | The device id of the glove to rumble |
_unitStrength | Strength of the rumble, from 0.0 to 1.0 |
_durationInMilliseconds | Duration to rumble the glove for |