|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |
Launch files
Messages
Services
Plugins
Recent questions tagged gtsam2mrpt_serial at Robotics Stack Exchange
|
gtsam2mrpt_serial package from gtsam2mrpt_serial repogtsam2mrpt_serial |
ROS Distro
|
Package Summary
| Version | 0.4.0 |
| License | BSD-3-Clause |
| Build type | CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/MRPT/gtsam2mrpt_serial.git |
| VCS Type | git |
| VCS Version | develop |
| Last Updated | 2026-09-29 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Additional Links
Maintainers
- Jose-Luis Blanco-Claraco
Authors
| Distro | Build dev | Release |
|---|---|---|
| ROS 2 Humble (u22.04) | ||
| ROS 2 Jazzy (u24.04) | ||
| ROS 2 Kilted (u24.04) | ||
| ROS 2 Lyrical (u26.04) | ||
| ROS 2 Rolling (u26.04) |
| Package | ROS 2 Humble (u22.04) |
ROS 2 Jazzy (u24.04) |
ROS 2 Kilted (u24.04) |
ROS 2 Lyrical (u26.04) |
ROS 2 Rolling (u26.04) |
|---|---|---|---|---|---|
| gtsam2mrpt_serial |
|
|
|
|
|
Each cell stacks the badges for that ROS 2 distro, in this order (when available):
- Ubuntu (
amd64) - Ubuntu (
arm64) - RHEL (
x86_64) – not available for Humble, sincemrpt3cannot be built there. - Fedora (
x86_64) – only available since ROS 2 Lyrical.
gtsam2mrpt_serial
A C++ library providing a bidirectional serialization bridge between GTSAM and mrpt-serialization.
Serialize and deserialize GTSAM data structures — including NonlinearFactorGraph and Values — to and from any mrpt I/O stream (files, sockets, pipes) with optional transparent compression.
Features
- Fast — benchmarks show roughly half the wall-clock time of GTSAM’s native Boost binary serialization for mid-sized graphs (see Performance).
- Portable — the binary format is stable across machine architectures, endianness, word sizes, and operating systems, unlike Boost serialization.
- Versioned — a version tag is embedded in every serialized object so that future library releases can read files produced by older ones.
-
Compressed — transparent
.gzand.zstdcompression is available viamrpt::io::CCompressedOutputStreamat no extra cost to the caller. - Stream-agnostic — works with any stream in mrpt-io: local files, TCP sockets, named pipes, in-memory buffers, and more.
Requirements
- C++17 or newer (required by MRPT).
-
MRPT ≥ 3.0 (modules
mrpt_serialization,mrpt_io,mrpt_math,mrpt_poses): install the ROS 2 packages (sudo apt install ros-$ROS_DISTRO-mrpt-io ros-$ROS_DISTRO-mrpt-poses), or follow the MRPT install guide. -
GTSAM: 4.2 (Boost-based) and ≥ 4.3 (Boost-free) are both supported. Install the ROS 2 package (
sudo apt install ros-$ROS_DISTRO-gtsam), build from source, or use the official PPA.
Supported types
| Category | Types |
|---|---|
| Values |
Pose2, Pose3, Point2, Point3, Rot2, Rot3
|
| Factors |
PriorFactor<T>, BetweenFactor<T> for all value types above |
| Noise models |
Gaussian, Diagonal, Isotropic, Constrained, Unit, Robust (with all built-in m-estimators) |
Usage
Include the single header and use the << / >> stream operators:
#include <gtsam2mrpt_serial/serialize.h>
#include <mrpt/io/CCompressedOutputStream.h>
#include <mrpt/serialization/CArchive.h>
using namespace gtsam2mrpt_serial;
// --- Serialize ---
gtsam::NonlinearFactorGraph graph = /* ... */;
gtsam::Values initial = /* ... */;
mrpt::io::CCompressedOutputStream f("graph.mrpt.zstd");
auto arch = mrpt::serialization::archiveFrom(f);
arch << graph << initial;
// --- Deserialize ---
mrpt::io::CCompressedInputStream f2("graph.mrpt.zstd");
auto arch2 = mrpt::serialization::archiveFrom(f2);
gtsam::NonlinearFactorGraph graph2;
gtsam::Values initial2;
arch2 >> graph2 >> initial2;
For a more complete example, see tests/main.cpp.
Installation
From ROS 2 packages (recommended)
sudo apt install ros-$ROS_DISTRO-gtsam2mrpt-serial
From source
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/MRPT/gtsam2mrpt_serial.git
cd ~/ros2_ws
colcon build --packages-select gtsam2mrpt_serial
Performance
Profiling against GTSAM’s native Boost binary serialization on an Intel Core i7-6700HQ @ 2.60 GHz (Ubuntu 20.04, Boost 1.71, MRPT 2.4.4) shows approximately 2× faster serialization and deserialization for mid-sized factor graphs. The time axis below is logarithmic.
File truncated at 100 lines see the full file
Changelog for package gtsam2mrpt_serial
0.4.0 (2026-09-25)
- Match m-estimators by exact type when serializing
- ci: build and test on all ROS 2 distros with their own GTSAM version
- Fix noise model serialization bugs and add unit tests
- Add SPDX license identifiers to source headers
- Unify license as BSD-3-Clause; update README for MRPT 3 and fix broken links
- Fix -Wshadow warnings in factor serialization macros
- Contributors: Jose Luis Blanco-Claraco
0.3.0 (2026-09-23)
- Merge pull request #1 from MRPT/feat/mrpt3 Port to MRPT 3.x
- ci: adapt for mrpt3
- add formatter script
- docs: add ROS 2 Lyrical badge row, update Rolling to Ubuntu 26.04 (resolute)
- Contributors: Jose Luis Blanco-Claraco
0.2.0 (2026-02-21)
- Modernize and fix style
- fix build in new gtsam
- Add devcontainer for Rolling
- Add build farm badges
- Update README.md
- clarify license
- build depend: fix missing ones
- reorganize files for proper finding headers downstream
- Update as a colcon package
- fix newer gtsam version API
- Add .so version numbers
- tighter tests
- more correct cmake export
- Update README.md
- doc images
- more tests and profiling
- refactor unit tests
- First working version (requires mod gtsam)
- Progress with noise models
- Update README.md
- Delete azure-pipelines.yml
- Update README.md
- Serialization of basic values
- Update cmake.yml
- Create cmake.yml
- depends
- initial commit with basic structure
- Initial commit
- Contributors: Jose Luis Blanco-Claraco
Package Dependencies
| Deps | Name |
|---|---|
| mola_common | |
| mrpt_io | |
| mrpt_serialization | |
| mrpt_system | |
| mrpt_rtti | |
| mrpt_containers | |
| mrpt_math | |
| mrpt_poses | |
| mrpt_random | |
| gtsam |
System Dependencies
| Name |
|---|
| cmake |
Dependant Packages
| Name | Deps |
|---|---|
| mola_mapper_2d |