multi_trajectory_visualization.h
Go to the documentation of this file.
00001 
00026 #ifndef INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_NOISY_FILTERS_MULTI_TRAJECTORY_VISUALIZATION_H_
00027 #define INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_NOISY_FILTERS_MULTI_TRAJECTORY_VISUALIZATION_H_
00028 
00029 #include <ros/node_handle.h>
00030 #include <ros/publisher.h>
00031 #include <Eigen/Core>
00032 #include <visualization_msgs/MarkerArray.h>
00033 #include <geometry_msgs/Point.h>
00034 #include <stomp_moveit/noisy_filters/stomp_noisy_filter.h>
00035 
00036 namespace stomp_moveit
00037 {
00038 namespace noisy_filters
00039 {
00040 
00049 class MultiTrajectoryVisualization : public StompNoisyFilter
00050 {
00051 public:
00052   MultiTrajectoryVisualization();
00053   virtual ~MultiTrajectoryVisualization();
00054 
00056   virtual bool initialize(moveit::core::RobotModelConstPtr robot_model_ptr,
00057                           const std::string& group_name,const XmlRpc::XmlRpcValue& config) override;
00058 
00060   virtual bool configure(const XmlRpc::XmlRpcValue& config) override;
00061 
00063   virtual bool setMotionPlanRequest(const planning_scene::PlanningSceneConstPtr& planning_scene,
00064                    const moveit_msgs::MotionPlanRequest &req,
00065                    const stomp_core::StompConfiguration &config,
00066                    moveit_msgs::MoveItErrorCodes& error_code) override;
00067 
00079   virtual bool filter(std::size_t start_timestep,
00080                       std::size_t num_timesteps,
00081                       int iteration_number,
00082                       int rollout_number,
00083                       Eigen::MatrixXd& parameters,
00084                       bool& filtered) override;
00085 
00086 
00087   virtual std::string getName() const override
00088   {
00089     return name_ + "/" + group_name_;
00090   }
00091 
00092   virtual std::string getGroupName() const override
00093   {
00094     return group_name_;
00095   }
00096 
00097 protected:
00098 
00099   // identity
00100   std::string name_;
00101 
00102   // robot
00103   std::string group_name_;
00104   moveit::core::RobotModelConstPtr robot_model_;
00105   moveit::core::RobotStatePtr state_;
00106 
00107   // ros comm
00108   ros::NodeHandle nh_;
00109   ros::Publisher viz_pub_;
00110 
00111   // parameters
00112   double line_width_;
00113   std_msgs::ColorRGBA rgb_;
00114   std::string marker_topic_;
00115   std::string marker_namespace_;
00116 
00117   // tool trajectory
00118   std::size_t traj_total_;
00119   Eigen::MatrixXd tool_traj_line_;
00120   visualization_msgs::MarkerArray tool_traj_markers_;
00121   visualization_msgs::MarkerArray tool_points_markers_;
00122 };
00123 
00124 } /* namespace filters */
00125 } /* namespace stomp_moveit */
00126 
00127 #endif /* INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_NOISY_FILTERS_MULTI_TRAJECTORY_VISUALIZATION_H_ */


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