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,
143 for (
size_t i =
shapes_.size(); i < num; i++) {
150 else if (num <
shapes_.size()) {
157 if (num >
edges_.size()) {
158 for (
size_t i =
edges_.size(); i < num; i++) {
164 else if (num <
edges_.size())
171 const jsk_recognition_msgs::HumanSkeletonArray::ConstPtr& msg)
174 for (
size_t i = 0; i < msg->skeletons.size(); i++) {
175 line_num = line_num + msg->skeletons[i].bones.size();
180 for (
size_t i = 0; i < msg->skeletons.size(); i++) {
181 for (
size_t j = 0; j < msg->skeletons[i].bones.size(); j++) {
182 jsk_recognition_msgs::Segment edge_msg = msg->skeletons[i].bones[j];
188 geometry_msgs::Pose start_pose_local;
189 geometry_msgs::Pose end_pose_local;
190 start_pose_local.position = edge_msg.start_point;
191 start_pose_local.orientation.w = 1.0;
192 end_pose_local.position = edge_msg.end_point;
193 end_pose_local.orientation.w = 1.0;
195 Ogre::Vector3 start_point;
196 Ogre::Vector3 end_point;
197 Ogre::Quaternion quaternion;
204 "'%s' from frame '%s' to frame '%s'",
205 qPrintable(
getName() ), msg->header.frame_id.c_str(),
209 edge->addPoint(start_point);
210 edge->addPoint(end_point);
213 edge->setColor(color.red() / 255.0,
214 color.green() / 255.0,
215 color.blue() / 255.0,
222 start_shape->setPosition(start_point);
223 start_shape->setScale(scale);
224 start_shape->setOrientation(quaternion);
225 start_shape->setColor(color.red() / 255.0,
226 color.green() / 255.0,
227 color.blue() / 255.0,
229 end_shape->setPosition(end_point);
230 end_shape->setScale(scale);
231 end_shape->setOrientation(quaternion);
232 end_shape->setColor(color.red() / 255.0,
233 color.green() / 255.0,
234 color.blue() / 255.0,
242 const jsk_recognition_msgs::HumanSkeletonArray::ConstPtr& msg)
virtual QColor getColor() const
std::vector< BillboardLinePtr > edges_
HumanSkeletonArrayDisplay()
std::vector< ShapePtr > shapes_
jsk_recognition_msgs::HumanSkeletonArray::ConstPtr latest_msg_
virtual void onInitialize()
PLUGINLIB_EXPORT_CLASS(jsk_rviz_plugins::PictogramArrayDisplay, rviz::Display)
DisplayContext * context_
rviz::ColorProperty * color_property_
virtual void showEdges(const jsk_recognition_msgs::HumanSkeletonArray::ConstPtr &msg)
virtual float getFloat() const
void allocateBillboardLines(int num)
void allocateSpheres(int num)
void processMessage(const jsk_recognition_msgs::HumanSkeletonArray::ConstPtr &msg)
Ogre::SceneNode * scene_node_
rviz::FloatProperty * line_width_property_
virtual void onInitialize()
QColor getColor(size_t index)
virtual void addOption(const QString &option, int value=0)
rviz::FloatProperty * alpha_property_
rviz::EnumProperty * coloring_property_
bool transform(const Header &header, const geometry_msgs::Pose &pose, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
virtual FrameManager * getFrameManager() const =0
std::string coloring_method_
virtual ~HumanSkeletonArrayDisplay()
Ogre::SceneManager * scene_manager_
virtual Ogre::SceneManager * getSceneManager() const =0
virtual int getOptionInt()
virtual QString getName() const