|
| 1 | +class update_ff_msgs_VisualLandmarks_bc9fc09f69d7758225ed41ee26f6375e(MessageUpdateRule): |
| 2 | + old_type = "ff_msgs/VisualLandmarks" |
| 3 | + old_full_text = """ |
| 4 | +# Copyright (c) 2017, United States Government, as represented by the |
| 5 | +# Administrator of the National Aeronautics and Space Administration. |
| 6 | +# |
| 7 | +# All rights reserved. |
| 8 | +# |
| 9 | +# The Astrobee platform is licensed under the Apache License, Version 2.0 |
| 10 | +# (the "License"); you may not use this file except in compliance with the |
| 11 | +# License. You may obtain a copy of the License at |
| 12 | +# |
| 13 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | +# |
| 15 | +# Unless required by applicable law or agreed to in writing, software |
| 16 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 17 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 18 | +# License for the specific language governing permissions and limitations |
| 19 | +# under the License. |
| 20 | +# |
| 21 | +# The observation from a camera image, of image coordinates |
| 22 | +# and associated 3D coordinates. Used for sparse mapping and AR tags. |
| 23 | + |
| 24 | +Header header # header with timestamp |
| 25 | +uint32 camera_id # image ID, associated with registration pulse |
| 26 | +geometry_msgs/Pose pose # estimated camera pose from features |
| 27 | +ff_msgs/VisualLandmark[] landmarks # list of all landmarks |
| 28 | + |
| 29 | +================================================================================ |
| 30 | +MSG: std_msgs/Header |
| 31 | +# Standard metadata for higher-level stamped data types. |
| 32 | +# This is generally used to communicate timestamped data |
| 33 | +# in a particular coordinate frame. |
| 34 | +# |
| 35 | +# sequence ID: consecutively increasing ID |
| 36 | +uint32 seq |
| 37 | +#Two-integer timestamp that is expressed as: |
| 38 | +# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs') |
| 39 | +# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs') |
| 40 | +# time-handling sugar is provided by the client library |
| 41 | +time stamp |
| 42 | +#Frame this data is associated with |
| 43 | +string frame_id |
| 44 | + |
| 45 | +================================================================================ |
| 46 | +MSG: geometry_msgs/Pose |
| 47 | +# A representation of pose in free space, composed of position and orientation. |
| 48 | +Point position |
| 49 | +Quaternion orientation |
| 50 | + |
| 51 | +================================================================================ |
| 52 | +MSG: geometry_msgs/Point |
| 53 | +# This contains the position of a point in free space |
| 54 | +float64 x |
| 55 | +float64 y |
| 56 | +float64 z |
| 57 | + |
| 58 | +================================================================================ |
| 59 | +MSG: geometry_msgs/Quaternion |
| 60 | +# This represents an orientation in free space in quaternion form. |
| 61 | + |
| 62 | +float64 x |
| 63 | +float64 y |
| 64 | +float64 z |
| 65 | +float64 w |
| 66 | + |
| 67 | +================================================================================ |
| 68 | +MSG: ff_msgs/VisualLandmark |
| 69 | +# Copyright (c) 2017, United States Government, as represented by the |
| 70 | +# Administrator of the National Aeronautics and Space Administration. |
| 71 | +# |
| 72 | +# All rights reserved. |
| 73 | +# |
| 74 | +# The Astrobee platform is licensed under the Apache License, Version 2.0 |
| 75 | +# (the "License"); you may not use this file except in compliance with the |
| 76 | +# License. You may obtain a copy of the License at |
| 77 | +# |
| 78 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 79 | +# |
| 80 | +# Unless required by applicable law or agreed to in writing, software |
| 81 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 82 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 83 | +# License for the specific language governing permissions and limitations |
| 84 | +# under the License. |
| 85 | +# |
| 86 | +# A single observation of a feature, with an image coordinate |
| 87 | +# and known 3D coordinate |
| 88 | + |
| 89 | +float32 x # known 3D position x |
| 90 | +float32 y # known 3D position y |
| 91 | +float32 z # known 3D position z |
| 92 | +float32 u # feature image coordinate x |
| 93 | +float32 v # feature image coordinate y |
| 94 | +""" |
| 95 | + |
| 96 | + new_type = "ff_msgs/VisualLandmarks" |
| 97 | + new_full_text = """ |
| 98 | +# Copyright (c) 2017, United States Government, as represented by the |
| 99 | +# Administrator of the National Aeronautics and Space Administration. |
| 100 | +# |
| 101 | +# All rights reserved. |
| 102 | +# |
| 103 | +# The Astrobee platform is licensed under the Apache License, Version 2.0 |
| 104 | +# (the "License"); you may not use this file except in compliance with the |
| 105 | +# License. You may obtain a copy of the License at |
| 106 | +# |
| 107 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 108 | +# |
| 109 | +# Unless required by applicable law or agreed to in writing, software |
| 110 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 111 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 112 | +# License for the specific language governing permissions and limitations |
| 113 | +# under the License. |
| 114 | +# |
| 115 | +# The observation from a camera image, of image coordinates |
| 116 | +# and associated 3D coordinates. Used for sparse mapping and AR tags. |
| 117 | + |
| 118 | +Header header # header with timestamp |
| 119 | +uint32 camera_id # image ID, associated with registration pulse |
| 120 | +geometry_msgs/Pose pose # estimated camera pose from features |
| 121 | +ff_msgs/VisualLandmark[] landmarks # list of all landmarks |
| 122 | +float32 runtime # Time it took to calculate the pose and matching landmarks |
| 123 | + |
| 124 | +================================================================================ |
| 125 | +MSG: std_msgs/Header |
| 126 | +# Standard metadata for higher-level stamped data types. |
| 127 | +# This is generally used to communicate timestamped data |
| 128 | +# in a particular coordinate frame. |
| 129 | +# |
| 130 | +# sequence ID: consecutively increasing ID |
| 131 | +uint32 seq |
| 132 | +#Two-integer timestamp that is expressed as: |
| 133 | +# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs') |
| 134 | +# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs') |
| 135 | +# time-handling sugar is provided by the client library |
| 136 | +time stamp |
| 137 | +#Frame this data is associated with |
| 138 | +string frame_id |
| 139 | + |
| 140 | +================================================================================ |
| 141 | +MSG: geometry_msgs/Pose |
| 142 | +# A representation of pose in free space, composed of position and orientation. |
| 143 | +Point position |
| 144 | +Quaternion orientation |
| 145 | + |
| 146 | +================================================================================ |
| 147 | +MSG: geometry_msgs/Point |
| 148 | +# This contains the position of a point in free space |
| 149 | +float64 x |
| 150 | +float64 y |
| 151 | +float64 z |
| 152 | + |
| 153 | +================================================================================ |
| 154 | +MSG: geometry_msgs/Quaternion |
| 155 | +# This represents an orientation in free space in quaternion form. |
| 156 | + |
| 157 | +float64 x |
| 158 | +float64 y |
| 159 | +float64 z |
| 160 | +float64 w |
| 161 | + |
| 162 | +================================================================================ |
| 163 | +MSG: ff_msgs/VisualLandmark |
| 164 | +# Copyright (c) 2017, United States Government, as represented by the |
| 165 | +# Administrator of the National Aeronautics and Space Administration. |
| 166 | +# |
| 167 | +# All rights reserved. |
| 168 | +# |
| 169 | +# The Astrobee platform is licensed under the Apache License, Version 2.0 |
| 170 | +# (the "License"); you may not use this file except in compliance with the |
| 171 | +# License. You may obtain a copy of the License at |
| 172 | +# |
| 173 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 174 | +# |
| 175 | +# Unless required by applicable law or agreed to in writing, software |
| 176 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 177 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 178 | +# License for the specific language governing permissions and limitations |
| 179 | +# under the License. |
| 180 | +# |
| 181 | +# A single observation of a feature, with an image coordinate |
| 182 | +# and known 3D coordinate |
| 183 | + |
| 184 | +float32 x # known 3D position x |
| 185 | +float32 y # known 3D position y |
| 186 | +float32 z # known 3D position z |
| 187 | +float32 u # feature image coordinate x |
| 188 | +float32 v # feature image coordinate y |
| 189 | +""" |
| 190 | + |
| 191 | + order = 0 |
| 192 | + migrated_types = [ |
| 193 | + ("Header","Header"), |
| 194 | + ("geometry_msgs/Pose","geometry_msgs/Pose"), |
| 195 | + ("VisualLandmark","VisualLandmark"),] |
| 196 | + |
| 197 | + valid = True |
| 198 | + |
| 199 | + def update(self, old_msg, new_msg): |
| 200 | + self.migrate(old_msg.header, new_msg.header) |
| 201 | + new_msg.camera_id = old_msg.camera_id |
| 202 | + self.migrate(old_msg.pose, new_msg.pose) |
| 203 | + self.migrate_array(old_msg.landmarks, new_msg.landmarks, "ff_msgs/VisualLandmark") |
| 204 | + #No matching field name in old message |
| 205 | + new_msg.runtime = 0. |
0 commit comments