multi_trajectory_visualization.h
Go to the documentation of this file.
1 
26 #ifndef INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_NOISY_FILTERS_MULTI_TRAJECTORY_VISUALIZATION_H_
27 #define INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_NOISY_FILTERS_MULTI_TRAJECTORY_VISUALIZATION_H_
28 
29 #include <ros/node_handle.h>
30 #include <ros/publisher.h>
31 #include <Eigen/Core>
32 #include <visualization_msgs/MarkerArray.h>
33 #include <geometry_msgs/Point.h>
35 
36 namespace stomp_moveit
37 {
38 namespace noisy_filters
39 {
40 
50 {
51 public:
54 
56  virtual bool initialize(moveit::core::RobotModelConstPtr robot_model_ptr,
57  const std::string& group_name,const XmlRpc::XmlRpcValue& config) override;
58 
60  virtual bool configure(const XmlRpc::XmlRpcValue& config) override;
61 
63  virtual bool setMotionPlanRequest(const planning_scene::PlanningSceneConstPtr& planning_scene,
64  const moveit_msgs::MotionPlanRequest &req,
65  const stomp_core::StompConfiguration &config,
66  moveit_msgs::MoveItErrorCodes& error_code) override;
67 
79  virtual bool filter(std::size_t start_timestep,
80  std::size_t num_timesteps,
81  int iteration_number,
82  int rollout_number,
83  Eigen::MatrixXd& parameters,
84  bool& filtered) override;
85 
86 
87  virtual std::string getName() const override
88  {
89  return name_ + "/" + group_name_;
90  }
91 
92  virtual std::string getGroupName() const override
93  {
94  return group_name_;
95  }
96 
97 protected:
98 
99  // identity
100  std::string name_;
101 
102  // robot
103  std::string group_name_;
104  moveit::core::RobotModelConstPtr robot_model_;
105  moveit::core::RobotStatePtr state_;
106 
107  // ros comm
108  ros::NodeHandle nh_;
109  ros::Publisher viz_pub_;
110 
111  // parameters
112  double line_width_;
113  std_msgs::ColorRGBA rgb_;
114  std::string marker_topic_;
115  std::string marker_namespace_;
116 
117  // tool trajectory
118  std::size_t traj_total_;
119  Eigen::MatrixXd tool_traj_line_;
120  visualization_msgs::MarkerArray tool_traj_markers_;
121  visualization_msgs::MarkerArray tool_points_markers_;
122 };
123 
124 } /* namespace filters */
125 } /* namespace stomp_moveit */
126 
127 #endif /* INDUSTRIAL_MOVEIT_STOMP_MOVEIT_INCLUDE_STOMP_MOVEIT_NOISY_FILTERS_MULTI_TRAJECTORY_VISUALIZATION_H_ */
Interface class for filtering noisy trajectories.
Publishes rviz markers to visualize the noisy trajectories.
virtual bool configure(const XmlRpc::XmlRpcValue &config) override
see base class for documentation
This is the base class for all stomp filters.
virtual bool setMotionPlanRequest(const planning_scene::PlanningSceneConstPtr &planning_scene, const moveit_msgs::MotionPlanRequest &req, const stomp_core::StompConfiguration &config, moveit_msgs::MoveItErrorCodes &error_code) override
see base class for documentation
virtual bool filter(std::size_t start_timestep, std::size_t num_timesteps, int iteration_number, int rollout_number, Eigen::MatrixXd &parameters, bool &filtered) override
Creates rviz markers for visualizing the noisy trajectories, it does not change the parameters...
virtual bool initialize(moveit::core::RobotModelConstPtr robot_model_ptr, const std::string &group_name, const XmlRpc::XmlRpcValue &config) override
see base class for documentation


stomp_moveit
Author(s): Jorge Nicho
autogenerated on Fri May 8 2020 03:35:47