00001 /* 00002 * MathExpressionFilter.hpp 00003 * 00004 * Created on: Aug 16, 2017 00005 * Author: Peter Fankhauser 00006 * Institute: ETH Zurich, ANYbotics 00007 */ 00008 00009 #pragma once 00010 00011 #include "EigenLab/EigenLab.h" 00012 00013 #include <filters/filter_base.h> 00014 00015 #include <string> 00016 00017 namespace grid_map { 00018 00022 template<typename T> 00023 class MathExpressionFilter : public filters::FilterBase<T> 00024 { 00025 00026 public: 00030 MathExpressionFilter(); 00031 00035 virtual ~MathExpressionFilter(); 00036 00040 virtual bool configure(); 00041 00047 virtual bool update(const T& mapIn, T& mapOut); 00048 00049 private: 00051 EigenLab::Parser<Eigen::MatrixXf> parser_; 00052 00054 std::string expression_; 00055 00057 std::string outputLayer_; 00058 }; 00059 00060 } /* namespace */