Initialize std::vector of filters::FilterChain in class constructor
I would like to be able to use a std::vector<filters::FilterChain<double>>
in my class. Having defined std::vector<filters::FilterChain<double>> vector_filters
in my class header as private variable, how do I initialize this in my class constructor?
The problem is that ROS's filters::FilterChain<double>
does not have a default constructor.
Thank you so much in advance.
Use
std::shared_ptr
?@gvdhoorn You mean using
std::shared_ptr<std::vector<filters::FilterChain<double>>> vector_filters;
?No. Make a vector of
std::shared_ptr
of filters.