6 #ifndef BATCH_VISUALIZER__VISUAL_OBJECT_H
7 #define BATCH_VISUALIZER__VISUAL_OBJECT_H
11 #include <std_msgs/ColorRGBA.h>
12 #include <geometry_msgs/Point.h>
14 #include <mrs_msgs/Path.h>
15 #include <mrs_msgs/TrajectoryReference.h>
17 #define DEFAULT_ELLIPSE_POINTS 64
33 VisualObject(
const Eigen::Vector3d& point,
const double r,
const double g,
const double b,
const double a,
const ros::Duration& timeout,
34 const unsigned long&
id);
37 const unsigned long&
id);
40 const bool filled,
const unsigned long&
id);
43 const bool filled,
const unsigned long&
id);
46 const bool filled,
const unsigned long&
id);
49 const bool filled,
const unsigned long&
id,
const int num_points = DEFAULT_ELLIPSE_POINTS);
52 const bool filled,
const bool capped,
const unsigned long&
id,
const int num_sides = DEFAULT_ELLIPSE_POINTS);
55 const bool filled,
const bool capped,
const unsigned long&
id,
const int num_sides = DEFAULT_ELLIPSE_POINTS);
57 VisualObject(
const mrs_msgs::Path& p,
const double r,
const double g,
const double b,
const double a,
const ros::Duration& timeout,
const bool filled,
58 const unsigned long&
id);
60 VisualObject(
const mrs_msgs::TrajectoryReference& traj,
const double r,
const double g,
const double b,
const double a,
const ros::Duration& timeout,
61 const bool filled,
const unsigned long&
id);
65 unsigned long getID()
const;
67 bool isTimedOut()
const;
69 const std::vector<geometry_msgs::Point> getPoints()
const;
70 const std::vector<std_msgs::ColorRGBA> getColors()
const;
73 return id_ < other.id_;
77 return id_ > other.id_;
81 return id_ == other.id_;
85 const unsigned long id_;
87 std::vector<geometry_msgs::Point> points_;
88 std::vector<std_msgs::ColorRGBA> colors_;
89 ros::Time timeout_time_;
91 void addRay(
const mrs_lib::geometry::Ray& ray,
const double r,
const double g,
const double b,
const double a);
93 void addTriangle(
const mrs_lib::geometry::Triangle& triangle,
const double r,
const double g,
const double b,
const double a,
const bool filled);
95 void addEllipse(
const mrs_lib::geometry::Ellipse& ellipse,
const double r,
const double g,
const double b,
const double a,
const bool filled,
96 const int num_points);