Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
tf::MessageFilterJointState Class Reference

#include <effort_display.h>

Inheritance diagram for tf::MessageFilterJointState:
Inheritance graph
[legend]

Public Types

typedef boost::function< void(const MConstPtr &, FilterFailureReason)> FailureCallback
 
typedef boost::signals2::signal< void(const MConstPtr &, FilterFailureReason)> FailureSignal
 
typedef boost::shared_ptr< M const > MConstPtr
 
typedef ros::MessageEvent< M const > MEvent
 
- Public Types inherited from tf::MessageFilter< sensor_msgs::JointState >
typedef boost::function< void(const MConstPtr &, FilterFailureReason)> FailureCallback
 
typedef boost::signals2::signal< void(const MConstPtr &, FilterFailureReason)> FailureSignal
 
typedef boost::shared_ptr< sensor_msgs::JointState const > MConstPtr
 
typedef ros::MessageEvent< sensor_msgs::JointState const > MEvent
 
- Public Types inherited from message_filters::SimpleFilter< M >
typedef boost::function< void(const MConstPtr &)> Callback
 
typedef boost::function< void(const EventType &)> EventCallback
 
typedef ros::MessageEvent< M const > EventType
 
typedef boost::shared_ptr< M const > MConstPtr
 

Public Member Functions

void add (const MEvent &evt)
 
void add (const MConstPtr &message)
 Manually add a message into this filter. More...
 
void clear () override
 Clear any messages currently in the queue. More...
 
template<class F >
void connectInput (F &f)
 Connect this filter's input to another filter's output. If this filter is already connected, disconnects first. More...
 
uint32_t getQueueSize () override
 
std::string getTargetFramesString ()
 Get the target frames as a string for debugging. More...
 
 MessageFilterJointState (Transformer &tf, const std::string &target_frame, uint32_t queue_size, ros::NodeHandle nh=ros::NodeHandle(), ros::Duration max_rate=ros::Duration(0.01))
 Constructor. More...
 
template<class F >
 MessageFilterJointState (F &f, Transformer &tf, const std::string &target_frame, uint32_t queue_size, ros::NodeHandle nh=ros::NodeHandle(), ros::Duration max_rate=ros::Duration(0.01))
 Constructor. More...
 
message_filters::Connection registerFailureCallback (const FailureCallback &callback)
 Register a callback to be called when a message is about to be dropped. More...
 
 ROS_STATIC_ASSERT (ros::message_traits::HasHeader< M >::value)
 
void setQueueSize (uint32_t new_queue_size) override
 
void setTargetFrame (const std::string &target_frame) override
 Set the frame you need to be able to transform to before getting a message callback. More...
 
void setTargetFrames (const std::vector< std::string > &target_frames) override
 Set the frames you need to be able to transform to before getting a message callback. More...
 
void setTolerance (const ros::Duration &tolerance) override
 Set the required tolerance for the notifier to return true. More...
 
 ~MessageFilterJointState () override
 Destructor. More...
 
- Public Member Functions inherited from tf::MessageFilter< sensor_msgs::JointState >
void add (const MEvent &evt)
 
void add (const MConstPtr &message)
 
void clear ()
 
void connectInput (F &f)
 
std::string getTargetFramesString ()
 
 MessageFilter (F &f, Transformer &tf, const std::string &target_frame, uint32_t queue_size, ros::NodeHandle nh=ros::NodeHandle(), ros::Duration max_rate=ros::Duration(0.01))
 
 MessageFilter (Transformer &tf, const std::string &target_frame, uint32_t queue_size, ros::NodeHandle nh=ros::NodeHandle(), ros::Duration max_rate=ros::Duration(0.01))
 
message_filters::Connection registerFailureCallback (const FailureCallback &callback)
 
void setTargetFrame (const std::string &target_frame)
 
void setTargetFrames (const std::vector< std::string > &target_frames)
 
void setTolerance (const ros::Duration &tolerance)
 
 ~MessageFilter ()
 
- Public Member Functions inherited from tf::MessageFilterBase
virtual ~MessageFilterBase ()
 
- Public Member Functions inherited from message_filters::SimpleFilter< M >
const std::string & getName ()
 
Connection registerCallback (const C &callback)
 
Connection registerCallback (void(T::*callback)(P), T *t)
 
Connection registerCallback (void(*callback)(P))
 
Connection registerCallback (const boost::function< void(P)> &callback)
 
void setName (const std::string &name)
 

Private Types

typedef std::list< MEventL_Event
 
typedef sensor_msgs::JointState M
 

Private Member Functions

void checkFailures ()
 
void disconnectFailure (const message_filters::Connection &c)
 
void incomingMessage (const ros::MessageEvent< M const > &evt)
 Callback that happens when we receive a message on the message topic. More...
 
void init ()
 
void maxRateTimerCallback (const ros::TimerEvent &)
 
void signalFailure (const MEvent &evt, FilterFailureReason reason)
 
bool testMessage (const MEvent &evt)
 
void testMessages ()
 
void transformsChanged ()
 

Private Attributes

uint64_t dropped_message_count_
 
uint64_t failed_out_the_back_count_
 
uint64_t failed_transform_count_
 
FailureSignal failure_signal_
 
boost::mutex failure_signal_mutex_
 
uint64_t incoming_message_count_
 
std::string last_out_the_back_frame_
 
ros::Time last_out_the_back_stamp_
 
ros::Duration max_rate_
 
ros::Timer max_rate_timer_
 
message_filters::Connection message_connection_
 
uint32_t message_count_
 The number of messages in the list. (messages_.size() has linear cost) More...
 
L_Event messages_
 The message list. More...
 
boost::mutex messages_mutex_
 The mutex used for locking message list operations. More...
 
bool new_messages_
 Used to skip waiting on new_data_. More...
 
volatile bool new_transforms_
 
ros::Time next_failure_warning_
 
ros::NodeHandle nh_
 The node used to subscribe to the topic. More...
 
uint32_t queue_size_
 The maximum number of messages we queue up. More...
 
uint64_t successful_transform_count_
 
std::vector< std::string > target_frames_
 The frames we need to be able to transform to before a message is ready. More...
 
std::string target_frames_string_
 
boost::mutex target_frames_string_mutex_
 
Transformertf_
 The Transformer used to determine if transformation data is available. More...
 
boost::signals2::connection tf_connection_
 
ros::Duration time_tolerance_
 
uint64_t transform_message_count_
 
bool warned_about_empty_frame_id_
 
bool warned_about_unresolved_name_
 

Additional Inherited Members

- Protected Member Functions inherited from message_filters::SimpleFilter< M >
void signalMessage (const MConstPtr &msg)
 
void signalMessage (const ros::MessageEvent< M const > &event)
 

Detailed Description

Definition at line 49 of file effort_display.h.

Member Typedef Documentation

◆ FailureCallback

Definition at line 56 of file effort_display.h.

◆ FailureSignal

typedef boost::signals2::signal<void(const MConstPtr&, FilterFailureReason)> tf::MessageFilterJointState::FailureSignal

Definition at line 57 of file effort_display.h.

◆ L_Event

typedef std::list<MEvent> tf::MessageFilterJointState::L_Event
private

Definition at line 304 of file effort_display.h.

◆ M

typedef sensor_msgs::JointState tf::MessageFilterJointState::M
private

Definition at line 51 of file effort_display.h.

◆ MConstPtr

Definition at line 54 of file effort_display.h.

◆ MEvent

Definition at line 55 of file effort_display.h.

Constructor & Destructor Documentation

◆ MessageFilterJointState() [1/2]

tf::MessageFilterJointState::MessageFilterJointState ( Transformer tf,
const std::string &  target_frame,
uint32_t  queue_size,
ros::NodeHandle  nh = ros::NodeHandle(),
ros::Duration  max_rate = ros::Duration(0.01) 
)
inline

Constructor.

Parameters
tfThe tf::Transformer this filter should use
target_frameThe frame this filter should attempt to transform to. To use multiple frames, pass an empty string here and use the setTargetFrames() function.
queue_sizeThe number of messages to queue up before throwing away old ones. 0 means infinite (dangerous).
nhThe NodeHandle to use for any necessary operations
max_rateThe maximum rate to check for newly transformable messages

Definition at line 74 of file effort_display.h.

◆ MessageFilterJointState() [2/2]

template<class F >
tf::MessageFilterJointState::MessageFilterJointState ( F &  f,
Transformer tf,
const std::string &  target_frame,
uint32_t  queue_size,
ros::NodeHandle  nh = ros::NodeHandle(),
ros::Duration  max_rate = ros::Duration(0.01) 
)
inline

Constructor.

Parameters
fThe filter to connect this filter's input to. Often will be a message_filters::Subscriber.
tfThe tf::Transformer this filter should use
target_frameThe frame this filter should attempt to transform to. To use multiple frames, pass an empty string here and use the setTargetFrames() function.
queue_sizeThe number of messages to queue up before throwing away old ones. 0 means infinite (dangerous).
nhThe NodeHandle to use for any necessary operations
max_rateThe maximum rate to check for newly transformable messages

Definition at line 103 of file effort_display.h.

◆ ~MessageFilterJointState()

tf::MessageFilterJointState::~MessageFilterJointState ( )
inlineoverride

Destructor.

Definition at line 136 of file effort_display.h.

Member Function Documentation

◆ add() [1/2]

void tf::MessageFilterJointState::add ( const MEvent evt)
inline

Definition at line 214 of file effort_display.h.

◆ add() [2/2]

void tf::MessageFilterJointState::add ( const MConstPtr message)
inline

Manually add a message into this filter.

Note
If the message (or any other messages in the queue) are immediately transformable this will immediately call through to the output callback, possibly multiple times

Definition at line 255 of file effort_display.h.

◆ checkFailures()

void tf::MessageFilterJointState::checkFailures ( )
inlineprivate

Definition at line 463 of file effort_display.h.

◆ clear()

void tf::MessageFilterJointState::clear ( )
inlineoverridevirtual

Clear any messages currently in the queue.

Implements tf::MessageFilterBase.

Definition at line 201 of file effort_display.h.

◆ connectInput()

template<class F >
void tf::MessageFilterJointState::connectInput ( F &  f)
inline

Connect this filter's input to another filter's output. If this filter is already connected, disconnects first.

Definition at line 127 of file effort_display.h.

◆ disconnectFailure()

void tf::MessageFilterJointState::disconnectFailure ( const message_filters::Connection c)
inlineprivate

Definition at line 497 of file effort_display.h.

◆ getQueueSize()

uint32_t tf::MessageFilterJointState::getQueueSize ( )
inlineoverridevirtual

Reimplemented from tf::MessageFilter< sensor_msgs::JointState >.

Definition at line 278 of file effort_display.h.

◆ getTargetFramesString()

std::string tf::MessageFilterJointState::getTargetFramesString ( )
inline

Get the target frames as a string for debugging.

Definition at line 184 of file effort_display.h.

◆ incomingMessage()

void tf::MessageFilterJointState::incomingMessage ( const ros::MessageEvent< M const > &  evt)
inlineprivate

Callback that happens when we receive a message on the message topic.

Definition at line 451 of file effort_display.h.

◆ init()

void tf::MessageFilterJointState::init ( )
inlineprivate

Definition at line 284 of file effort_display.h.

◆ maxRateTimerCallback()

void tf::MessageFilterJointState::maxRateTimerCallback ( const ros::TimerEvent )
inlineprivate

Definition at line 436 of file effort_display.h.

◆ registerFailureCallback()

message_filters::Connection tf::MessageFilterJointState::registerFailureCallback ( const FailureCallback callback)
inline

Register a callback to be called when a message is about to be dropped.

Parameters
callbackThe callback to call

Definition at line 266 of file effort_display.h.

◆ ROS_STATIC_ASSERT()

tf::MessageFilterJointState::ROS_STATIC_ASSERT ( ros::message_traits::HasHeader< M >::value  )

◆ setQueueSize()

void tf::MessageFilterJointState::setQueueSize ( uint32_t  new_queue_size)
inlineoverridevirtual

Reimplemented from tf::MessageFilter< sensor_msgs::JointState >.

Definition at line 273 of file effort_display.h.

◆ setTargetFrame()

void tf::MessageFilterJointState::setTargetFrame ( const std::string &  target_frame)
inlineoverridevirtual

Set the frame you need to be able to transform to before getting a message callback.

Implements tf::MessageFilterBase.

Definition at line 156 of file effort_display.h.

◆ setTargetFrames()

void tf::MessageFilterJointState::setTargetFrames ( const std::vector< std::string > &  target_frames)
inlineoverridevirtual

Set the frames you need to be able to transform to before getting a message callback.

Implements tf::MessageFilterBase.

Definition at line 166 of file effort_display.h.

◆ setTolerance()

void tf::MessageFilterJointState::setTolerance ( const ros::Duration tolerance)
inlineoverridevirtual

Set the required tolerance for the notifier to return true.

Implements tf::MessageFilterBase.

Definition at line 193 of file effort_display.h.

◆ signalFailure()

void tf::MessageFilterJointState::signalFailure ( const MEvent evt,
FilterFailureReason  reason 
)
inlineprivate

Definition at line 503 of file effort_display.h.

◆ testMessage()

bool tf::MessageFilterJointState::testMessage ( const MEvent evt)
inlineprivate
Todo:
combine getLatestCommonTime call with the canTransform call

Definition at line 306 of file effort_display.h.

◆ testMessages()

void tf::MessageFilterJointState::testMessages ( )
inlineprivate

Definition at line 409 of file effort_display.h.

◆ transformsChanged()

void tf::MessageFilterJointState::transformsChanged ( )
inlineprivate

Definition at line 456 of file effort_display.h.

Member Data Documentation

◆ dropped_message_count_

uint64_t tf::MessageFilterJointState::dropped_message_count_
private

Definition at line 535 of file effort_display.h.

◆ failed_out_the_back_count_

uint64_t tf::MessageFilterJointState::failed_out_the_back_count_
private

Definition at line 532 of file effort_display.h.

◆ failed_transform_count_

uint64_t tf::MessageFilterJointState::failed_transform_count_
private

Definition at line 531 of file effort_display.h.

◆ failure_signal_

FailureSignal tf::MessageFilterJointState::failure_signal_
private

Definition at line 548 of file effort_display.h.

◆ failure_signal_mutex_

boost::mutex tf::MessageFilterJointState::failure_signal_mutex_
private

Definition at line 549 of file effort_display.h.

◆ incoming_message_count_

uint64_t tf::MessageFilterJointState::incoming_message_count_
private

Definition at line 534 of file effort_display.h.

◆ last_out_the_back_frame_

std::string tf::MessageFilterJointState::last_out_the_back_frame_
private

Definition at line 538 of file effort_display.h.

◆ last_out_the_back_stamp_

ros::Time tf::MessageFilterJointState::last_out_the_back_stamp_
private

Definition at line 537 of file effort_display.h.

◆ max_rate_

ros::Duration tf::MessageFilterJointState::max_rate_
private

Definition at line 511 of file effort_display.h.

◆ max_rate_timer_

ros::Timer tf::MessageFilterJointState::max_rate_timer_
private

Definition at line 512 of file effort_display.h.

◆ message_connection_

message_filters::Connection tf::MessageFilterJointState::message_connection_
private

Definition at line 546 of file effort_display.h.

◆ message_count_

uint32_t tf::MessageFilterJointState::message_count_
private

The number of messages in the list. (messages_.size() has linear cost)

Definition at line 520 of file effort_display.h.

◆ messages_

L_Event tf::MessageFilterJointState::messages_
private

The message list.

Definition at line 519 of file effort_display.h.

◆ messages_mutex_

boost::mutex tf::MessageFilterJointState::messages_mutex_
private

The mutex used for locking message list operations.

Definition at line 521 of file effort_display.h.

◆ new_messages_

bool tf::MessageFilterJointState::new_messages_
private

Used to skip waiting on new_data_.

Definition at line 523 of file effort_display.h.

◆ new_transforms_

volatile bool tf::MessageFilterJointState::new_transforms_
private

Used to skip waiting on new_data_ if new transforms have come in while calling back or transforming data

Definition at line 524 of file effort_display.h.

◆ next_failure_warning_

ros::Time tf::MessageFilterJointState::next_failure_warning_
private

Definition at line 540 of file effort_display.h.

◆ nh_

ros::NodeHandle tf::MessageFilterJointState::nh_
private

The node used to subscribe to the topic.

Definition at line 510 of file effort_display.h.

◆ queue_size_

uint32_t tf::MessageFilterJointState::queue_size_
private

The maximum number of messages we queue up.

Definition at line 517 of file effort_display.h.

◆ successful_transform_count_

uint64_t tf::MessageFilterJointState::successful_transform_count_
private

Definition at line 530 of file effort_display.h.

◆ target_frames_

std::vector<std::string> tf::MessageFilterJointState::target_frames_
private

The frames we need to be able to transform to before a message is ready.

Definition at line 514 of file effort_display.h.

◆ target_frames_string_

std::string tf::MessageFilterJointState::target_frames_string_
private

Definition at line 515 of file effort_display.h.

◆ target_frames_string_mutex_

boost::mutex tf::MessageFilterJointState::target_frames_string_mutex_
private

Definition at line 516 of file effort_display.h.

◆ tf_

Transformer& tf::MessageFilterJointState::tf_
private

The Transformer used to determine if transformation data is available.

Definition at line 509 of file effort_display.h.

◆ tf_connection_

boost::signals2::connection tf::MessageFilterJointState::tf_connection_
private

Definition at line 545 of file effort_display.h.

◆ time_tolerance_

ros::Duration tf::MessageFilterJointState::time_tolerance_
private

Provide additional tolerance on time for messages which are stamped but can have associated duration

Definition at line 542 of file effort_display.h.

◆ transform_message_count_

uint64_t tf::MessageFilterJointState::transform_message_count_
private

Definition at line 533 of file effort_display.h.

◆ warned_about_empty_frame_id_

bool tf::MessageFilterJointState::warned_about_empty_frame_id_
private

Definition at line 528 of file effort_display.h.

◆ warned_about_unresolved_name_

bool tf::MessageFilterJointState::warned_about_unresolved_name_
private

Definition at line 527 of file effort_display.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat May 27 2023 02:06:26