No version for distro humble showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro kilted showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro rolling showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro ardent showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro bouncy showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro crystal showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro eloquent showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro dashing showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro galactic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro foxy showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro iron showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro lunar showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro jade showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro indigo showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro hydro showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro kinetic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro melodic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange

No version for distro noetic showing jazzy. Known supported distros are highlighted in the buttons above.

Package Summary

Version 0.3.0
License Apache-2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/selfpatch/ros2_medkit.git
VCS Type git
VCS Version main
Last Updated 2026-03-05
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Runtime JSON to ROS 2 message serialization library

Maintainers

  • bburda

Authors

No additional authors.

ros2_medkit_serialization

Runtime JSON ↔ ROS 2 message serialization library for the ros2_medkit gateway.

Overview

This package provides dynamic message serialization using dynmsg, enabling JSON ↔ ROS 2 message conversion at runtime without compile-time type dependencies. It eliminates CLI fallbacks in the gateway by providing native C++ APIs for all message operations.

Features

  • JSON Serialization: Convert ROS 2 messages to/from JSON (via YAML bridge)
  • CDR Serialization: Serialize JSON to CDR format for GenericPublisher and GenericClient
  • CDR Deserialization: Deserialize CDR data from GenericSubscription to JSON
  • Type Caching: Thread-safe caching of type introspection data with LRU eviction
  • Service/Action Types: Helper functions for request/response/goal type derivation
  • Schema Generation: Generate JSON schemas for ROS 2 message types

Dependencies

  • dynmsg - OSRF dynamic message introspection library
  • nlohmann_json - JSON library
  • yaml_cpp_vendor - YAML library (for dynmsg compatibility)
  • rclcpp - ROS 2 client library (for SerializedMessage)

Usage

#include "ros2_medkit_serialization/json_serializer.hpp"
#include "ros2_medkit_serialization/type_cache.hpp"

// Get type info (cached)
auto& cache = ros2_medkit_serialization::TypeCache::instance();
auto type_info = cache.get("std_msgs", "String");

// Create serializer
ros2_medkit_serialization::JsonSerializer serializer;

// Serialize JSON to CDR for GenericPublisher
nlohmann::json msg_json = {{"data", "Hello World"}};
auto serialized = serializer.serialize("std_msgs/msg/String", msg_json);
// Use with: generic_publisher->publish(serialized);

// Deserialize CDR to JSON from GenericSubscription
nlohmann::json result = serializer.deserialize("std_msgs/msg/String", serialized_msg);

// Convert in-memory message to JSON
nlohmann::json json = serializer.to_json(type_info, message_ptr);

// Generate schema for a type
nlohmann::json schema = serializer.get_schema("geometry_msgs/msg/Twist");

API Reference

JsonSerializer

Method Description
serialize(type, json) Serialize JSON to CDR SerializedMessage
deserialize(type, msg) Deserialize CDR to JSON
to_json(type_info, ptr) Convert in-memory message to JSON
from_json(type, json) Create message from JSON
get_schema(type) Get JSON schema for type
get_defaults(type) Get default values as JSON
yaml_to_json(yaml) Convert YAML node to JSON (static)

TypeCache

Method Description
instance() Get singleton instance
get(pkg, name) Get cached type info
get(type_string) Get cached type info from full type string
clear() Clear all cached entries

Building

cd /path/to/ros2_medkit
colcon build --packages-select ros2_medkit_serialization

Testing

colcon test --packages-select ros2_medkit_serialization
colcon test-result --verbose

Design Documentation

See the design documentation for architecture details.

License

Apache-2.0

CHANGELOG

Changelog for package ros2_medkit_serialization

0.3.0 (2026-02-27)

  • Multi-distro CI support for ROS 2 Humble, Jazzy, and Rolling (#219, #242)
  • Contributors: \@bburda

0.2.0 (2026-02-07)

  • Initial rosdistro release
  • Runtime JSON to ROS 2 message serialization using vendored dynmsg C++ API
  • TypeCache - thread-safe caching of ROS type introspection data with shared_mutex for read concurrency
  • JsonSerializer - bidirectional JSON <-> ROS message conversion via dynmsg YAML bridge, including CDR serialization/deserialization for GenericClient/GenericSubscription
  • ServiceActionTypes - helper utilities for resolving service and action internal types (request/response, goal/result/feedback)
  • SerializationError exception hierarchy for structured error handling
  • Contributors: Bartosz Burda

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_serialization at Robotics Stack Exchange