49 "color", QColor(25, 255, 0),
50 "color to draw the edges",
54 "alpha value to draw the edges",
58 "line width of the edges",
73 return QColor(ros_color.r * 255.0,
81 return QColor(255, 255, 255, 255);
144 if (num >
edges_.size()) {
145 for (
size_t i =
edges_.size(); i < num; i++) {
151 else if (num <
edges_.size())
158 const jsk_recognition_msgs::SegmentArray::ConstPtr& msg)
161 for (
size_t i = 0; i < msg->segments.size(); i++) {
162 jsk_recognition_msgs::Segment edge_msg = msg->segments[i];
167 geometry_msgs::Pose start_pose_local;
168 geometry_msgs::Pose end_pose_local;
169 start_pose_local.position = edge_msg.start_point;
170 start_pose_local.orientation.w = 1.0;
171 end_pose_local.position = edge_msg.end_point;
172 end_pose_local.orientation.w = 1.0;
174 Ogre::Vector3 start_point;
175 Ogre::Vector3 end_point;
176 Ogre::Quaternion quaternion;
183 "'%s' from frame '%s' to frame '%s'",
184 qPrintable(
getName() ), msg->header.frame_id.c_str(),
188 edge->addPoint(start_point);
189 edge->addPoint(end_point);
192 edge->setColor(color.red() / 255.0,
193 color.green() / 255.0,
194 color.blue() / 255.0,
200 const jsk_recognition_msgs::SegmentArray::ConstPtr& msg)
virtual QColor getColor() const
rviz::ColorProperty * color_property_
void processMessage(const jsk_recognition_msgs::SegmentArray::ConstPtr &msg)
virtual void onInitialize()
PLUGINLIB_EXPORT_CLASS(jsk_rviz_plugins::PictogramArrayDisplay, rviz::Display)
DisplayContext * context_
rviz::FloatProperty * alpha_property_
std::vector< BillboardLinePtr > edges_
virtual float getFloat() const
rviz::EnumProperty * coloring_property_
virtual void onInitialize()
Ogre::SceneNode * scene_node_
std::string coloring_method_
virtual void addOption(const QString &option, int value=0)
void allocateBillboardLines(int num)
jsk_recognition_msgs::SegmentArray::ConstPtr latest_msg_
virtual void showEdges(const jsk_recognition_msgs::SegmentArray::ConstPtr &msg)
bool transform(const Header &header, const geometry_msgs::Pose &pose, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
virtual FrameManager * getFrameManager() const =0
Ogre::SceneManager * scene_manager_
virtual Ogre::SceneManager * getSceneManager() const =0
rviz::FloatProperty * line_width_property_
virtual ~SegmentArrayDisplay()
virtual int getOptionInt()
QColor getColor(size_t index)
virtual QString getName() const