Session Service
Session calls are used to ingest or retrieve runtime data from Graff. Every running robot saves data against a session, and the Session calls allow a user to retrieve data across all sessions.
Interacting with Sessions
Structures
GraffSDK.SessionResponse
— Type.A summary response for a single session.
GraffSDK.SessionsResponse
— Type.A list of session response summaries.
GraffSDK.SessionDetailsRequest
— Type.The structure used for detailed session requests.
GraffSDK.SessionDetailsResponse
— Type.The structure used for detailed session responses.
Functions
GraffSDK.getSessions
— Function.getSessions(config, robotId)
Gets all sessions for the current robot. Return: A vector of sessions for the current robot.
getSessions(config)
Gets all sessions for the current robot. Return: A vector of sessions for the current robot.
GraffSDK.isSessionExisting
— Function.isSessionExisting(config, robotId, sessionId)
Return: Returns true if the session exists already.
isSessionExisting(config)
Return: Returns true if the session exists already.
GraffSDK.getSession
— Function.getSession(config, robotId, sessionId)
Get a specific session given a user ID, robot ID, and session ID. Return: The session details for the provided user ID, robot ID, and session ID.
getSession(config)
Get a specific session given a user ID, robot ID, and session ID. Return: The session details for the provided user ID, robot ID, and session ID.
GraffSDK.deleteSession
— Function.deleteSession(config, robotId, sessionId)
Delete a specific session given a user ID, robot ID, and session ID. Return: Nothing if success, error if failed.
deleteSession(config)
Delete a specific session given a user ID, robot ID, and session ID. Return: Nothing if success, error if failed.
GraffSDK.addSession
— Function.addSession(config, robotId, session)
Create a session in Synchrony and associate it with the given robot+user. Return: Returns the created session.
addSession(config, session)
Create a session in Synchrony and associate it with the given robot+user. Return: Returns the created session.
Getting Graphs - Getting Session Nodes
Structures
GraffSDK.NodeResponse
— Type.The structure used to briefly describe a node in a response.
GraffSDK.NodesResponse
— Type.The structure used to briefly describe a set of nodes in a response.
GraffSDK.NodeDetailsResponse
— Type.The structure describing a complete node in a response.
Functions
GraffSDK.getNodes
— Function.getNodes(config, robotId, sessionId)
Gets all nodes for a given session. Return: A vector of nodes for a given robot.
getNodes(config)
Gets all nodes for a given session. Return: A vector of nodes for a given robot.
GraffSDK.getNode
— Function.getNode(config, robotId, sessionId, nodeIdOrLabel)
Gets a node's details by either its ID or name. Return: A node's details.
getNode(config, nodeIdOrLabel)
Gets a node's details by either its ID or name. Return: A node's details.
Building Graphs - Adding Nodes/Variables/Factors
Structures
NodeResponse
NodesResponse
NodeDetailsResponse
AddOdometryRequest
AddOdometryResponse
VariableRequest
VariableResponse
DistributionRequest
BearingRangeRequest
FactorBody
FactorRequest
Functions
GraffSDK.addVariable
— Function.addVariable(config, robotId, sessionId, variableRequest)
Create a variable in Synchrony. Return: Returns the ID+label of the created variable.
addVariable(config, variableRequest)
Create a variable in Synchrony. Return: Returns the ID+label of the created variable.
GraffSDK.addFactor
— Function.addFactor(config, robotId, sessionId, factorRequest)
Create a factor in Synchrony. Return: Returns the ID+label of the created factor.
addFactor(config, factorRequest)
Create a factor in Synchrony. Return: Returns the ID+label of the created factor.
GraffSDK.addBearingRangeFactor
— Function.addBearingRangeFactor(config, robotId, sessionId, bearingRangeRequest)
Create a variable in Synchrony and associate it with the given robot+user. Return: Returns ID+label of the created factor.
addBearingRangeFactor(config, bearingRangeRequest)
Create a variable in Synchrony and associate it with the given robot+user. Return: Returns ID+label of the created factor.
GraffSDK.addOdometryMeasurement
— Function.addOdometryMeasurement(config, robotId, sessionId, addOdoRequest)
Create a session in Synchrony and associate it with the given robot+user. Return: Returns the added odometry information.
addOdometryMeasurement(config, addOdoRequest)
Create a session in Synchrony and associate it with the given robot+user. Return: Returns the added odometry information.
GraffSDK.putReady
— Function.putReady(config, robotId, sessionId, isReady)
Set the ready status for a session.
putReady(config, isReady)
Set the ready status for a session.
Working with Node Data
Structures
GraffSDK.BigDataElementRequest
— Type.Body of a request for creating or updating a data element.
GraffSDK.BigDataEntryResponse
— Type.Summary of data entry returned from request.
GraffSDK.BigDataElementResponse
— Type.Complete data element response (including data).
Functions
GraffSDK.getDataEntries
— Function.getDataEntries(config, robotId, sessionId, node)
Get data entries associated with a node. Return: Summary of all data associated with a node.
getDataEntries(config, node)
Get data entries associated with a node. Return: Summary of all data associated with a node.
GraffSDK.getDataElement
— Function.getDataElement(config, robotId, sessionId, node, bigDataKey)
Get data elment associated with a node. Return: Full data element associated with the specified node.
getDataElement(config, node, bigDataKey)
Get data elment associated with a node. Return: Full data element associated with the specified node.
GraffSDK.getRawDataElement
— Function.getRawDataElement(config, robotId, sessionId, node, bigDataKey)
Get data elment associated with a node. Return: Full data element associated with the specified node.
getRawDataElement(config, node, bigDataKey)
Get data elment associated with a node. Return: Full data element associated with the specified node.
GraffSDK.addDataElement
— Function.addDataElement(config, robotId, sessionId, node, bigDataElement)
Add a data element associated with a node. Return: Nothing if succeed, error if failed.
addDataElement(config, node, bigDataElement)
Add a data element associated with a node. Return: Nothing if succeed, error if failed.
GraffSDK.updateDataElement
— Function.updateDataElement(config, robotId, sessionId, node, bigDataElement)
Update a data element associated with a node. Return: Nothing if succeed, error if failed.
updateDataElement(config, node, bigDataElement)
Update a data element associated with a node. Return: Nothing if succeed, error if failed.
GraffSDK.addOrUpdateDataElement
— Function.addOrUpdateDataElement(config, robotId, sessionId, node, dataElement)
Add or update a data element associated with a node. Will check if the key exists, if so it updates, otherwise it adds. Return: Nothing if succeed, error if failed.
GraffSDK.deleteDataElement
— Function.deleteDataElement(config, robotId, sessionId, node, dataId)
Delete a data element associated with a node. Return: Nothing if succeed, error if failed.
deleteDataElement(config, node, dataId)
Delete a data element associated with a node. Return: Nothing if succeed, error if failed.