Fawkes API Fawkes Development Version
HumanSkeletonProjectionInterface.h
1
2/***************************************************************************
3 * HumanSkeletonProjectionInterface.h - Fawkes BlackBoard Interface - HumanSkeletonProjectionInterface
4 *
5 * Templated created: Thu Oct 12 10:49:19 2006
6 * Copyright 2007-2011 Tim Niemueller
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24#ifndef _INTERFACES_HUMANSKELETONPROJECTIONINTERFACE_H_
25#define _INTERFACES_HUMANSKELETONPROJECTIONINTERFACE_H_
26
27#include <interface/interface.h>
28#include <interface/message.h>
29#include <interface/field_iterator.h>
30
31namespace fawkes {
32
34{
35 /// @cond INTERNALS
36 INTERFACE_MGMT_FRIENDS(HumanSkeletonProjectionInterface)
37 /// @endcond
38 public:
39 /* constants */
40
41 private:
42 /** Internal data storage, do NOT modify! */
43 typedef struct {
44 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
45 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
46 float horizontal_fov; /**< Opening angle in radians. */
47 float vertical_fov; /**< Opening angle in radians. */
48 uint32_t res_x; /**< X resolution (number of columns in frame). */
49 uint32_t res_y; /**< Y resolution (number of rows in frame). */
50 uint16_t max_depth; /**< Maximum depth value. */
51 float proj_com[2]; /**< Center of mass. */
52 float proj_head[2]; /**< Head position vector. */
53 float proj_neck[2]; /**< Neck position vector. */
54 float proj_torso[2]; /**< Torso position vector. */
55 float proj_waist[2]; /**< Waist position vector. */
56 float proj_left_collar[2]; /**<
57 Left position vector. */
58 float proj_left_shoulder[2]; /**<
59 Left shoulder position vector. */
60 float proj_left_elbow[2]; /**<
61 Left elbow position vector. */
62 float proj_left_wrist[2]; /**<
63 Left wrist position vector. */
64 float proj_left_hand[2]; /**<
65 Left hand position vector. */
66 float proj_left_fingertip[2]; /**<
67 Left fingertip position vector. */
68 float proj_right_collar[2]; /**<
69 Right collar position vector. */
70 float proj_right_shoulder[2]; /**<
71 Right shoulder position vector. */
72 float proj_right_elbow[2]; /**<
73 Right elbow position vector. */
74 float proj_right_wrist[2]; /**<
75 Right wrist position vector. */
76 float proj_right_hand[2]; /**<
77 Right hand position vector. */
78 float proj_right_fingertip[2]; /**<
79 Right fingertip position vector. */
80 float proj_left_hip[2]; /**<
81 Left hip position vector. */
82 float proj_left_knee[2]; /**<
83 Left knee position vector. */
84 float proj_left_ankle[2]; /**<
85 Left ankle position vector. */
86 float proj_left_foot[2]; /**<
87 Left foot position vector. */
88 float proj_right_hip[2]; /**<
89 Right hip position vector. */
90 float proj_right_knee[2]; /**<
91 Right knee position vector. */
92 float proj_right_ankle[2]; /**<
93 Right ankle position vector. */
94 float proj_right_foot[2]; /**<
95 Right foot position vector. */
96 } HumanSkeletonProjectionInterface_data_t;
97
98 HumanSkeletonProjectionInterface_data_t *data;
99
100 public:
101 /* messages */
102 virtual bool message_valid(const Message *message) const;
103 private:
106
107 public:
108 /* Methods */
109 float horizontal_fov() const;
110 void set_horizontal_fov(const float new_horizontal_fov);
111 size_t maxlenof_horizontal_fov() const;
112 float vertical_fov() const;
113 void set_vertical_fov(const float new_vertical_fov);
114 size_t maxlenof_vertical_fov() const;
115 uint32_t res_x() const;
116 void set_res_x(const uint32_t new_res_x);
117 size_t maxlenof_res_x() const;
118 uint32_t res_y() const;
119 void set_res_y(const uint32_t new_res_y);
120 size_t maxlenof_res_y() const;
121 uint16_t max_depth() const;
122 void set_max_depth(const uint16_t new_max_depth);
123 size_t maxlenof_max_depth() const;
124 float * proj_com() const;
125 float proj_com(unsigned int index) const;
126 void set_proj_com(unsigned int index, const float new_proj_com);
127 void set_proj_com(const float * new_proj_com);
128 size_t maxlenof_proj_com() const;
129 float * proj_head() const;
130 float proj_head(unsigned int index) const;
131 void set_proj_head(unsigned int index, const float new_proj_head);
132 void set_proj_head(const float * new_proj_head);
133 size_t maxlenof_proj_head() const;
134 float * proj_neck() const;
135 float proj_neck(unsigned int index) const;
136 void set_proj_neck(unsigned int index, const float new_proj_neck);
137 void set_proj_neck(const float * new_proj_neck);
138 size_t maxlenof_proj_neck() const;
139 float * proj_torso() const;
140 float proj_torso(unsigned int index) const;
141 void set_proj_torso(unsigned int index, const float new_proj_torso);
142 void set_proj_torso(const float * new_proj_torso);
143 size_t maxlenof_proj_torso() const;
144 float * proj_waist() const;
145 float proj_waist(unsigned int index) const;
146 void set_proj_waist(unsigned int index, const float new_proj_waist);
147 void set_proj_waist(const float * new_proj_waist);
148 size_t maxlenof_proj_waist() const;
149 float * proj_left_collar() const;
150 float proj_left_collar(unsigned int index) const;
151 void set_proj_left_collar(unsigned int index, const float new_proj_left_collar);
152 void set_proj_left_collar(const float * new_proj_left_collar);
153 size_t maxlenof_proj_left_collar() const;
154 float * proj_left_shoulder() const;
155 float proj_left_shoulder(unsigned int index) const;
156 void set_proj_left_shoulder(unsigned int index, const float new_proj_left_shoulder);
157 void set_proj_left_shoulder(const float * new_proj_left_shoulder);
158 size_t maxlenof_proj_left_shoulder() const;
159 float * proj_left_elbow() const;
160 float proj_left_elbow(unsigned int index) const;
161 void set_proj_left_elbow(unsigned int index, const float new_proj_left_elbow);
162 void set_proj_left_elbow(const float * new_proj_left_elbow);
163 size_t maxlenof_proj_left_elbow() const;
164 float * proj_left_wrist() const;
165 float proj_left_wrist(unsigned int index) const;
166 void set_proj_left_wrist(unsigned int index, const float new_proj_left_wrist);
167 void set_proj_left_wrist(const float * new_proj_left_wrist);
168 size_t maxlenof_proj_left_wrist() const;
169 float * proj_left_hand() const;
170 float proj_left_hand(unsigned int index) const;
171 void set_proj_left_hand(unsigned int index, const float new_proj_left_hand);
172 void set_proj_left_hand(const float * new_proj_left_hand);
173 size_t maxlenof_proj_left_hand() const;
174 float * proj_left_fingertip() const;
175 float proj_left_fingertip(unsigned int index) const;
176 void set_proj_left_fingertip(unsigned int index, const float new_proj_left_fingertip);
177 void set_proj_left_fingertip(const float * new_proj_left_fingertip);
178 size_t maxlenof_proj_left_fingertip() const;
179 float * proj_right_collar() const;
180 float proj_right_collar(unsigned int index) const;
181 void set_proj_right_collar(unsigned int index, const float new_proj_right_collar);
182 void set_proj_right_collar(const float * new_proj_right_collar);
183 size_t maxlenof_proj_right_collar() const;
184 float * proj_right_shoulder() const;
185 float proj_right_shoulder(unsigned int index) const;
186 void set_proj_right_shoulder(unsigned int index, const float new_proj_right_shoulder);
187 void set_proj_right_shoulder(const float * new_proj_right_shoulder);
188 size_t maxlenof_proj_right_shoulder() const;
189 float * proj_right_elbow() const;
190 float proj_right_elbow(unsigned int index) const;
191 void set_proj_right_elbow(unsigned int index, const float new_proj_right_elbow);
192 void set_proj_right_elbow(const float * new_proj_right_elbow);
193 size_t maxlenof_proj_right_elbow() const;
194 float * proj_right_wrist() const;
195 float proj_right_wrist(unsigned int index) const;
196 void set_proj_right_wrist(unsigned int index, const float new_proj_right_wrist);
197 void set_proj_right_wrist(const float * new_proj_right_wrist);
198 size_t maxlenof_proj_right_wrist() const;
199 float * proj_right_hand() const;
200 float proj_right_hand(unsigned int index) const;
201 void set_proj_right_hand(unsigned int index, const float new_proj_right_hand);
202 void set_proj_right_hand(const float * new_proj_right_hand);
203 size_t maxlenof_proj_right_hand() const;
204 float * proj_right_fingertip() const;
205 float proj_right_fingertip(unsigned int index) const;
206 void set_proj_right_fingertip(unsigned int index, const float new_proj_right_fingertip);
207 void set_proj_right_fingertip(const float * new_proj_right_fingertip);
208 size_t maxlenof_proj_right_fingertip() const;
209 float * proj_left_hip() const;
210 float proj_left_hip(unsigned int index) const;
211 void set_proj_left_hip(unsigned int index, const float new_proj_left_hip);
212 void set_proj_left_hip(const float * new_proj_left_hip);
213 size_t maxlenof_proj_left_hip() const;
214 float * proj_left_knee() const;
215 float proj_left_knee(unsigned int index) const;
216 void set_proj_left_knee(unsigned int index, const float new_proj_left_knee);
217 void set_proj_left_knee(const float * new_proj_left_knee);
218 size_t maxlenof_proj_left_knee() const;
219 float * proj_left_ankle() const;
220 float proj_left_ankle(unsigned int index) const;
221 void set_proj_left_ankle(unsigned int index, const float new_proj_left_ankle);
222 void set_proj_left_ankle(const float * new_proj_left_ankle);
223 size_t maxlenof_proj_left_ankle() const;
224 float * proj_left_foot() const;
225 float proj_left_foot(unsigned int index) const;
226 void set_proj_left_foot(unsigned int index, const float new_proj_left_foot);
227 void set_proj_left_foot(const float * new_proj_left_foot);
228 size_t maxlenof_proj_left_foot() const;
229 float * proj_right_hip() const;
230 float proj_right_hip(unsigned int index) const;
231 void set_proj_right_hip(unsigned int index, const float new_proj_right_hip);
232 void set_proj_right_hip(const float * new_proj_right_hip);
233 size_t maxlenof_proj_right_hip() const;
234 float * proj_right_knee() const;
235 float proj_right_knee(unsigned int index) const;
236 void set_proj_right_knee(unsigned int index, const float new_proj_right_knee);
237 void set_proj_right_knee(const float * new_proj_right_knee);
238 size_t maxlenof_proj_right_knee() const;
239 float * proj_right_ankle() const;
240 float proj_right_ankle(unsigned int index) const;
241 void set_proj_right_ankle(unsigned int index, const float new_proj_right_ankle);
242 void set_proj_right_ankle(const float * new_proj_right_ankle);
243 size_t maxlenof_proj_right_ankle() const;
244 float * proj_right_foot() const;
245 float proj_right_foot(unsigned int index) const;
246 void set_proj_right_foot(unsigned int index, const float new_proj_right_foot);
247 void set_proj_right_foot(const float * new_proj_right_foot);
248 size_t maxlenof_proj_right_foot() const;
249 virtual Message * create_message(const char *type) const;
250
251 virtual void copy_values(const Interface *other);
252 virtual const char * enum_tostring(const char *enumtype, int val) const;
253
254};
255
256} // end namespace fawkes
257
258#endif
HumanSkeletonProjectionInterface Fawkes BlackBoard Interface.
size_t maxlenof_proj_left_hip() const
Get maximum length of proj_left_hip value.
size_t maxlenof_res_x() const
Get maximum length of res_x value.
size_t maxlenof_proj_right_hand() const
Get maximum length of proj_right_hand value.
float * proj_left_ankle() const
Get proj_left_ankle value.
float * proj_right_ankle() const
Get proj_right_ankle value.
size_t maxlenof_proj_left_fingertip() const
Get maximum length of proj_left_fingertip value.
size_t maxlenof_proj_right_wrist() const
Get maximum length of proj_right_wrist value.
void set_res_y(const uint32_t new_res_y)
Set res_y value.
void set_proj_com(unsigned int index, const float new_proj_com)
Set proj_com value at given index.
void set_proj_left_elbow(unsigned int index, const float new_proj_left_elbow)
Set proj_left_elbow value at given index.
size_t maxlenof_max_depth() const
Get maximum length of max_depth value.
float * proj_right_hip() const
Get proj_right_hip value.
float * proj_left_knee() const
Get proj_left_knee value.
size_t maxlenof_proj_left_ankle() const
Get maximum length of proj_left_ankle value.
size_t maxlenof_proj_head() const
Get maximum length of proj_head value.
float * proj_left_collar() const
Get proj_left_collar value.
float * proj_left_fingertip() const
Get proj_left_fingertip value.
void set_horizontal_fov(const float new_horizontal_fov)
Set horizontal_fov value.
void set_proj_right_ankle(unsigned int index, const float new_proj_right_ankle)
Set proj_right_ankle value at given index.
void set_proj_left_wrist(unsigned int index, const float new_proj_left_wrist)
Set proj_left_wrist value at given index.
size_t maxlenof_proj_left_foot() const
Get maximum length of proj_left_foot value.
void set_proj_neck(unsigned int index, const float new_proj_neck)
Set proj_neck value at given index.
size_t maxlenof_proj_waist() const
Get maximum length of proj_waist value.
void set_proj_left_hip(unsigned int index, const float new_proj_left_hip)
Set proj_left_hip value at given index.
size_t maxlenof_proj_torso() const
Get maximum length of proj_torso value.
void set_res_x(const uint32_t new_res_x)
Set res_x value.
size_t maxlenof_proj_left_hand() const
Get maximum length of proj_left_hand value.
void set_proj_torso(unsigned int index, const float new_proj_torso)
Set proj_torso value at given index.
size_t maxlenof_proj_right_elbow() const
Get maximum length of proj_right_elbow value.
size_t maxlenof_proj_neck() const
Get maximum length of proj_neck value.
void set_proj_right_hand(unsigned int index, const float new_proj_right_hand)
Set proj_right_hand value at given index.
float * proj_right_wrist() const
Get proj_right_wrist value.
size_t maxlenof_proj_right_knee() const
Get maximum length of proj_right_knee value.
void set_proj_left_fingertip(unsigned int index, const float new_proj_left_fingertip)
Set proj_left_fingertip value at given index.
size_t maxlenof_proj_left_collar() const
Get maximum length of proj_left_collar value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
float * proj_left_elbow() const
Get proj_left_elbow value.
void set_proj_left_shoulder(unsigned int index, const float new_proj_left_shoulder)
Set proj_left_shoulder value at given index.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
void set_proj_left_ankle(unsigned int index, const float new_proj_left_ankle)
Set proj_left_ankle value at given index.
float * proj_left_foot() const
Get proj_left_foot value.
float * proj_right_collar() const
Get proj_right_collar value.
size_t maxlenof_res_y() const
Get maximum length of res_y value.
void set_proj_right_knee(unsigned int index, const float new_proj_right_knee)
Set proj_right_knee value at given index.
size_t maxlenof_proj_right_fingertip() const
Get maximum length of proj_right_fingertip value.
void set_proj_right_wrist(unsigned int index, const float new_proj_right_wrist)
Set proj_right_wrist value at given index.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
size_t maxlenof_vertical_fov() const
Get maximum length of vertical_fov value.
size_t maxlenof_proj_com() const
Get maximum length of proj_com value.
size_t maxlenof_proj_left_knee() const
Get maximum length of proj_left_knee value.
float * proj_right_shoulder() const
Get proj_right_shoulder value.
void set_max_depth(const uint16_t new_max_depth)
Set max_depth value.
float * proj_right_elbow() const
Get proj_right_elbow value.
void set_proj_right_shoulder(unsigned int index, const float new_proj_right_shoulder)
Set proj_right_shoulder value at given index.
float * proj_left_hand() const
Get proj_left_hand value.
void set_vertical_fov(const float new_vertical_fov)
Set vertical_fov value.
float * proj_right_foot() const
Get proj_right_foot value.
size_t maxlenof_proj_left_shoulder() const
Get maximum length of proj_left_shoulder value.
void set_proj_left_foot(unsigned int index, const float new_proj_left_foot)
Set proj_left_foot value at given index.
float * proj_left_hip() const
Get proj_left_hip value.
void set_proj_right_foot(unsigned int index, const float new_proj_right_foot)
Set proj_right_foot value at given index.
virtual Message * create_message(const char *type) const
Create message based on type name.
size_t maxlenof_proj_right_hip() const
Get maximum length of proj_right_hip value.
void set_proj_left_knee(unsigned int index, const float new_proj_left_knee)
Set proj_left_knee value at given index.
void set_proj_right_hip(unsigned int index, const float new_proj_right_hip)
Set proj_right_hip value at given index.
float * proj_left_wrist() const
Get proj_left_wrist value.
void set_proj_left_collar(unsigned int index, const float new_proj_left_collar)
Set proj_left_collar value at given index.
size_t maxlenof_proj_right_ankle() const
Get maximum length of proj_right_ankle value.
float * proj_left_shoulder() const
Get proj_left_shoulder value.
size_t maxlenof_proj_left_wrist() const
Get maximum length of proj_left_wrist value.
size_t maxlenof_proj_right_collar() const
Get maximum length of proj_right_collar value.
void set_proj_right_fingertip(unsigned int index, const float new_proj_right_fingertip)
Set proj_right_fingertip value at given index.
void set_proj_right_elbow(unsigned int index, const float new_proj_right_elbow)
Set proj_right_elbow value at given index.
void set_proj_waist(unsigned int index, const float new_proj_waist)
Set proj_waist value at given index.
size_t maxlenof_proj_right_foot() const
Get maximum length of proj_right_foot value.
float * proj_right_fingertip() const
Get proj_right_fingertip value.
float * proj_right_knee() const
Get proj_right_knee value.
size_t maxlenof_horizontal_fov() const
Get maximum length of horizontal_fov value.
void set_proj_right_collar(unsigned int index, const float new_proj_right_collar)
Set proj_right_collar value at given index.
void set_proj_head(unsigned int index, const float new_proj_head)
Set proj_head value at given index.
float horizontal_fov() const
Get horizontal_fov value.
size_t maxlenof_proj_right_shoulder() const
Get maximum length of proj_right_shoulder value.
size_t maxlenof_proj_left_elbow() const
Get maximum length of proj_left_elbow value.
float * proj_right_hand() const
Get proj_right_hand value.
void set_proj_left_hand(unsigned int index, const float new_proj_left_hand)
Set proj_left_hand value at given index.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
const char * type() const
Get type of interface.
Definition: interface.cpp:652
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
Fawkes library namespace.