MultiRBTrackerNode.h
Go to the documentation of this file.
1 /*
2  * MultiRBTrackerNode.h
3  *
4  * Author: roberto
5  *
6  * This is a modified implementation of the method for online estimation of kinematic structures described in our paper
7  * "Online Interactive Perception of Articulated Objects with Multi-Level Recursive Estimation Based on Task-Specific Priors"
8  * (Martín-Martín and Brock, 2014).
9  * This implementation can be used to reproduce the results of the paper and to be applied to new research.
10  * The implementation allows also to be extended to perceive different information/models or to use additional sources of information.
11  * A detail explanation of the method and the system can be found in our paper.
12  *
13  * If you are using this implementation in your research, please consider citing our work:
14  *
15 @inproceedings{martinmartin_ip_iros_2014,
16 Title = {Online Interactive Perception of Articulated Objects with Multi-Level Recursive Estimation Based on Task-Specific Priors},
17 Author = {Roberto {Mart\'in-Mart\'in} and Oliver Brock},
18 Booktitle = {Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems},
19 Pages = {2494-2501},
20 Year = {2014},
21 Location = {Chicago, Illinois, USA},
22 Note = {http://www.robotics.tu-berlin.de/fileadmin/fg170/Publikationen_pdf/martinmartin_ip_iros_2014.pdf},
23 Url = {http://www.robotics.tu-berlin.de/fileadmin/fg170/Publikationen_pdf/martinmartin_ip_iros_2014.pdf},
24 Projectname = {Interactive Perception}
25 }
26  * If you have questions or suggestions, contact us:
27  * roberto.martinmartin@tu-berlin.de
28  *
29  * Enjoy!
30  */
31 
32 #ifndef MULTI_RB_TRACKER_NODE_H
33 #define MULTI_RB_TRACKER_NODE_H
34 
35 #include <ros/ros.h>
37 
38 // Dynamic reconfigure includes.
39 #include <dynamic_reconfigure/server.h>
40 #include <rb_tracker/RBTrackerDynReconfConfig.h>
41 
42 #include <sensor_msgs/PointCloud2.h>
43 #include <geometry_msgs/Pose.h>
44 
45 #include <visualization_msgs/MarkerArray.h>
46 
49 
50 #include <pcl_ros/publisher.h>
51 #include <pcl/io/io.h>
52 #include <pcl/point_types.h>
53 
54 #include <Eigen/StdVector>
55 #include <Eigen/Geometry>
56 
57 #include "rb_tracker/RBFilter.h"
59 
60 #include "omip_msgs/RigidBodyPosesMsg.h"
61 #include "omip_msgs/RigidBodyPoseMsg.h"
62 
63 #include "omip_msgs/RigidBodyPosesAndVelsMsg.h"
64 #include "omip_msgs/RigidBodyPoseAndVelMsg.h"
65 
66 #include "omip_msgs/RigidBodyTwistsWithCovMsg.h"
67 #include "omip_msgs/RigidBodyTwistWithCovMsg.h"
68 
71 
72 #include <std_msgs/Float64.h>
73 
74 #include "omip_msgs/ShapeTrackerStates.h"
75 
76 namespace omip{
77 
78 class MultiRBTrackerNode : public RecursiveEstimatorNodeInterface<rbt_measurement_ros_t, rbt_state_ros_t, MultiRBTracker>
79 {
80 
81 public:
82 
87 
91  virtual ~MultiRBTrackerNode();
92 
99 
101 
102  void MatthiasRefinementsCallback(const boost::shared_ptr<rbt_state_t const> &matthias_refinements);
103 
104  void RGBDPCCallback(const sensor_msgs::PointCloud2ConstPtr &full_pc_msg);
105 
111  virtual void statePredictionCallback(const boost::shared_ptr<rbt_state_t const> &predicted_next_state);
112 
119  void DynamicReconfigureCallback(rb_tracker::RBTrackerDynReconfConfig &config, uint32_t level);
120 
124  void ReadParameters();
125 
126 protected:
127 
132  virtual void _publishState() const;
133 
138  virtual void _publishPredictedMeasurement() const;
139 
144  virtual void _PrintResults() const;
145 
151  virtual void _PublishClusteredFeatures();
152 
156  virtual void _PublishPosesWithCovariance();
157 
162  virtual void _PublishTF();
163 
164  std::map<RB_id_t, ros::Publisher*> _est_body_publishers;
167 
171 
174 
175  // Maximum number of iterations of RANSAC to find a good hypothesis for the free features
177 
178  // Maximum error allowed between predicted and measured feature position to consider it to STILL
179  // support a RBM
181 
182  // Minimum motion to consider that a feature moves
184 
185  // Maximum error allowed for the inliers of a new RBM hypothesis in RANSAC
187 
188  // Maximum error allowed between the predicted and the measured position of a feature to assign it to a RBM
190 
191  double _sensor_fps;
194 
195  // Minimum number of features that have to support a RBM to not be deleted
197 
198  // Total number of tracked features
200 
201  // Minimum number of free features to trigger the generation of a new RBM
203 
204  // Minimum number of frames that a features has to be present to be used to create new RBM
206 
207  // Flags
212 
214 
216  omip_msgs::ShapeTrackerStates _shape_tracker_meas;
217 
218  // Set up a dynamic reconfigure server.
219  // This should be done before reading parameter server values.
220  dynamic_reconfigure::Server<rb_tracker::RBTrackerDynReconfConfig> _dr_srv;
221  dynamic_reconfigure::Server<rb_tracker::RBTrackerDynReconfConfig>::CallbackType _dr_callback;
222 
224  Eigen::Twistd _previous_twist;
226 
227 };
228 
229 }
230 
231 #endif /* MULTI_RB_TRACKER_NODE_H */
ros::Subscriber _matthias_refinements_subscriber
virtual void _PublishPosesWithCovariance()
void RGBDPCCallback(const sensor_msgs::PointCloud2ConstPtr &full_pc_msg)
ros::Publisher _clustered_pc_publisher
virtual void _PublishClusteredFeatures()
Publish the tracked features clustered in RBs (the cluster id is written in the "label" field of the ...
void MeasurementFromShapeTrackerCallback(const boost::shared_ptr< omip_msgs::ShapeTrackerStates const > &shape_tracker_states)
ros::Publisher _atbirthfeats_pc_publisher
ros::Publisher _predictedfeats_pc_publisher
ros::Subscriber _meas_from_st_subscriber
virtual void _publishState() const
Publish the current state of this RE level.
omip_msgs::RigidBodyPosesAndVelsMsg rbt_state_t
std::map< RB_id_t, ros::Publisher * > _est_body_publishers
virtual void _PrintResults() const
Print the results of the RB tracker on the terminal.
dynamic_reconfigure::Server< rb_tracker::RBTrackerDynReconfConfig > _dr_srv
dynamic_reconfigure::Server< rb_tracker::RBTrackerDynReconfConfig >::CallbackType _dr_callback
static_environment_tracker_t _static_environment_tracker_type
virtual void measurementCallback(const boost::shared_ptr< rbt_measurement_ros_t const > &features_pc)
Callback for the measurements for this RE level (3D features from the lower level, FT)
ros::Publisher _freefeats_pc_publisher
void MatthiasRefinementsCallback(const boost::shared_ptr< rbt_state_t const > &matthias_refinements)
virtual void statePredictionCallback(const boost::shared_ptr< rbt_state_t const > &predicted_next_state)
Callback for the predictions about the state of this RE level coming from the higher level of the hie...
omip_msgs::ShapeTrackerStates _shape_tracker_meas
static_environment_tracker_t
virtual void _publishPredictedMeasurement() const
Publish the prediction about the next measurement by this RE level.
void DynamicReconfigureCallback(rb_tracker::RBTrackerDynReconfConfig &config, uint32_t level)
Callback for the Dynamic Reconfigure parameters.


rb_tracker
Author(s): Roberto Martín-Martín
autogenerated on Mon Jun 10 2019 14:06:11