Public Member Functions | Friends | List of all members
TestWatchdog Class Reference
Inheritance diagram for TestWatchdog:
Inheritance graph
[legend]

Public Member Functions

 TestWatchdog (const std::string &robotFrame, const std::set< std::string > &monitoredFrames, const std::shared_ptr< tf2_ros::Buffer > &tfBuffer, const ros::Duration &unreachableTfLookupTimeout, const ros::Rate &unreachableFramesCheckRate)
 
- Public Member Functions inherited from robot_body_filter::TFFramesWatchdog
void addMonitoredFrame (const std::string &monitoredFrame)
 Add the given frame to the set of monitored frames (if it is not already there). More...
 
bool areAllFramesReachable () const
 Return whether all monitored frames are reachable. More...
 
void clear ()
 Clear shapes_to_links, reachable_frames and tf_buffer. More...
 
bool isMonitored (const std::string &frame) const
 Return whether the given frame is monitored by this watchdog. More...
 
bool isReachable (const std::string &frame) const
 Return whether the given frame is reachable. More...
 
bool isRunning () const
 Return true if the watchdog is running. More...
 
optional< geometry_msgs::TransformStamped > lookupTransform (const std::string &frame, const ros::Time &time, const ros::Duration &timeout, std::string *errstr=nullptr)
 Looks for a transform if it is marked reachable. Returns immediately for transforms marked unreachable. More...
 
void pause ()
 Pause thread execution. More...
 
void run ()
 
void setMonitoredFrames (std::set< std::string > monitoredFrames)
 TF frames to be monitored by this watchdog. More...
 
void start ()
 
void stop ()
 Stop the watchdog for good. Can only be called once. More...
 
 TFFramesWatchdog (std::string robotFrame, std::set< std::string > monitoredFrames, std::shared_ptr< tf2_ros::Buffer > tfBuffer, ros::Duration unreachableTfLookupTimeout=ros::Duration(0, 100000000), ros::Rate unreachableFramesCheckRate=ros::Rate(1.0))
 
void unpause ()
 Unpause thread execution. More...
 
virtual ~TFFramesWatchdog ()
 

Friends

class TfFramesWatchdog_Basic_Test
 
class TfFramesWatchdog_LookupTransform_Test
 
class TfFramesWatchdog_SearchForReachableFrames_Test
 
class TfFramesWatchdog_ThreadControl_Test
 

Additional Inherited Members

- Protected Member Functions inherited from robot_body_filter::TFFramesWatchdog
void addMonitoredFrameNoLock (const std::string &monitoredFrame)
 Add the given frame to the set of monitored frames (if it is not already there). More...
 
bool isMonitoredNoLock (const std::string &frame) const
 Return whether the given frame is monitored by this watchdog. More...
 
bool isReachableNoLock (const std::string &frame) const
 Return whether the given frame is reachable. More...
 
void markReachable (const std::string &frame)
 Mark the given frame as reachable. More...
 
void markUnreachable (const std::string &frame)
 Mark the given frame as unreachable. More...
 
void searchForReachableFrames ()
 Perform the search for reachable frames. More...
 
- Protected Attributes inherited from robot_body_filter::TFFramesWatchdog
std::mutex framesMutex
 Lock this mutex any time you want to work with monitoredFrames or reachableFrames. More...
 
std::set< std::string > monitoredFrames
 Set of frames to be watched. More...
 
volatile bool paused = true
 If true, this thread is paused. More...
 
std::set< std::string > reachableFrames
 List of source frames for which TFs to robot_frame are available. More...
 
std::string robotFrame
 The target frame of all watched transforms. More...
 
volatile bool shouldStop = false
 
bool started = false
 True if the watchdog thread has been started. More...
 
std::shared_ptr< tf2_ros::BuffertfBuffer
 TF buffer. More...
 
ros::Rate unreachableFramesCheckRate
 Rate at which checking for unreachable frames will be done. More...
 
ros::Duration unreachableTfLookupTimeout
 Timeout for canTransform() for figuring out if an unreachable frame became reachable. More...
 

Detailed Description

Definition at line 6 of file test_tf_frames_watchdog.cpp.

Constructor & Destructor Documentation

◆ TestWatchdog()

TestWatchdog::TestWatchdog ( const std::string &  robotFrame,
const std::set< std::string > &  monitoredFrames,
const std::shared_ptr< tf2_ros::Buffer > &  tfBuffer,
const ros::Duration unreachableTfLookupTimeout,
const ros::Rate unreachableFramesCheckRate 
)
inline

Definition at line 9 of file test_tf_frames_watchdog.cpp.

Friends And Related Function Documentation

◆ TfFramesWatchdog_Basic_Test

friend class TfFramesWatchdog_Basic_Test
friend

Definition at line 20 of file test_tf_frames_watchdog.cpp.

◆ TfFramesWatchdog_LookupTransform_Test

friend class TfFramesWatchdog_LookupTransform_Test
friend

Definition at line 23 of file test_tf_frames_watchdog.cpp.

◆ TfFramesWatchdog_SearchForReachableFrames_Test

friend class TfFramesWatchdog_SearchForReachableFrames_Test
friend

Definition at line 22 of file test_tf_frames_watchdog.cpp.

◆ TfFramesWatchdog_ThreadControl_Test

friend class TfFramesWatchdog_ThreadControl_Test
friend

Definition at line 21 of file test_tf_frames_watchdog.cpp.


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


robot_body_filter
Author(s): Eitan Marder-Eppstein, Tomas Petricek, Martin Pecka
autogenerated on Mon Feb 5 2024 03:33:49