32 #ifndef MULTI_RB_TRACKER_H_ 33 #define MULTI_RB_TRACKER_H_ 35 #include <rb_tracker/RBTrackerDynReconfConfig.h> 40 #include "omip_msgs/RigidBodyTwistWithCovMsg.h" 46 #include "omip_msgs/ShapeTrackerStates.h" 52 #include <boost/thread/thread.hpp> 53 #include <boost/thread/mutex.hpp> 58 #define INTEGRATOR_VISION_CHANNEL 0 59 #define INTEGRATOR_PROPRIOCEPTION_CHANNEL 1 92 double loop_period_ns,
93 int ransac_iterations,
94 double estimation_error_threshold,
95 double static_motion_threshold,
96 double new_rbm_error_threshold,
97 double max_error_to_reassign_feats,
98 int supporting_features_threshold,
99 int min_num_feats_for_new_rb,
100 int min_num_frames_for_new_rb,
101 int initial_cam_motion_constraint,
181 std::vector<Eigen::Matrix4d>
getPoses()
const;
280 std::vector<Feature::Id>
EstimateFreeFeatures(
const std::vector<Feature::Id>& supporting_features);
314 void CreateNewFilter(
const std::vector<Eigen::Matrix4d> &initial_trajectory,
315 const Eigen::Twistd& initial_velocity,
316 const std::vector<Feature::Id> &initial_supporting_feats);
virtual void setCovarianceSystemAccelerationRy(double v)
virtual ~MultiRBTracker()
StaticEnvironmentFilter::Ptr _static_environment_filter
boost::tuple< double, double, double > Location
virtual void correctState()
Third and final step when updating the filter. The predicted next state is corrected based on the dif...
int getNumberSupportingFeatures(int n) const
std::vector< Feature::Id > estimateBestPredictionsAndSupportingFeatures()
void ReflectState()
Prepare the corrected state to be published.
int _min_num_frames_for_new_rb
virtual void setMinAmountTranslationForNewRB(double v)
virtual void predictMeasurement()
Second step when updating the filter. The next measurement is predicted from the predicted next state...
boost::mutex::scoped_lock _measurement_timestamp_ns_lock
virtual void setMeasurementDepthFactor(double v)
virtual void setMinCovarianceMeasurementY(double v)
virtual void setNumberOfTrackedFeatures(int v)
virtual void setMaxFitnessScore(double v)
virtual void setMeasurement(rbt_measurement_t acquired_measurement, const double &measurement_timestamp)
Set the latest acquired measurement.
omip_msgs::RigidBodyPosesAndVelsMsg rbt_state_t
rbt_state_t _last_predicted_state_kh
double _max_error_to_reassign_feats
std::vector< Eigen::Vector3d > getCentroids() const
virtual rbt_state_t getState() const
Get the currently belief state.
virtual void setDynamicReconfigureValues(rb_tracker::RBTrackerDynReconfConfig &config)
Dynamic configuration.
double _new_rbm_error_threshold
boost::mutex _measurement_timestamp_ns_mutex
virtual void setCovarianceSystemAccelerationRz(double v)
virtual void setMinProbabilisticValue(double v)
double _meas_depth_factor
void addFeatureLocation(Feature::Id f_id, Feature::Location f_loc)
virtual void setPriorCovariancePose(double v)
std::vector< RBFilter::Ptr > _kalman_filters
double _static_motion_threshold
FeatureCloudPCL getFreeFeatures()
double _min_probabilistic_value
std::ofstream _really_free_feats_file
virtual void processMeasurementFromShapeTracker(const omip_msgs::ShapeTrackerStates &meas_from_st)
Process the measurement coming from the ShapeTrackerNode that is a refinement/substitute of the featu...
double _estimation_error_threshold
void CreateNewFilter(const std::vector< Eigen::Matrix4d > &initial_trajectory, const Eigen::Twistd &initial_velocity, const std::vector< Feature::Id > &initial_supporting_feats)
FeatureCloudPCL getLabelledSupportingFeatures()
double _max_fitness_score
virtual rbt_measurement_t getPredictedMeasurement() const
Get the predicted next measurement.
double _min_amount_rotation_for_new_rb
int _min_num_supporting_feats_to_correct
FeatureCloudPCL getAtBirthFeatures()
virtual void setCovarianceSystemAccelerationTy(double v)
virtual void predictState(double time_interval_ns)
First step when updating the filter. The next state is predicted from current state and system model ...
virtual void setMinCovarianceMeasurementZ(double v)
FeaturesDataBase::Ptr _features_db
std::vector< geometry_msgs::TwistWithCovariancePtr > getPosesECWithCovariance() const
pcl::PointCloud< FeaturePCL > FeatureCloudPCL
virtual void setCovarianceSystemAccelerationTx(double v)
std::vector< Feature::Id > ReassignFreeFeatures(const std::vector< Feature::Id > &free_feat_ids)
std::vector< geometry_msgs::TwistWithCovariancePtr > getVelocitiesWithCovariance() const
int _min_num_points_in_segment
RB_id_t getRBId(int n) const
virtual void setMinCovarianceMeasurementX(double v)
std::vector< Feature::Id > EstimateFreeFeatures(const std::vector< Feature::Id > &supporting_features)
virtual void setCovarianceSystemAccelerationTz(double v)
int _supporting_features_threshold
FeatureCloudPCL getPredictedFeatures()
static_environment_tracker_t
virtual void setMinNumberOfSupportingFeaturesToCorrectPredictedState(int v)
FeatureCloudPCLwc::Ptr rbt_measurement_t
std::vector< Feature::Id > _free_feat_ids
MultiRBTracker(int max_num_rb, double loop_period_ns, int ransac_iterations, double estimation_error_threshold, double static_motion_threshold, double new_rbm_error_threshold, double max_error_to_reassign_feats, int supporting_features_threshold, int min_num_feats_for_new_rb, int min_num_frames_for_new_rb, int initial_cam_motion_constraint, static_environment_tracker_t static_environment_tracker_type)
virtual void addPredictedState(const rbt_state_t &predicted_state, const double &predicted_state_timestamp_ns)
void TryToCreateNewFilter(const std::vector< Feature::Id > &really_free_feat_ids)
virtual void setPriorCovarianceVelocity(double v)
std::vector< Feature::Id > _really_free_feat_ids
virtual void setCovarianceSystemAccelerationRx(double v)
std::vector< Eigen::Matrix4d > getPoses() const
double _min_amount_translation_for_new_rb
FeaturesDataBase::Ptr getFeaturesDatabase()
int _min_num_feats_for_new_rb
virtual void setMinAmountRotationForNewRB(double v)
virtual void setMinNumPointsInSegment(int v)
std::vector< geometry_msgs::PoseWithCovariancePtr > getPosesWithCovariance() const
FeatureCloudPCL::Ptr CollectLocationPredictions()