HiveMind
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
InterlocManager Class Reference

#include <InterlocManager.h>

Inheritance diagram for InterlocManager:
Inheritance graph
Collaboration diagram for InterlocManager:
Collaboration graph

Public Member Functions

 InterlocManager (ILogger &logger, INotificationQueue< InterlocUpdate > &interlocUpdateQueue)
 
 ~InterlocManager () override=default
 
void startInterloc () override
 Dummy function to demonstrate working DW1000s. More...
 
void setInterlocManagerState (InterlocStateDTO state) override
 
void configureTWRCalibration (uint16_t distanceCalibCm) override
 Sets the targeted distance for calibration. More...
 
void configureAngleCalibration (uint32_t numberOfFrames) override
 Sets the number of frames to accumulate when in angle calibration mode. More...
 
void setInterlocManagerStateChangeCallback (interlocManagerStateChangeCallbackFunction_t callback, void *context) override
 
void setInterlocManagerRawAngleDataCallback (interlocRawAngleDataCallbackFunction_t callback, void *context) override
 
void updateAngleCalculatorParameters (const ConfigureAngleParametersDTO &newParams) override
 
- Public Member Functions inherited from IInterlocManager
virtual ~IInterlocManager ()=default
 

Private Member Functions

void gazeboUpdateCallback (const gazebo_msgs::ModelStates &msg)
 
std::optional< geometry_msgs::TransformStamped > getHiveBoardTransform (const std::string &agentName)
 

Static Private Member Functions

static tf2::Stamped< tf2::Transform > getHiveboardTf (const geometry_msgs::Pose &poseWorldFrame, const geometry_msgs::TransformStamped &hiveboardToRobotTf)
 
static double getDistance (const tf2::Transform &transform)
 
static double getRelativeOrientation (const tf2::Transform &transform)
 
static double getAngleOfArrival (const tf2::Transform &agentToAgentTransform)
 

Private Attributes

ILoggerm_logger
 
ros::Subscriber m_sub
 
uint m_interlocRefreshDelayMs
 
std::map< uint16_t, geometry_msgs::TransformStamped > m_baseLinkToHiveBoardTransforms
 
tf2_ros::Buffer m_tfBuffer
 
tf2_ros::TransformListener m_tfListener
 
INotificationQueue< InterlocUpdate > & m_interlocUpdateQueue
 

Constructor & Destructor Documentation

◆ InterlocManager()

InterlocManager::InterlocManager ( ILogger logger,
INotificationQueue< InterlocUpdate > &  interlocUpdateQueue 
)

◆ ~InterlocManager()

InterlocManager::~InterlocManager ( )
overridedefault

Member Function Documentation

◆ configureAngleCalibration()

void InterlocManager::configureAngleCalibration ( uint32_t  numberOfFrames)
overridevirtual

Sets the number of frames to accumulate when in angle calibration mode.

Parameters
numberOfFramesNumber of frames to accumulate

Implements IInterlocManager.

◆ configureTWRCalibration()

void InterlocManager::configureTWRCalibration ( uint16_t  distanceCalibCm)
overridevirtual

Sets the targeted distance for calibration.

Parameters
distanceCalibCmDistance between the devices in calibration mode

Implements IInterlocManager.

◆ gazeboUpdateCallback()

void InterlocManager::gazeboUpdateCallback ( const gazebo_msgs::ModelStates &  msg)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAngleOfArrival()

double InterlocManager::getAngleOfArrival ( const tf2::Transform &  agentToAgentTransform)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDistance()

double InterlocManager::getDistance ( const tf2::Transform &  transform)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHiveboardTf()

tf2::Stamped< tf2::Transform > InterlocManager::getHiveboardTf ( const geometry_msgs::Pose &  poseWorldFrame,
const geometry_msgs::TransformStamped &  hiveboardToRobotTf 
)
staticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHiveBoardTransform()

std::optional< geometry_msgs::TransformStamped > InterlocManager::getHiveBoardTransform ( const std::string &  agentName)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRelativeOrientation()

static double InterlocManager::getRelativeOrientation ( const tf2::Transform &  transform)
staticprivate

◆ setInterlocManagerRawAngleDataCallback()

void InterlocManager::setInterlocManagerRawAngleDataCallback ( interlocRawAngleDataCallbackFunction_t  callback,
void *  context 
)
overridevirtual

Sets the callback to call when a raw angle data is sent back to the PC

Parameters
callbackCallback
contextContext to pass the callback

Implements IInterlocManager.

◆ setInterlocManagerState()

void InterlocManager::setInterlocManagerState ( InterlocStateDTO  state)
overridevirtual

Implements IInterlocManager.

◆ setInterlocManagerStateChangeCallback()

void InterlocManager::setInterlocManagerStateChangeCallback ( interlocManagerStateChangeCallbackFunction_t  callback,
void *  context 
)
overridevirtual

Sets the callback to call when a state change occurs in the interloc manager

Parameters
callbackCallback
contextContext to pass the callback

Implements IInterlocManager.

◆ startInterloc()

void InterlocManager::startInterloc ( )
overridevirtual

Dummy function to demonstrate working DW1000s.

Implements IInterlocManager.

Here is the call graph for this function:

◆ updateAngleCalculatorParameters()

void InterlocManager::updateAngleCalculatorParameters ( const ConfigureAngleParametersDTO &  newParams)
overridevirtual

Updates the parameters used to calculate an angle

Parameters
newParamsDTO to save as new parameters

Implements IInterlocManager.

Member Data Documentation

◆ m_baseLinkToHiveBoardTransforms

std::map<uint16_t, geometry_msgs::TransformStamped> InterlocManager::m_baseLinkToHiveBoardTransforms
private

◆ m_interlocRefreshDelayMs

uint InterlocManager::m_interlocRefreshDelayMs
private

◆ m_interlocUpdateQueue

INotificationQueue<InterlocUpdate>& InterlocManager::m_interlocUpdateQueue
private

◆ m_logger

ILogger& InterlocManager::m_logger
private

◆ m_sub

ros::Subscriber InterlocManager::m_sub
private

◆ m_tfBuffer

tf2_ros::Buffer InterlocManager::m_tfBuffer
private

◆ m_tfListener

tf2_ros::TransformListener InterlocManager::m_tfListener
private

The documentation for this class was generated from the following files: