Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit d601443

Browse files
committed
Tracking node working correctly (birth/death lifecycle can still be tuned)
1 parent 90593da commit d601443

File tree

35 files changed

+519
-748
lines changed

35 files changed

+519
-748
lines changed

ros_ws/devel/include/detection/Detection.h

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ struct Detection_
2828
, y(0.0)
2929
, w(0.0)
3030
, h(0.0)
31-
, cls(0)
32-
, confidence(0.0) {
31+
, clss(0)
32+
, score(0.0) {
3333
}
3434
Detection_(const ContainerAllocator& _alloc)
3535
: x(0.0)
3636
, y(0.0)
3737
, w(0.0)
3838
, h(0.0)
39-
, cls(0)
40-
, confidence(0.0) {
39+
, clss(0)
40+
, score(0.0) {
4141
(void)_alloc;
4242
}
4343

@@ -55,11 +55,11 @@ struct Detection_
5555
typedef float _h_type;
5656
_h_type h;
5757

58-
typedef uint8_t _cls_type;
59-
_cls_type cls;
58+
typedef uint8_t _clss_type;
59+
_clss_type clss;
6060

61-
typedef float _confidence_type;
62-
_confidence_type confidence;
61+
typedef float _score_type;
62+
_score_type score;
6363

6464

6565

@@ -94,8 +94,8 @@ bool operator==(const ::detection::Detection_<ContainerAllocator1> & lhs, const
9494
lhs.y == rhs.y &&
9595
lhs.w == rhs.w &&
9696
lhs.h == rhs.h &&
97-
lhs.cls == rhs.cls &&
98-
lhs.confidence == rhs.confidence;
97+
lhs.clss == rhs.clss &&
98+
lhs.score == rhs.score;
9999
}
100100

101101
template<typename ContainerAllocator1, typename ContainerAllocator2>
@@ -152,12 +152,12 @@ struct MD5Sum< ::detection::Detection_<ContainerAllocator> >
152152
{
153153
static const char* value()
154154
{
155-
return "b6ef12160302895f4532528b12bd7ec3";
155+
return "605d6371c30b664ec10c76dcf5a9542d";
156156
}
157157

158158
static const char* value(const ::detection::Detection_<ContainerAllocator>&) { return value(); }
159-
static const uint64_t static_value1 = 0xb6ef12160302895fULL;
160-
static const uint64_t static_value2 = 0x4532528b12bd7ec3ULL;
159+
static const uint64_t static_value1 = 0x605d6371c30b664eULL;
160+
static const uint64_t static_value2 = 0xc10c76dcf5a9542dULL;
161161
};
162162

163163
template<class ContainerAllocator>
@@ -179,23 +179,16 @@ struct Definition< ::detection::Detection_<ContainerAllocator> >
179179
return "# Detection.msg\n"
180180
"## Bounding box with class and confidence\n"
181181
"\n"
182-
"# Constants\n"
183-
"\n"
184-
"# TODO\n"
185-
"# uint8 car\n"
186-
"# uint8 armor_module\n"
187-
"# ...\n"
188-
"\n"
189182
"# Bounding box\n"
190183
"float32 x\n"
191184
"float32 y\n"
192185
"float32 w\n"
193186
"float32 h\n"
194187
"\n"
195188
"# class\n"
196-
"uint8 cls\n"
189+
"uint8 clss\n"
197190
"\n"
198-
"float32 confidence\n"
191+
"float32 score\n"
199192
;
200193
}
201194

@@ -218,8 +211,8 @@ namespace serialization
218211
stream.next(m.y);
219212
stream.next(m.w);
220213
stream.next(m.h);
221-
stream.next(m.cls);
222-
stream.next(m.confidence);
214+
stream.next(m.clss);
215+
stream.next(m.score);
223216
}
224217

225218
ROS_DECLARE_ALLINONE_SERIALIZER
@@ -246,10 +239,10 @@ struct Printer< ::detection::Detection_<ContainerAllocator> >
246239
Printer<float>::stream(s, indent + " ", v.w);
247240
s << indent << "h: ";
248241
Printer<float>::stream(s, indent + " ", v.h);
249-
s << indent << "cls: ";
250-
Printer<uint8_t>::stream(s, indent + " ", v.cls);
251-
s << indent << "confidence: ";
252-
Printer<float>::stream(s, indent + " ", v.confidence);
242+
s << indent << "clss: ";
243+
Printer<uint8_t>::stream(s, indent + " ", v.clss);
244+
s << indent << "score: ";
245+
Printer<float>::stream(s, indent + " ", v.score);
253246
}
254247
};
255248

ros_ws/devel/include/detection/Detections.h

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ struct Detections_
2525
typedef Detections_<ContainerAllocator> Type;
2626

2727
Detections_()
28-
: detections()
29-
, timelapse(0) {
28+
: detections() {
3029
}
3130
Detections_(const ContainerAllocator& _alloc)
32-
: detections(_alloc)
33-
, timelapse(0) {
31+
: detections(_alloc) {
3432
(void)_alloc;
3533
}
3634

@@ -39,9 +37,6 @@ struct Detections_
3937
typedef std::vector< ::detection::Detection_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::detection::Detection_<ContainerAllocator> >::other > _detections_type;
4038
_detections_type detections;
4139

42-
typedef uint32_t _timelapse_type;
43-
_timelapse_type timelapse;
44-
4540

4641

4742

@@ -71,8 +66,7 @@ return s;
7166
template<typename ContainerAllocator1, typename ContainerAllocator2>
7267
bool operator==(const ::detection::Detections_<ContainerAllocator1> & lhs, const ::detection::Detections_<ContainerAllocator2> & rhs)
7368
{
74-
return lhs.detections == rhs.detections &&
75-
lhs.timelapse == rhs.timelapse;
69+
return lhs.detections == rhs.detections;
7670
}
7771

7872
template<typename ContainerAllocator1, typename ContainerAllocator2>
@@ -129,12 +123,12 @@ struct MD5Sum< ::detection::Detections_<ContainerAllocator> >
129123
{
130124
static const char* value()
131125
{
132-
return "5a80ac5cf722ceea32bf50e93318cacc";
126+
return "cafb60d89a040a540def8d31f5cdc037";
133127
}
134128

135129
static const char* value(const ::detection::Detections_<ContainerAllocator>&) { return value(); }
136-
static const uint64_t static_value1 = 0x5a80ac5cf722ceeaULL;
137-
static const uint64_t static_value2 = 0x32bf50e93318caccULL;
130+
static const uint64_t static_value1 = 0xcafb60d89a040a54ULL;
131+
static const uint64_t static_value2 = 0x0def8d31f5cdc037ULL;
138132
};
139133

140134
template<class ContainerAllocator>
@@ -158,30 +152,21 @@ struct Definition< ::detection::Detections_<ContainerAllocator> >
158152
"\n"
159153
"# Header header\n"
160154
"Detection[] detections\n"
161-
"\n"
162-
"uint32 timelapse\n"
163155
"================================================================================\n"
164156
"MSG: detection/Detection\n"
165157
"# Detection.msg\n"
166158
"## Bounding box with class and confidence\n"
167159
"\n"
168-
"# Constants\n"
169-
"\n"
170-
"# TODO\n"
171-
"# uint8 car\n"
172-
"# uint8 armor_module\n"
173-
"# ...\n"
174-
"\n"
175160
"# Bounding box\n"
176161
"float32 x\n"
177162
"float32 y\n"
178163
"float32 w\n"
179164
"float32 h\n"
180165
"\n"
181166
"# class\n"
182-
"uint8 cls\n"
167+
"uint8 clss\n"
183168
"\n"
184-
"float32 confidence\n"
169+
"float32 score\n"
185170
;
186171
}
187172

@@ -201,7 +186,6 @@ namespace serialization
201186
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
202187
{
203188
stream.next(m.detections);
204-
stream.next(m.timelapse);
205189
}
206190

207191
ROS_DECLARE_ALLINONE_SERIALIZER
@@ -228,8 +212,6 @@ struct Printer< ::detection::Detections_<ContainerAllocator> >
228212
s << indent;
229213
Printer< ::detection::Detection_<ContainerAllocator> >::stream(s, indent + " ", v.detections[i]);
230214
}
231-
s << indent << "timelapse: ";
232-
Printer<uint32_t>::stream(s, indent + " ", v.timelapse);
233215
}
234216
};
235217

ros_ws/devel/include/tracking/Tracklet.h

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,30 @@ struct Tracklet_
2424
typedef Tracklet_<ContainerAllocator> Type;
2525

2626
Tracklet_()
27-
: x(0.0)
27+
: id(0)
28+
, x(0.0)
2829
, y(0.0)
2930
, w(0.0)
3031
, h(0.0)
31-
, cls(0)
32-
, confidence(0.0) {
32+
, clss(0)
33+
, score(0.0) {
3334
}
3435
Tracklet_(const ContainerAllocator& _alloc)
35-
: x(0.0)
36+
: id(0)
37+
, x(0.0)
3638
, y(0.0)
3739
, w(0.0)
3840
, h(0.0)
39-
, cls(0)
40-
, confidence(0.0) {
41+
, clss(0)
42+
, score(0.0) {
4143
(void)_alloc;
4244
}
4345

4446

4547

48+
typedef uint8_t _id_type;
49+
_id_type id;
50+
4651
typedef float _x_type;
4752
_x_type x;
4853

@@ -55,11 +60,11 @@ struct Tracklet_
5560
typedef float _h_type;
5661
_h_type h;
5762

58-
typedef uint8_t _cls_type;
59-
_cls_type cls;
63+
typedef uint8_t _clss_type;
64+
_clss_type clss;
6065

61-
typedef float _confidence_type;
62-
_confidence_type confidence;
66+
typedef float _score_type;
67+
_score_type score;
6368

6469

6570

@@ -90,12 +95,13 @@ return s;
9095
template<typename ContainerAllocator1, typename ContainerAllocator2>
9196
bool operator==(const ::tracking::Tracklet_<ContainerAllocator1> & lhs, const ::tracking::Tracklet_<ContainerAllocator2> & rhs)
9297
{
93-
return lhs.x == rhs.x &&
98+
return lhs.id == rhs.id &&
99+
lhs.x == rhs.x &&
94100
lhs.y == rhs.y &&
95101
lhs.w == rhs.w &&
96102
lhs.h == rhs.h &&
97-
lhs.cls == rhs.cls &&
98-
lhs.confidence == rhs.confidence;
103+
lhs.clss == rhs.clss &&
104+
lhs.score == rhs.score;
99105
}
100106

101107
template<typename ContainerAllocator1, typename ContainerAllocator2>
@@ -152,12 +158,12 @@ struct MD5Sum< ::tracking::Tracklet_<ContainerAllocator> >
152158
{
153159
static const char* value()
154160
{
155-
return "b6ef12160302895f4532528b12bd7ec3";
161+
return "59fcd37fcd586a2228c557986fc973a2";
156162
}
157163

158164
static const char* value(const ::tracking::Tracklet_<ContainerAllocator>&) { return value(); }
159-
static const uint64_t static_value1 = 0xb6ef12160302895fULL;
160-
static const uint64_t static_value2 = 0x4532528b12bd7ec3ULL;
165+
static const uint64_t static_value1 = 0x59fcd37fcd586a22ULL;
166+
static const uint64_t static_value2 = 0x28c557986fc973a2ULL;
161167
};
162168

163169
template<class ContainerAllocator>
@@ -179,12 +185,8 @@ struct Definition< ::tracking::Tracklet_<ContainerAllocator> >
179185
return "# Tracklet.msg\n"
180186
"## Bounding box with class\n"
181187
"\n"
182-
"# Constants\n"
183-
"\n"
184-
"# TODO\n"
185-
"# uint8 car\n"
186-
"# uint8 armor_module\n"
187-
"# ...\n"
188+
"# ID\n"
189+
"uint8 id\n"
188190
"\n"
189191
"# Bounding box\n"
190192
"float32 x\n"
@@ -193,9 +195,9 @@ struct Definition< ::tracking::Tracklet_<ContainerAllocator> >
193195
"float32 h\n"
194196
"\n"
195197
"# class\n"
196-
"uint8 cls\n"
198+
"uint8 clss\n"
197199
"\n"
198-
"float32 confidence\n"
200+
"float32 score\n"
199201
;
200202
}
201203

@@ -214,12 +216,13 @@ namespace serialization
214216
{
215217
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
216218
{
219+
stream.next(m.id);
217220
stream.next(m.x);
218221
stream.next(m.y);
219222
stream.next(m.w);
220223
stream.next(m.h);
221-
stream.next(m.cls);
222-
stream.next(m.confidence);
224+
stream.next(m.clss);
225+
stream.next(m.score);
223226
}
224227

225228
ROS_DECLARE_ALLINONE_SERIALIZER
@@ -238,6 +241,8 @@ struct Printer< ::tracking::Tracklet_<ContainerAllocator> >
238241
{
239242
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::tracking::Tracklet_<ContainerAllocator>& v)
240243
{
244+
s << indent << "id: ";
245+
Printer<uint8_t>::stream(s, indent + " ", v.id);
241246
s << indent << "x: ";
242247
Printer<float>::stream(s, indent + " ", v.x);
243248
s << indent << "y: ";
@@ -246,10 +251,10 @@ struct Printer< ::tracking::Tracklet_<ContainerAllocator> >
246251
Printer<float>::stream(s, indent + " ", v.w);
247252
s << indent << "h: ";
248253
Printer<float>::stream(s, indent + " ", v.h);
249-
s << indent << "cls: ";
250-
Printer<uint8_t>::stream(s, indent + " ", v.cls);
251-
s << indent << "confidence: ";
252-
Printer<float>::stream(s, indent + " ", v.confidence);
254+
s << indent << "clss: ";
255+
Printer<uint8_t>::stream(s, indent + " ", v.clss);
256+
s << indent << "score: ";
257+
Printer<float>::stream(s, indent + " ", v.score);
253258
}
254259
};
255260

0 commit comments

Comments
 (0)