update_logger.h
Go to the documentation of this file.
00001 
00026 #ifndef INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_UPDATE_FILTERS_UPDATE_LOGGER_H_
00027 #define INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_UPDATE_FILTERS_UPDATE_LOGGER_H_
00028 
00029 #include <stomp_moveit/update_filters/stomp_update_filter.h>
00030 #include <fstream>
00031 
00032 namespace stomp_moveit
00033 {
00034 namespace update_filters
00035 {
00036 
00047 class UpdateLogger : public StompUpdateFilter
00048 {
00049 public:
00050   UpdateLogger();
00051   virtual ~UpdateLogger();
00052 
00054   virtual bool initialize(moveit::core::RobotModelConstPtr robot_model_ptr,
00055                           const std::string& group_name,const XmlRpc::XmlRpcValue& config);
00056 
00058   virtual bool configure(const XmlRpc::XmlRpcValue& config);
00059 
00061   virtual bool setMotionPlanRequest(const planning_scene::PlanningSceneConstPtr& planning_scene,
00062                    const moveit_msgs::MotionPlanRequest &req,
00063                    const stomp_core::StompConfiguration &config,
00064                    moveit_msgs::MoveItErrorCodes& error_code);
00065 
00077   virtual bool filter(std::size_t start_timestep,
00078                       std::size_t num_timesteps,
00079                       int iteration_number,
00080                       const Eigen::MatrixXd& parameters,
00081                       Eigen::MatrixXd& updates,
00082                       bool& filtered) override;
00083 
00084   virtual std::string getGroupName() const override
00085   {
00086     return group_name_;
00087   }
00088 
00089   virtual std::string getName() const override
00090   {
00091     return name_ + "/" + group_name_;
00092   }
00093 
00094   virtual void done(bool success, int total_iterations,double final_cost,const Eigen::MatrixXd& parameters) override;
00095 
00096 protected:
00097 
00098   std::string name_;
00099   std::string group_name_;
00100 
00101   // parameters
00102   std::string filename_;
00103   std::string package_;
00104   std::string directory_;
00105 
00106   // config
00107   stomp_core::StompConfiguration stomp_config_;
00108 
00109   // logging
00110   std::stringstream stream_;
00111   std::string full_file_name_;
00112   std::ofstream file_stream_;
00113   Eigen::IOFormat format_;
00114 
00115 };
00116 
00117 } /* namespace smoothers */
00118 } /* namespace stomp_moveit */
00119 
00120 #endif /* INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_UPDATE_FILTERS_UPDATE_LOGGER_H_ */


stomp_moveit
Author(s): Jorge Nicho
autogenerated on Sat Jun 8 2019 19:24:01