Open darrenchurchill opened 5 years ago
Not that anyone would mess with the internals intentionally, but it can be done, perhaps by mistake. The copy module has a deep_copy method that's useful.
copy
deep_copy
A trivial example:
>>> b = swarmie.get_targets_buffer() >>> b[0].pose.pose = Pose() >>> swarmie.get_targets_buffer() [id: 0 size: 0.038 pose: header: seq: 1871 stamp: secs: 26209 nsecs: 950000000 frame_id: "achilles/camera_link" pose: position: x: 0.0 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0, id: 0 size: 0.038 pose: header: seq: 1870 stamp: secs: 26209 nsecs: 781000000 frame_id: "achilles/camera_link" pose: position: x: 0.083398284044 y: -0.0649271479238 z: 0.29192383131 orientation: x: 0.886939378472 y: -0.0769903018106 z: 0.0418957762061 w: 0.453492862435]
Good point, don't have time for that
Not that anyone would mess with the internals intentionally, but it can be done, perhaps by mistake. The
copy
module has adeep_copy
method that's useful.A trivial example: