32 #ifndef RECURSIVE_ESTIMATOR_NODE_INTERFACE_H_ 33 #define RECURSIVE_ESTIMATOR_NODE_INTERFACE_H_ 36 #include <boost/thread.hpp> 40 #include <std_msgs/Empty.h> 51 template <
class MeasurementTypeROS,
class StateTypeROS,
class RecursiveEstimatorFilterClass>
75 for(
int num_external_state_predictors_idx = 0; num_external_state_predictors_idx < this->
_num_external_state_predictors; num_external_state_predictors_idx++)
167 ROS_ERROR(
"The parameter %s can not be found.", param_name.c_str());
168 throw(std::string(
"The parameter can not be found. Parameter name: ") + param_name);
179 bool getROSParameter(std::string param_name, T & param_container,
const T & default_value)
183 ROS_WARN_STREAM(
"The parameter " << param_name <<
" can not be found. Using the default value " << default_value );
184 param_container = default_value;
ros::Time _previous_measurement_time
ros::Time _current_measurement_time
std::vector< ros::CallbackQueue * > _state_prediction_queues
ros::Duration _loop_period_ns
ros::NodeHandle _measurements_node_handle
virtual void quitCallback(const std_msgs::EmptyConstPtr &msg)
Callback to exit the node.
Time & fromNSec(uint64_t t)
int _num_external_state_predictors
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ros::Publisher _state_prediction_publisher
std::vector< boost::thread * > _state_predictor_listener_threads
This class defines an INTERFACE that all recursive estimator NODES need to implement It uses ROS TODO...
ros::Publisher _state_publisher
virtual void spinStatePredictorQueue(int state_prediction_queue_idx)
Spins one queue of predictors.
ROSCPP_DECL CallbackQueue * getGlobalCallbackQueue()
bool getROSParameter(std::string param_name, T ¶m_container)
ros::Subscriber _node_quit_subscriber
virtual void measurementCallback(const boost::shared_ptr< MeasurementTypeROS const > &measurement)=0
Callback for the state predictions.
virtual void run()
Creates a thread per state predictor that listens to their predictions, and this thread will listen t...
bool getROSParameter(std::string param_name, T ¶m_container, const T &default_value)
ros::CallbackQueue * _measurements_queue
RecursiveEstimatorFilterClass * _re_filter
void setCallbackQueue(CallbackQueueInterface *queue)
virtual void _publishPredictedMeasurement() const =0
Publish the prediction about the next measurement by this RE level.
virtual void statePredictionCallback(const boost::shared_ptr< StateTypeROS const > &predicted_next_state)=0
Callback for the state predictions.
ros::Publisher _measurement_prediction_publisher
#define ROS_WARN_STREAM(args)
ros::Subscriber _state_prediction_subscriber
std::vector< ros::NodeHandle > _state_prediction_node_handles
#define ROS_INFO_STREAM(args)
bool getParam(const std::string &key, std::string &s) const
ros::Subscriber _measurement_subscriber
virtual ~RecursiveEstimatorNodeInterface()
Destructor.
RecursiveEstimatorNodeInterface(int num_external_state_predictors)
Constructor.
virtual void _publishState() const =0
Publish the current state of this RE level.