36 #include <jsk_topic_tools/color_utils.h>
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",
72 std_msgs::ColorRGBA ros_color = jsk_topic_tools::colorCategory20(index);
73 return QColor(ros_color.r * 255.0,
143 for (
size_t i =
shapes_.size(); i <
num; i++) {
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)