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

Commit 90593da

Browse files
committed
Track by class
1 parent 65ec0ad commit 90593da

File tree

15 files changed

+124
-368
lines changed

15 files changed

+124
-368
lines changed

ros_ws/devel/include/tracking/Tracklets.h

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <ros/builtin_message_traits.h>
1616
#include <ros/message_operations.h>
1717

18-
#include <std_msgs/Header.h>
1918
#include <tracking/Tracklet.h>
2019

2120
namespace tracking
@@ -26,20 +25,15 @@ struct Tracklets_
2625
typedef Tracklets_<ContainerAllocator> Type;
2726

2827
Tracklets_()
29-
: header()
30-
, tracklets() {
28+
: tracklets() {
3129
}
3230
Tracklets_(const ContainerAllocator& _alloc)
33-
: header(_alloc)
34-
, tracklets(_alloc) {
31+
: tracklets(_alloc) {
3532
(void)_alloc;
3633
}
3734

3835

3936

40-
typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
41-
_header_type header;
42-
4337
typedef std::vector< ::tracking::Tracklet_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::tracking::Tracklet_<ContainerAllocator> >::other > _tracklets_type;
4438
_tracklets_type tracklets;
4539

@@ -72,8 +66,7 @@ return s;
7266
template<typename ContainerAllocator1, typename ContainerAllocator2>
7367
bool operator==(const ::tracking::Tracklets_<ContainerAllocator1> & lhs, const ::tracking::Tracklets_<ContainerAllocator2> & rhs)
7468
{
75-
return lhs.header == rhs.header &&
76-
lhs.tracklets == rhs.tracklets;
69+
return lhs.tracklets == rhs.tracklets;
7770
}
7871

7972
template<typename ContainerAllocator1, typename ContainerAllocator2>
@@ -116,12 +109,12 @@ struct IsFixedSize< ::tracking::Tracklets_<ContainerAllocator> const>
116109

117110
template <class ContainerAllocator>
118111
struct HasHeader< ::tracking::Tracklets_<ContainerAllocator> >
119-
: TrueType
112+
: FalseType
120113
{ };
121114

122115
template <class ContainerAllocator>
123116
struct HasHeader< ::tracking::Tracklets_<ContainerAllocator> const>
124-
: TrueType
117+
: FalseType
125118
{ };
126119

127120

@@ -130,12 +123,12 @@ struct MD5Sum< ::tracking::Tracklets_<ContainerAllocator> >
130123
{
131124
static const char* value()
132125
{
133-
return "b9ec897e27b256c83b04eb795b1db40e";
126+
return "eaf004b7dd6cb035732a86956a387ae0";
134127
}
135128

136129
static const char* value(const ::tracking::Tracklets_<ContainerAllocator>&) { return value(); }
137-
static const uint64_t static_value1 = 0xb9ec897e27b256c8ULL;
138-
static const uint64_t static_value2 = 0x3b04eb795b1db40eULL;
130+
static const uint64_t static_value1 = 0xeaf004b7dd6cb035ULL;
131+
static const uint64_t static_value2 = 0x732a86956a387ae0ULL;
139132
};
140133

141134
template<class ContainerAllocator>
@@ -157,25 +150,9 @@ struct Definition< ::tracking::Tracklets_<ContainerAllocator> >
157150
return "# Tracklets.msg\n"
158151
"## List of tracked bounding boxes\n"
159152
"\n"
160-
"Header header\n"
153+
"# Header header\n"
161154
"Tracklet[] tracklets\n"
162155
"================================================================================\n"
163-
"MSG: std_msgs/Header\n"
164-
"# Standard metadata for higher-level stamped data types.\n"
165-
"# This is generally used to communicate timestamped data \n"
166-
"# in a particular coordinate frame.\n"
167-
"# \n"
168-
"# sequence ID: consecutively increasing ID \n"
169-
"uint32 seq\n"
170-
"#Two-integer timestamp that is expressed as:\n"
171-
"# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n"
172-
"# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n"
173-
"# time-handling sugar is provided by the client library\n"
174-
"time stamp\n"
175-
"#Frame this data is associated with\n"
176-
"string frame_id\n"
177-
"\n"
178-
"================================================================================\n"
179156
"MSG: tracking/Tracklet\n"
180157
"# Tracklet.msg\n"
181158
"## Bounding box with class\n"
@@ -215,7 +192,6 @@ namespace serialization
215192
{
216193
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
217194
{
218-
stream.next(m.header);
219195
stream.next(m.tracklets);
220196
}
221197

@@ -235,9 +211,6 @@ struct Printer< ::tracking::Tracklets_<ContainerAllocator> >
235211
{
236212
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::tracking::Tracklets_<ContainerAllocator>& v)
237213
{
238-
s << indent << "header: ";
239-
s << std::endl;
240-
Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
241214
s << indent << "tracklets[]" << std::endl;
242215
for (size_t i = 0; i < v.tracklets.size(); ++i)
243216
{
0 Bytes
Binary file not shown.

ros_ws/devel/lib/python3/dist-packages/tracking/msg/_Tracklets.py

Lines changed: 6 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,17 @@
66
import genpy
77
import struct
88

9-
import std_msgs.msg
109
import tracking.msg
1110

1211
class Tracklets(genpy.Message):
13-
_md5sum = "b9ec897e27b256c83b04eb795b1db40e"
12+
_md5sum = "eaf004b7dd6cb035732a86956a387ae0"
1413
_type = "tracking/Tracklets"
15-
_has_header = True # flag to mark the presence of a Header object
14+
_has_header = False # flag to mark the presence of a Header object
1615
_full_text = """# Tracklets.msg
1716
## List of tracked bounding boxes
1817
19-
Header header
18+
# Header header
2019
Tracklet[] tracklets
21-
================================================================================
22-
MSG: std_msgs/Header
23-
# Standard metadata for higher-level stamped data types.
24-
# This is generally used to communicate timestamped data
25-
# in a particular coordinate frame.
26-
#
27-
# sequence ID: consecutively increasing ID
28-
uint32 seq
29-
#Two-integer timestamp that is expressed as:
30-
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
31-
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
32-
# time-handling sugar is provided by the client library
33-
time stamp
34-
#Frame this data is associated with
35-
string frame_id
36-
3720
================================================================================
3821
MSG: tracking/Tracklet
3922
# Tracklet.msg
@@ -56,8 +39,8 @@ class Tracklets(genpy.Message):
5639
uint8 cls
5740
5841
float32 confidence"""
59-
__slots__ = ['header','tracklets']
60-
_slot_types = ['std_msgs/Header','tracking/Tracklet[]']
42+
__slots__ = ['tracklets']
43+
_slot_types = ['tracking/Tracklet[]']
6144

6245
def __init__(self, *args, **kwds):
6346
"""
@@ -67,7 +50,7 @@ def __init__(self, *args, **kwds):
6750
changes. You cannot mix in-order arguments and keyword arguments.
6851
6952
The available fields are:
70-
header,tracklets
53+
tracklets
7154
7255
:param args: complete set of field values, in .msg order
7356
:param kwds: use keyword arguments corresponding to message field names
@@ -76,12 +59,9 @@ def __init__(self, *args, **kwds):
7659
if args or kwds:
7760
super(Tracklets, self).__init__(*args, **kwds)
7861
# message fields cannot be None, assign default values for those that are
79-
if self.header is None:
80-
self.header = std_msgs.msg.Header()
8162
if self.tracklets is None:
8263
self.tracklets = []
8364
else:
84-
self.header = std_msgs.msg.Header()
8565
self.tracklets = []
8666

8767
def _get_types(self):
@@ -96,14 +76,6 @@ def serialize(self, buff):
9676
:param buff: buffer, ``StringIO``
9777
"""
9878
try:
99-
_x = self
100-
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
101-
_x = self.header.frame_id
102-
length = len(_x)
103-
if python3 or type(_x) == unicode:
104-
_x = _x.encode('utf-8')
105-
length = len(_x)
106-
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
10779
length = len(self.tracklets)
10880
buff.write(_struct_I.pack(length))
10981
for val1 in self.tracklets:
@@ -120,24 +92,9 @@ def deserialize(self, str):
12092
if python3:
12193
codecs.lookup_error("rosmsg").msg_type = self._type
12294
try:
123-
if self.header is None:
124-
self.header = std_msgs.msg.Header()
12595
if self.tracklets is None:
12696
self.tracklets = None
12797
end = 0
128-
_x = self
129-
start = end
130-
end += 12
131-
(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
132-
start = end
133-
end += 4
134-
(length,) = _struct_I.unpack(str[start:end])
135-
start = end
136-
end += length
137-
if python3:
138-
self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
139-
else:
140-
self.header.frame_id = str[start:end]
14198
start = end
14299
end += 4
143100
(length,) = _struct_I.unpack(str[start:end])
@@ -161,14 +118,6 @@ def serialize_numpy(self, buff, numpy):
161118
:param numpy: numpy python module
162119
"""
163120
try:
164-
_x = self
165-
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
166-
_x = self.header.frame_id
167-
length = len(_x)
168-
if python3 or type(_x) == unicode:
169-
_x = _x.encode('utf-8')
170-
length = len(_x)
171-
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
172121
length = len(self.tracklets)
173122
buff.write(_struct_I.pack(length))
174123
for val1 in self.tracklets:
@@ -186,24 +135,9 @@ def deserialize_numpy(self, str, numpy):
186135
if python3:
187136
codecs.lookup_error("rosmsg").msg_type = self._type
188137
try:
189-
if self.header is None:
190-
self.header = std_msgs.msg.Header()
191138
if self.tracklets is None:
192139
self.tracklets = None
193140
end = 0
194-
_x = self
195-
start = end
196-
end += 12
197-
(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
198-
start = end
199-
end += 4
200-
(length,) = _struct_I.unpack(str[start:end])
201-
start = end
202-
end += length
203-
if python3:
204-
self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
205-
else:
206-
self.header.frame_id = str[start:end]
207141
start = end
208142
end += 4
209143
(length,) = _struct_I.unpack(str[start:end])
@@ -223,12 +157,6 @@ def deserialize_numpy(self, str, numpy):
223157
def _get_struct_I():
224158
global _struct_I
225159
return _struct_I
226-
_struct_3I = None
227-
def _get_struct_3I():
228-
global _struct_3I
229-
if _struct_3I is None:
230-
_struct_3I = struct.Struct("<3I")
231-
return _struct_3I
232160
_struct_4fBf = None
233161
def _get_struct_4fBf():
234162
global _struct_4fBf

ros_ws/devel/share/common-lisp/ros/tracking/msg/Tracklets.lisp

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@
77
;//! \htmlinclude Tracklets.msg.html
88

99
(cl:defclass <Tracklets> (roslisp-msg-protocol:ros-message)
10-
((header
11-
:reader header
12-
:initarg :header
13-
:type std_msgs-msg:Header
14-
:initform (cl:make-instance 'std_msgs-msg:Header))
15-
(tracklets
10+
((tracklets
1611
:reader tracklets
1712
:initarg :tracklets
1813
:type (cl:vector tracking-msg:Tracklet)
@@ -27,18 +22,12 @@
2722
(cl:unless (cl:typep m 'Tracklets)
2823
(roslisp-msg-protocol:msg-deprecation-warning "using old message class name tracking-msg:<Tracklets> is deprecated: use tracking-msg:Tracklets instead.")))
2924

30-
(cl:ensure-generic-function 'header-val :lambda-list '(m))
31-
(cl:defmethod header-val ((m <Tracklets>))
32-
(roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader tracking-msg:header-val is deprecated. Use tracking-msg:header instead.")
33-
(header m))
34-
3525
(cl:ensure-generic-function 'tracklets-val :lambda-list '(m))
3626
(cl:defmethod tracklets-val ((m <Tracklets>))
3727
(roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader tracking-msg:tracklets-val is deprecated. Use tracking-msg:tracklets instead.")
3828
(tracklets m))
3929
(cl:defmethod roslisp-msg-protocol:serialize ((msg <Tracklets>) ostream)
4030
"Serializes a message object of type '<Tracklets>"
41-
(roslisp-msg-protocol:serialize (cl:slot-value msg 'header) ostream)
4231
(cl:let ((__ros_arr_len (cl:length (cl:slot-value msg 'tracklets))))
4332
(cl:write-byte (cl:ldb (cl:byte 8 0) __ros_arr_len) ostream)
4433
(cl:write-byte (cl:ldb (cl:byte 8 8) __ros_arr_len) ostream)
@@ -49,7 +38,6 @@
4938
)
5039
(cl:defmethod roslisp-msg-protocol:deserialize ((msg <Tracklets>) istream)
5140
"Deserializes a message object of type '<Tracklets>"
52-
(roslisp-msg-protocol:deserialize (cl:slot-value msg 'header) istream)
5341
(cl:let ((__ros_arr_len 0))
5442
(cl:setf (cl:ldb (cl:byte 8 0) __ros_arr_len) (cl:read-byte istream))
5543
(cl:setf (cl:ldb (cl:byte 8 8) __ros_arr_len) (cl:read-byte istream))
@@ -70,24 +58,22 @@
7058
"tracking/Tracklets")
7159
(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql '<Tracklets>)))
7260
"Returns md5sum for a message object of type '<Tracklets>"
73-
"b9ec897e27b256c83b04eb795b1db40e")
61+
"eaf004b7dd6cb035732a86956a387ae0")
7462
(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql 'Tracklets)))
7563
"Returns md5sum for a message object of type 'Tracklets"
76-
"b9ec897e27b256c83b04eb795b1db40e")
64+
"eaf004b7dd6cb035732a86956a387ae0")
7765
(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql '<Tracklets>)))
7866
"Returns full string definition for message of type '<Tracklets>"
79-
(cl:format cl:nil "# Tracklets.msg~%## List of tracked bounding boxes~%~%Header header~%Tracklet[] tracklets~%================================================================================~%MSG: std_msgs/Header~%# Standard metadata for higher-level stamped data types.~%# This is generally used to communicate timestamped data ~%# in a particular coordinate frame.~%# ~%# sequence ID: consecutively increasing ID ~%uint32 seq~%#Two-integer timestamp that is expressed as:~%# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')~%# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')~%# time-handling sugar is provided by the client library~%time stamp~%#Frame this data is associated with~%string frame_id~%~%================================================================================~%MSG: tracking/Tracklet~%# Tracklet.msg~%## Bounding box with class~%~%# Constants~%~%# TODO~%# uint8 car~%# uint8 armor_module~%# ...~%~%# Bounding box~%float32 x~%float32 y~%float32 w~%float32 h~%~%# class~%uint8 cls~%~%float32 confidence~%~%"))
67+
(cl:format cl:nil "# Tracklets.msg~%## List of tracked bounding boxes~%~%# Header header~%Tracklet[] tracklets~%================================================================================~%MSG: tracking/Tracklet~%# Tracklet.msg~%## Bounding box with class~%~%# Constants~%~%# TODO~%# uint8 car~%# uint8 armor_module~%# ...~%~%# Bounding box~%float32 x~%float32 y~%float32 w~%float32 h~%~%# class~%uint8 cls~%~%float32 confidence~%~%"))
8068
(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql 'Tracklets)))
8169
"Returns full string definition for message of type 'Tracklets"
82-
(cl:format cl:nil "# Tracklets.msg~%## List of tracked bounding boxes~%~%Header header~%Tracklet[] tracklets~%================================================================================~%MSG: std_msgs/Header~%# Standard metadata for higher-level stamped data types.~%# This is generally used to communicate timestamped data ~%# in a particular coordinate frame.~%# ~%# sequence ID: consecutively increasing ID ~%uint32 seq~%#Two-integer timestamp that is expressed as:~%# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')~%# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')~%# time-handling sugar is provided by the client library~%time stamp~%#Frame this data is associated with~%string frame_id~%~%================================================================================~%MSG: tracking/Tracklet~%# Tracklet.msg~%## Bounding box with class~%~%# Constants~%~%# TODO~%# uint8 car~%# uint8 armor_module~%# ...~%~%# Bounding box~%float32 x~%float32 y~%float32 w~%float32 h~%~%# class~%uint8 cls~%~%float32 confidence~%~%"))
70+
(cl:format cl:nil "# Tracklets.msg~%## List of tracked bounding boxes~%~%# Header header~%Tracklet[] tracklets~%================================================================================~%MSG: tracking/Tracklet~%# Tracklet.msg~%## Bounding box with class~%~%# Constants~%~%# TODO~%# uint8 car~%# uint8 armor_module~%# ...~%~%# Bounding box~%float32 x~%float32 y~%float32 w~%float32 h~%~%# class~%uint8 cls~%~%float32 confidence~%~%"))
8371
(cl:defmethod roslisp-msg-protocol:serialization-length ((msg <Tracklets>))
8472
(cl:+ 0
85-
(roslisp-msg-protocol:serialization-length (cl:slot-value msg 'header))
8673
4 (cl:reduce #'cl:+ (cl:slot-value msg 'tracklets) :key #'(cl:lambda (ele) (cl:declare (cl:ignorable ele)) (cl:+ (roslisp-msg-protocol:serialization-length ele))))
8774
))
8875
(cl:defmethod roslisp-msg-protocol:ros-message-to-list ((msg <Tracklets>))
8976
"Converts a ROS message object to a list"
9077
(cl:list 'Tracklets
91-
(cl:cons ':header (header msg))
9278
(cl:cons ':tracklets (tracklets msg))
9379
))
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
(cl:in-package tracking-msg)
2-
(cl:export '(HEADER-VAL
3-
HEADER
4-
TRACKLETS-VAL
2+
(cl:export '(TRACKLETS-VAL
53
TRACKLETS
64
))

ros_ws/devel/share/common-lisp/ros/tracking/msg/tracking-msg.asd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
(cl:in-package :asdf)
33

44
(defsystem "tracking-msg"
5-
:depends-on (:roslisp-msg-protocol :roslisp-utils :std_msgs-msg
6-
)
5+
:depends-on (:roslisp-msg-protocol :roslisp-utils )
76
:components ((:file "_package")
87
(:file "Tracklet" :depends-on ("_package_Tracklet"))
98
(:file "_package_Tracklet" :depends-on ("_package"))

0 commit comments

Comments
 (0)