-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add backwards compatibility for old scene serialization format (#2986)
* [moveit_core] test_planning_scene: Add failing unit test for old scene format The serialization format for the .scene files changed in moveit/moveit#2037. This commits a testcase using the old scene format. It will fail and a subsequent commit to introduce backwards compatibility to the scene-file parsing will make it pass. * [moveit_core] PlanningScene: Add backwards compatibility for old scene version format This commit adds a mechanism for detecting the version of the scene file format to enable the loadGeometryFromStream method to read old version scene files without having to migrate them. To detect the version of the scene format, we use the content of the line following the start of an object: In the old version of the format, this specified the number of shapes in the object (a single int). In the new version of the format, it is the translational part of the pose of the object (i.e. three double values separated by spaces). To detect the format, we check for the number of spaces after trimming the string. * Simplify code: Avoid reading full stream Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
- Loading branch information
Showing
2 changed files
with
63 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters