tesseract_robotics.tesseract_serialization¶
XML and binary serialization for root types. The backend switched from Boost.Serialization (0.33) to Cereal (0.34); the Python API is unchanged. See the Serialization User Guide for a walkthrough and the migration notes if you have 0.33 archives.
Free functions¶
Each supported type exposes paired to_* / from_* functions for the three
archive formats:
| Type | XML | Binary | File (auto) |
|---|---|---|---|
CompositeInstruction |
composite_instruction_to_xml / composite_instruction_from_xml |
composite_instruction_to_binary / composite_instruction_from_binary |
composite_instruction_to_file / composite_instruction_from_file |
Environment |
environment_to_xml / environment_from_xml |
environment_to_binary / environment_from_binary |
environment_to_file / environment_from_file |
SceneState |
scene_state_to_xml / scene_state_from_xml |
scene_state_to_binary / scene_state_from_binary |
scene_state_to_file / scene_state_from_file |
The *_to_file / *_from_file helpers auto-detect the format from the path
suffix (.xml vs .bin).
tesseract_robotics.tesseract_serialization
¶
tesseract_serialization - persist motion programs and environments
Exposes Boost.Serialization for root types. Nested types (waypoints, instructions, geometry) are automatically handled by C++ recursive serialization.
Example
from tesseract_robotics.tesseract_serialization import ( composite_instruction_to_file, composite_instruction_from_file, )
Save planned trajectory¶
composite_instruction_to_file(program, "trajectory.xml")
Load next session¶
program = composite_instruction_from_file("trajectory.xml")
__all__
module-attribute
¶
__all__ = ['composite_instruction_to_xml', 'composite_instruction_from_xml', 'composite_instruction_to_file', 'composite_instruction_from_file', 'composite_instruction_to_binary', 'composite_instruction_from_binary', 'environment_to_xml', 'environment_from_xml', 'environment_to_file', 'environment_from_file', 'environment_to_binary', 'environment_from_binary', 'scene_state_to_xml', 'scene_state_from_xml', 'scene_state_to_file', 'scene_state_from_file', 'scene_state_to_binary', 'scene_state_from_binary']
composite_instruction_to_xml
¶
Serialize CompositeInstruction to XML string. Recursively captures all waypoints, instructions, profiles, and nested composites.
composite_instruction_from_xml
¶
composite_instruction_from_xml(xml: str) -> tesseract_robotics.tesseract_command_language._tesseract_command_language.CompositeInstruction
Deserialize CompositeInstruction from XML string.
composite_instruction_to_file
¶
Save CompositeInstruction to XML file.
composite_instruction_from_file
¶
composite_instruction_from_file(path: str) -> tesseract_robotics.tesseract_command_language._tesseract_command_language.CompositeInstruction
Load CompositeInstruction from XML file.
composite_instruction_to_binary
¶
Serialize CompositeInstruction to binary data (faster, smaller than XML).
composite_instruction_from_binary
¶
composite_instruction_from_binary(data: Sequence[int]) -> tesseract_robotics.tesseract_command_language._tesseract_command_language.CompositeInstruction
Deserialize CompositeInstruction from binary data.
environment_to_xml
¶
Serialize Environment to XML string. Includes command history - on deserialize, commands are replayed to rebuild scene graph.
environment_from_xml
¶
environment_from_xml(xml: str) -> tesseract_robotics.tesseract_environment._tesseract_environment.Environment
Deserialize Environment from XML string. Returns shared_ptr.
environment_to_file
¶
Save Environment to XML file.
environment_from_file
¶
environment_from_file(path: str) -> tesseract_robotics.tesseract_environment._tesseract_environment.Environment
Load Environment from XML file. Returns shared_ptr.
environment_to_binary
¶
Serialize Environment to binary data.
environment_from_binary
¶
environment_from_binary(data: Sequence[int]) -> tesseract_robotics.tesseract_environment._tesseract_environment.Environment
Deserialize Environment from binary data. Returns shared_ptr.
scene_state_to_xml
¶
Serialize SceneState to XML string. Captures joint positions and link transforms.
scene_state_from_xml
¶
scene_state_from_xml(xml: str) -> tesseract_robotics.tesseract_state_solver._tesseract_state_solver.SceneState
Deserialize SceneState from XML string.
scene_state_to_file
¶
Save SceneState to XML file.
scene_state_from_file
¶
scene_state_from_file(path: str) -> tesseract_robotics.tesseract_state_solver._tesseract_state_solver.SceneState
Load SceneState from XML file.
scene_state_to_binary
¶
Serialize SceneState to binary data.
scene_state_from_binary
¶
scene_state_from_binary(data: Sequence[int]) -> tesseract_robotics.tesseract_state_solver._tesseract_state_solver.SceneState
Deserialize SceneState from binary data.