Hermes SDK Documentation
Classes | Typedefs | Enumerations | Functions
HermesSDK

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
 

Enumerations

enum  HermesSDK::ErrorCodes : int {
  HermesSDK::ErrorCodes::failed_hard_login_could_not_connect, HermesSDK::ErrorCodes::failed_hard_logout_status, HermesSDK::ErrorCodes::failed_hard_get_filter_inventory, HermesSDK::ErrorCodes::failed_hard_to_get_active_pipeline,
  HermesSDK::ErrorCodes::failed_hard_to_set_currently_active_pipeline, HermesSDK::ErrorCodes::failed_hard_connect_to_data_publisher, HermesSDK::ErrorCodes::failed_hard_connect_to_landscape_publisher, HermesSDK::ErrorCodes::failed_hard_connect_to_polygon_publisher,
  HermesSDK::ErrorCodes::failed_hard_connect_to_tracking_data_publisher, HermesSDK::ErrorCodes::error_generic, HermesSDK::ErrorCodes::failed_soft_rumble, HermesSDK::ErrorCodes::failed_soft_sending_message_through_haptics_socket,
  HermesSDK::ErrorCodes::failed_soft_heartbeat_to_get_time, HermesSDK::ErrorCodes::failed_soft_heartbeat_status, HermesSDK::ErrorCodes::failed_soft_to_parse_wrapped_devices, HermesSDK::ErrorCodes::failed_soft_to_parse_wrapped_polygon,
  HermesSDK::ErrorCodes::failed_soft_to_parse_wrapped_tracking_data, HermesSDK::ErrorCodes::failed_soft_get_all_players, HermesSDK::ErrorCodes::failed_soft_update_trackers, HermesSDK::ErrorCodes::failed_soft_add_polygon_skeleton,
  HermesSDK::ErrorCodes::failed_soft_remove_polygon_skeleton, HermesSDK::ErrorCodes::failed_soft_set_polygon_skeleton_target, HermesSDK::ErrorCodes::failed_soft_set_polygon_retargeting_settings, HermesSDK::ErrorCodes::failed_soft_add_target_skeleton,
  HermesSDK::ErrorCodes::failed_soft_remove_target_skeleton, HermesSDK::ErrorCodes::failed_soft_update_target_skeleton, HermesSDK::ErrorCodes::failed_soft_check_polygon_version
}
 

Functions

void HermesSDK::GetSdkAndCoreVersion (Hermes::Protocol::Version &_sdkVersion, Hermes::Protocol::Version &_coreVersion)
 
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)
 
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)
 
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)
 
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)
 
bool HermesSDK::VibrateWrist (uint32_t _deviceId, float _unitStrength, uint16_t _durationInMilliseconds)
 
bool HermesSDK::VibrateFingers (uint32_t _dongleId, Hermes::Protocol::HandType _handType, const std::array< float, 5 > &_powers)
 
void HermesSDK::Stop ()
 
bool HermesSDK::IsRunning ()
 
bool HermesSDK::GetFilterInventory (Hermes::Protocol::FilterInventory &_inventory)
 
Hermes::Protocol::PipelineHermesSDK::GetActivePipeline ()
 
bool HermesSDK::SetPipeline (Hermes::Protocol::Pipeline *_pipeline)
 
std::map< std::string, std::string > HermesSDK::GetFoundHosts ()
 
LeafInfo HermesSDK::GetLeafInfo (Hermes::Protocol::Hardware::DeviceLeaf &leaf)
 
bool HermesSDK::GetAllUsers (Hermes::Protocol::UserCollection &_userCollection)
 
bool HermesSDK::UpdateTrackers (const Hermes::Protocol::TrackerData &_trackerData)
 
bool HermesSDK::AddOrUpdatePolygonSkeleton (Hermes::Protocol::Polygon::Skeleton _skeleton)
 
bool HermesSDK::RemovePolygonSkeleton (Hermes::Protocol::Polygon::RemoveSkeletonArgs _Args)
 
bool HermesSDK::SetSkeletonTarget (Hermes::Protocol::Polygon::SetTargetArgs &_Args)
 
bool HermesSDK::SetSkeletonSettings (Hermes::Protocol::Polygon::Retargeting::SettingsArgs &_Args)
 
bool HermesSDK::AddTargetSkeleton (Hermes::Protocol::Polygon::TargetSkeleton &_Skeleton)
 
bool HermesSDK::RemoveTargetSkeleton (std::string &_Name)
 
void HermesSDK::UpdateTargetSkeleton (Hermes::Protocol::Polygon::TargetSkeleton &_Skeleton)
 
bool HermesSDK::CheckIfPolygonVersionIsCompatible (Hermes::Protocol::Polygon::Version _Version)
 

Detailed Description

Enumeration Type Documentation

◆ ErrorCodes

enum HermesSDK::ErrorCodes : int
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

Enumerator
failed_hard_login_could_not_connect 

Could not connect during login, check network settings.

failed_hard_logout_status 

Could not log out.

failed_hard_get_filter_inventory 

Failed to get list of filters. Is system installed correctly?

failed_hard_to_get_active_pipeline 

Failed to get active pipeline. Is system set up correctly?

failed_hard_to_set_currently_active_pipeline 

Failed to set currently active pipeline.

failed_hard_connect_to_data_publisher 

Failed communication with data publisher. Failing device connection?

failed_hard_connect_to_landscape_publisher 

Failed communication with landscape publisher. Failing device connection?

failed_hard_connect_to_polygon_publisher 

Failed communication with Polygon publisher. Failing device connection?

failed_hard_connect_to_tracking_data_publisher 

Failed communication with tracking data publisher. Failing device connection?

error_generic 

For self generated errors that are not defined by this list. Normally a string will accompany this error for clarification.

failed_soft_rumble 

Failed to process rumble command.

failed_soft_sending_message_through_haptics_socket 

Haptics communication failure.

failed_soft_heartbeat_to_get_time 

Couldn't parse the time from the heartbeat (usually means we are missing a heartbeat).

failed_soft_heartbeat_status 

Missing heartbeat. After a few misses we can consider the device dead/MIA.

failed_soft_to_parse_wrapped_devices 

Could not parse data from wrapped devices.

failed_soft_to_parse_wrapped_polygon 

Could not parse wrapped Polygon data.

failed_soft_to_parse_wrapped_tracking_data 

Could not parse wrapped tracking data.

failed_soft_get_all_players 

Failed to get the player collection from Hermes.

failed_soft_update_trackers 

Failed to update trackers in Hermes.

failed_soft_add_polygon_skeleton 

Failed to add a polygon skeleton to Hermes.

failed_soft_remove_polygon_skeleton 

Failed to remove a polygon skeleton from Hermes.

failed_soft_set_polygon_skeleton_target 

Failed to set the target (body estimation/target skeleton) of a polygon skeleton.

failed_soft_set_polygon_retargeting_settings 

Failed to set the retargeting settings of a polygon skeleton.

failed_soft_add_target_skeleton 

Failed to add a target skeleton to Hermes.

failed_soft_remove_target_skeleton 

Failed to remove a target skeleton from Hermes.

failed_soft_update_target_skeleton 

Failed to update the pose of a target sketeton.

failed_soft_check_polygon_version 

Failed to compare the version of polygon with the plugin.

Function Documentation

◆ AddOrUpdatePolygonSkeleton()

bool HermesSDK::AddOrUpdatePolygonSkeleton ( Hermes::Protocol::Polygon::Skeleton  _skeleton)

Adds or updates the given Polygon skeleton in Hermes.

Parameters
_skeletonThe Skeleton to add or update in Hermes.
Returns
True on a successful add or update, or false otherwise.

◆ AddTargetSkeleton()

bool HermesSDK::AddTargetSkeleton ( Hermes::Protocol::Polygon::TargetSkeleton _Skeleton)

Add a target skeleton that can be used for the retargeting (ie. an animated skeleton).

Parameters
_Skeletonthe skeleton (should be in T-Pose).
Returns
True if the target skeleton was correctly added.

◆ CheckIfPolygonVersionIsCompatible()

bool HermesSDK::CheckIfPolygonVersionIsCompatible ( Hermes::Protocol::Polygon::Version  _Version)

Checks if the version of the SDK matches the version of Hermes.

Parameters
_Versionthe current version of the SDK.
Returns
True if the versions are similar.

◆ ConnectLocal()

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.

Parameters
_clientNameThe client name that will be advertised to the Hermes host.
_clientInfoThe client description that will be advertised to the Hermes host.
_onFilterSetupCallback that will be called when setting up the filters.
_onDeviceDataCallback that will be called when devicedata is available.
_onDeviceLandscapeCallback that will be called when landscape (connected devices) data is available.
_onPolygonDataCallback that will be called when Polygon data is available.
_onTrackingDataCallback that will be called when tracking data is available.
_onErrorCallback that will be called when there is an error encountered.
_onConnectedToCoreCallback that will be called when the sdk is connected to core.
_onDisconnectedFromCoreCallback that will be called when the sdk is disconnected from core.

◆ ConnectNetworkAddress()

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.

Parameters
_clientNameThe client name that will be advertised to the Hermes host.
_clientInfoThe client description that will be advertised to the Hermes host.
_adddressThe address of the host you are connecting to.
_onFilterSetupCallback that will be called when setting up the filters.
_onDeviceDataCallback that will be called when devicedata is available.
_onDeviceLandscapeCallback that will be called when landscape (connected devices) data is available.
_onPolygonDataCallback that will be called when Polygon data is available.
_onTrackingDataCallback that will be called when tracking data is available.
_onErrorCallback that will be called when there is an error encountered.
_onConnectedToCoreCallback that will be called when the sdk is connected to core.
_onDisconnectedFromCoreCallback that will be called when the sdk is disconnected from core.

◆ ConnectNetworkHostName()

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.

Parameters
_clientNameThe client name that will be advertised to the Hermes host.
_clientInfoThe client description that will be advertised to the Hermes host.
_hostnameThe hostname of the host you are connecting to.
_onFilterSetupCallback that will be called when setting up the filters.
_onDeviceDataCallback that will be called when devicedata is available.
_onDeviceLandscapeCallback that will be called when landscape (connected devices) data is available.
_onPolygonDataCallback that will be called when Polygon data is available.
_onTrackingDataCallback that will be called when tracking data is available.
_onErrorCallback that will be called when there is an error encountered.
_onConnectedToCoreCallback that will be called when the sdk is connected to core.
_onDisconnectedFromCoreCallback that will be called when the sdk is disconnected from core.

◆ FindNetworkHosts()

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)

Parameters
_onFilterSetupCallback that will be called when setting up the filters
_onDeviceDataCallback that will be called when devicedata is available
_onDeviceLandscapeCallback that will be called when landscape (connected devices) data is available
_onPolygonDataCallback that will be called when Polygon data is available.
_onTrackingDataCallback that will be called when tracking data is available.
_onErrorCallback that will be called when there is an error encountered
_onConnectedToCoreCallback that will be called when the sdk is connected to core.
_onDisconnectedFromCoreCallback that will be called when the sdk is disconnected from core.

◆ GetActivePipeline()

Hermes::Protocol::Pipeline * HermesSDK::GetActivePipeline ( )

Gets the currently active filter pipeline.

Returns
A pointer to a Pipeline object detailing the pipeline that is currently active.

◆ GetAllUsers()

bool HermesSDK::GetAllUsers ( Hermes::Protocol::UserCollection _userCollection)

Gets all the users as defined in the Manus Dashboard.

Parameters
_userCollectionCollection of users to fill with all existing users.
Returns
True on a successful fetch, or false otherwise.

◆ GetFilterInventory()

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.

Parameters
_inventoryInventory to fill with all available filters
Returns
True on a succesful fetch, or false otherwise.

◆ GetFoundHosts()

std::map< std::string, std::string > HermesSDK::GetFoundHosts ( )

Get the hosts that are found after a FindNetworkHosts() call

Returns
a map of hostnames (keys) and addresses (values)

◆ GetLeafInfo()

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.

Parameters
DeviceLeafref that we want to generalize
Returns
LeafInfo instance.

◆ GetSdkAndCoreVersion()

void HermesSDK::GetSdkAndCoreVersion ( Hermes::Protocol::Version _sdkVersion,
Hermes::Protocol::Version _coreVersion 
)

Get the version number of the SDK and Core.

Parameters
_sdkVersionThe version number of the SDK.
_sdkVersionThe version number of Core.

◆ IsRunning()

bool HermesSDK::IsRunning ( )

Gets the current running state of the SDK (CareTaker)

Returns
True if the CareTaker is running, false otherwise

◆ RemovePolygonSkeleton()

bool HermesSDK::RemovePolygonSkeleton ( Hermes::Protocol::Polygon::RemoveSkeletonArgs  _Args)

Remove skeleton with the given ID in Hermes.

Parameters
_ArgsThe skeleton ID that has to be removed.
Returns
True on a successful removal.

◆ RemoveTargetSkeleton()

bool HermesSDK::RemoveTargetSkeleton ( std::string &  _Name)

Remove a target skeleton.

Parameters
_Namethe name of the skeleton that should be removed.
Returns
True if the target skeleton was correctly removed.

◆ SetPipeline()

bool HermesSDK::SetPipeline ( Hermes::Protocol::Pipeline _pipeline)

Sets the currently active pipeline.

Parameters
_pipelinePointer to a Pipeline object to commit.
Returns
True on a successful commit, or false otherwise

◆ SetSkeletonSettings()

bool HermesSDK::SetSkeletonSettings ( Hermes::Protocol::Polygon::Retargeting::SettingsArgs _Args)

Set the retargeting settings of a specific skeleton.

Parameters
_Argsthe retarget settings the skeleton should use.
Returns
True if the settings were set correctly.

◆ SetSkeletonTarget()

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

Parameters
_Argsthe target which the skeleton should retarget on.
Returns
True if the target was correctly set.

◆ Stop()

void HermesSDK::Stop ( )

Stops the SDK (Caretaker and Hive) Joins all threads, then logs out of its session with Hermes.

◆ UpdateTargetSkeleton()

void HermesSDK::UpdateTargetSkeleton ( Hermes::Protocol::Polygon::TargetSkeleton _Skeleton)

Update a target skeleton pose.

Parameters
_Skeletonthe target skeleton.

◆ UpdateTrackers()

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

Parameters
_trackerDataThe trackerdata to send to Hermes.
Returns
True on a successful update, or false otherwise.

◆ VibrateFingers()

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.

Parameters
_dongleIdThe id of the haptics dongle to send the data to.
_handTypeLeft, right, or unknown (which will send data to both hands)
_powersAn array of 5 floats [0.0, 1.0], thumb to pinky, with the strength of vibration for each actuator
Returns
True on a successful send, or false otherwise

◆ VibrateWrist()

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.

Parameters
_deviceIdThe device id of the glove to rumble
_unitStrengthStrength of the rumble, from 0.0 to 1.0
_durationInMillisecondsDuration to rumble the glove for
Returns
True on a successful send, or false otherwise.