robot-msg-irsl 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. robot_msg_irsl-0.3.0/CMakeLists.txt +51 -0
  2. robot_msg_irsl-0.3.0/LICENSE +21 -0
  3. robot_msg_irsl-0.3.0/MANIFEST.in +15 -0
  4. robot_msg_irsl-0.3.0/PKG-INFO +317 -0
  5. robot_msg_irsl-0.3.0/README.md +307 -0
  6. robot_msg_irsl-0.3.0/VERSION +1 -0
  7. robot_msg_irsl-0.3.0/example/cpp/CMakeLists.txt +18 -0
  8. robot_msg_irsl-0.3.0/example/cpp/README.md +35 -0
  9. robot_msg_irsl-0.3.0/example/cpp/bootstrap/CMakeLists.txt +19 -0
  10. robot_msg_irsl-0.3.0/example/cpp/main.cpp +74 -0
  11. robot_msg_irsl-0.3.0/example/python/README.md +22 -0
  12. robot_msg_irsl-0.3.0/example/python/main.py +46 -0
  13. robot_msg_irsl-0.3.0/example/python/pyproject.toml +13 -0
  14. robot_msg_irsl-0.3.0/internal/cpp/CMakeLists.txt +38 -0
  15. robot_msg_irsl-0.3.0/internal/cpp/cmake/RobotMsgBootstrap.cmake +102 -0
  16. robot_msg_irsl-0.3.0/internal/cpp/cmake/robot_msgConfig.cmake.in +4 -0
  17. robot_msg_irsl-0.3.0/internal/cpp/cmake/source/robot_msgConfig.cmake +19 -0
  18. robot_msg_irsl-0.3.0/internal/cpp/cmake/source/robot_msgConfigVersion.cmake +7 -0
  19. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/detail/compat.hpp +221 -0
  20. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/detail/runtime.hpp +341 -0
  21. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/detail/type_codecs.hpp +70 -0
  22. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/detail/wire.hpp +455 -0
  23. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/all.hpp +30 -0
  24. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/common/message_batch.hpp +28 -0
  25. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/meta/controller_input.hpp +41 -0
  26. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/meta/tracking_pose.hpp +31 -0
  27. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/protocol.hpp +13 -0
  28. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/registry.hpp +14 -0
  29. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/arrow2_input.hpp +35 -0
  30. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/arrow_input.hpp +35 -0
  31. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_arrow2_input.hpp +39 -0
  32. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_arrow_input.hpp +39 -0
  33. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_box_input.hpp +34 -0
  34. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_ellipsoid_input.hpp +34 -0
  35. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_frame_input.hpp +35 -0
  36. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_line_input.hpp +39 -0
  37. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_mesh_color_input.hpp +37 -0
  38. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_robot_joint_input.hpp +35 -0
  39. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/batch_sphere_input.hpp +34 -0
  40. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/box_input.hpp +34 -0
  41. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/clear.hpp +27 -0
  42. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/ellipsoid_input.hpp +34 -0
  43. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/frame_input.hpp +35 -0
  44. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/line_input.hpp +35 -0
  45. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/mesh_color_input.hpp +33 -0
  46. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/robot_joint_input.hpp +31 -0
  47. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/robot_viewer/sphere_input.hpp +34 -0
  48. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/smpl/smpl_state.hpp +38 -0
  49. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/switch_controller/contact_info.hpp +34 -0
  50. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/switch_controller/controller_command.hpp +31 -0
  51. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/switch_controller/robot_action.hpp +43 -0
  52. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/messages/switch_controller/robot_state.hpp +35 -0
  53. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/ports.hpp +18 -0
  54. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/robot_msg.hpp +64 -0
  55. robot_msg_irsl-0.3.0/internal/cpp/include/robot_msg/types.hpp +83 -0
  56. robot_msg_irsl-0.3.0/internal/cpp/src/generated/messages.cpp +4174 -0
  57. robot_msg_irsl-0.3.0/internal/cpp/src/generated/registry.cpp +314 -0
  58. robot_msg_irsl-0.3.0/internal/cpp/src/runtime.cpp +996 -0
  59. robot_msg_irsl-0.3.0/internal/docs/cpp_usage.md +186 -0
  60. robot_msg_irsl-0.3.0/internal/docs/python_usage.md +156 -0
  61. robot_msg_irsl-0.3.0/internal/fixtures/invalid/duplicate_key.json +1 -0
  62. robot_msg_irsl-0.3.0/internal/fixtures/invalid/empty_required_string.json +1 -0
  63. robot_msg_irsl-0.3.0/internal/fixtures/invalid/extra_envelope_field.json +1 -0
  64. robot_msg_irsl-0.3.0/internal/fixtures/invalid/extra_payload_field.json +1 -0
  65. robot_msg_irsl-0.3.0/internal/fixtures/invalid/float_for_integer.json +1 -0
  66. robot_msg_irsl-0.3.0/internal/fixtures/invalid/invalid_unicode.json +1 -0
  67. robot_msg_irsl-0.3.0/internal/fixtures/invalid/malformed.json +1 -0
  68. robot_msg_irsl-0.3.0/internal/fixtures/invalid/missing_required.json +1 -0
  69. robot_msg_irsl-0.3.0/internal/fixtures/invalid/non_finite.json +1 -0
  70. robot_msg_irsl-0.3.0/internal/fixtures/invalid/null_field.json +1 -0
  71. robot_msg_irsl-0.3.0/internal/fixtures/invalid/numeric_boundary.json +1 -0
  72. robot_msg_irsl-0.3.0/internal/fixtures/invalid/unknown_message.json +1 -0
  73. robot_msg_irsl-0.3.0/internal/fixtures/invalid/unsupported_version.json +1 -0
  74. robot_msg_irsl-0.3.0/internal/fixtures/invalid/wrong_integer_type.json +1 -0
  75. robot_msg_irsl-0.3.0/internal/fixtures/valid/telemetry_defaults.json +1 -0
  76. robot_msg_irsl-0.3.0/internal/fixtures/valid/telemetry_full.json +1 -0
  77. robot_msg_irsl-0.3.0/internal/fixtures/viewer_legacy_wire.json +96 -0
  78. robot_msg_irsl-0.3.0/internal/generator/__init__.py +1 -0
  79. robot_msg_irsl-0.3.0/internal/generator/generate.py +2183 -0
  80. robot_msg_irsl-0.3.0/internal/generator/resources.py +91 -0
  81. robot_msg_irsl-0.3.0/internal/generator/wire_contract.json +114 -0
  82. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/__init__.py +39 -0
  83. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/__main__.py +14 -0
  84. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/_binary.py +496 -0
  85. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/_catalog.py +48 -0
  86. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/_paths.py +20 -0
  87. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/_protocol.py +3 -0
  88. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/_runtime.py +323 -0
  89. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/_schemas/catalog.json +6103 -0
  90. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/_type_codecs.py +794 -0
  91. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/__init__.py +66 -0
  92. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/_registry.py +150 -0
  93. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/common/__init__.py +6 -0
  94. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/common/message_batch.py +65 -0
  95. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/meta/__init__.py +8 -0
  96. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/meta/controller_input.py +219 -0
  97. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/meta/tracking_pose.py +89 -0
  98. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/__init__.py +47 -0
  99. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/arrow2_input.py +166 -0
  100. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/arrow_input.py +166 -0
  101. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_arrow2_input.py +211 -0
  102. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_arrow_input.py +211 -0
  103. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_box_input.py +160 -0
  104. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_ellipsoid_input.py +160 -0
  105. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_frame_input.py +187 -0
  106. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_line_input.py +211 -0
  107. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_mesh_color_input.py +191 -0
  108. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_robot_joint_input.py +161 -0
  109. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/batch_sphere_input.py +162 -0
  110. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/box_input.py +154 -0
  111. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/clear.py +53 -0
  112. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/ellipsoid_input.py +154 -0
  113. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/frame_input.py +181 -0
  114. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/line_input.py +166 -0
  115. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/mesh_color_input.py +138 -0
  116. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/robot_joint_input.py +116 -0
  117. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/robot_viewer/sphere_input.py +156 -0
  118. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/smpl/__init__.py +6 -0
  119. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/smpl/smpl_state.py +218 -0
  120. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/switch_controller/__init__.py +15 -0
  121. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/switch_controller/contact_info.py +130 -0
  122. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/switch_controller/controller_command.py +125 -0
  123. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/switch_controller/robot_action.py +306 -0
  124. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/messages/switch_controller/robot_state.py +135 -0
  125. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/ports.py +12 -0
  126. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/py.typed +0 -0
  127. robot_msg_irsl-0.3.0/internal/python/src/robot_msg/types.py +199 -0
  128. robot_msg_irsl-0.3.0/internal/python/src/robot_msg_irsl.egg-info/PKG-INFO +317 -0
  129. robot_msg_irsl-0.3.0/internal/python/src/robot_msg_irsl.egg-info/SOURCES.txt +195 -0
  130. robot_msg_irsl-0.3.0/internal/python/src/robot_msg_irsl.egg-info/dependency_links.txt +1 -0
  131. robot_msg_irsl-0.3.0/internal/python/src/robot_msg_irsl.egg-info/top_level.txt +1 -0
  132. robot_msg_irsl-0.3.0/internal/tests/CMakeLists.txt +41 -0
  133. robot_msg_irsl-0.3.0/internal/tests/compatibility/test_compatibility.py +329 -0
  134. robot_msg_irsl-0.3.0/internal/tests/compatibility/test_consumers.py +131 -0
  135. robot_msg_irsl-0.3.0/internal/tests/compatibility/test_distribution.py +323 -0
  136. robot_msg_irsl-0.3.0/internal/tests/cpp/compatibility_driver.cpp +84 -0
  137. robot_msg_irsl-0.3.0/internal/tests/cpp/viewer_codec_driver.cpp +41 -0
  138. robot_msg_irsl-0.3.0/internal/tests/data/schema_migration_v2.json +61 -0
  139. robot_msg_irsl-0.3.0/internal/tests/data/schemas/messages/switch_controller/ctrl_cmd.json +25 -0
  140. robot_msg_irsl-0.3.0/internal/tests/data/schemas/messages/telemetry.json +89 -0
  141. robot_msg_irsl-0.3.0/internal/tests/python/test_binary_codec.py +223 -0
  142. robot_msg_irsl-0.3.0/internal/tests/python/test_catalog.py +106 -0
  143. robot_msg_irsl-0.3.0/internal/tests/python/test_consumer_contracts.py +289 -0
  144. robot_msg_irsl-0.3.0/internal/tests/python/test_controller_command.py +29 -0
  145. robot_msg_irsl-0.3.0/internal/tests/python/test_editable_install.py +55 -0
  146. robot_msg_irsl-0.3.0/internal/tests/python/test_empty_registry.py +19 -0
  147. robot_msg_irsl-0.3.0/internal/tests/python/test_protocol_metadata.py +126 -0
  148. robot_msg_irsl-0.3.0/internal/tests/python/test_schema_resources.py +99 -0
  149. robot_msg_irsl-0.3.0/internal/tests/python/test_shared_generator.py +182 -0
  150. robot_msg_irsl-0.3.0/internal/tests/python/test_viewer_messages.py +144 -0
  151. robot_msg_irsl-0.3.0/internal/tools/check-generated +5 -0
  152. robot_msg_irsl-0.3.0/internal/tools/generate +5 -0
  153. robot_msg_irsl-0.3.0/pyproject.toml +25 -0
  154. robot_msg_irsl-0.3.0/schemas/envelope.json +15 -0
  155. robot_msg_irsl-0.3.0/schemas/examples/exmple.json +66 -0
  156. robot_msg_irsl-0.3.0/schemas/messages/common/message_batch.json +25 -0
  157. robot_msg_irsl-0.3.0/schemas/messages/meta/controller_input.json +25 -0
  158. robot_msg_irsl-0.3.0/schemas/messages/meta/tracking_pose.json +15 -0
  159. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/arrow2_input.json +19 -0
  160. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/arrow_input.json +19 -0
  161. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_arrow2_input.json +25 -0
  162. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_arrow_input.json +25 -0
  163. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_box_input.json +19 -0
  164. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_ellipsoid_input.json +19 -0
  165. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_frame_input.json +19 -0
  166. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_line_input.json +25 -0
  167. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_mesh_color_input.json +26 -0
  168. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_robot_joint_input.json +22 -0
  169. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/batch_sphere_input.json +18 -0
  170. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/box_input.json +19 -0
  171. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/clear.json +10 -0
  172. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/ellipsoid_input.json +19 -0
  173. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/frame_input.json +19 -0
  174. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/line_input.json +19 -0
  175. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/mesh_color_input.json +17 -0
  176. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/robot_joint_input.json +15 -0
  177. robot_msg_irsl-0.3.0/schemas/messages/robot_viewer/sphere_input.json +18 -0
  178. robot_msg_irsl-0.3.0/schemas/messages/smpl/smpl_state.json +23 -0
  179. robot_msg_irsl-0.3.0/schemas/messages/switch_controller/contact_info.json +25 -0
  180. robot_msg_irsl-0.3.0/schemas/messages/switch_controller/controller_command.json +15 -0
  181. robot_msg_irsl-0.3.0/schemas/messages/switch_controller/robot_action.json +33 -0
  182. robot_msg_irsl-0.3.0/schemas/messages/switch_controller/robot_state.json +20 -0
  183. robot_msg_irsl-0.3.0/schemas/ports.json +9 -0
  184. robot_msg_irsl-0.3.0/schemas/types/color_rgba.json +15 -0
  185. robot_msg_irsl-0.3.0/schemas/types/frame_pose.json +13 -0
  186. robot_msg_irsl-0.3.0/schemas/types/lifetime.json +14 -0
  187. robot_msg_irsl-0.3.0/schemas/types/message_metadata.json +16 -0
  188. robot_msg_irsl-0.3.0/schemas/types/named_array.json +17 -0
  189. robot_msg_irsl-0.3.0/schemas/types/pose.json +13 -0
  190. robot_msg_irsl-0.3.0/schemas/types/quaternion.json +11 -0
  191. robot_msg_irsl-0.3.0/schemas/types/rotation_vector.json +10 -0
  192. robot_msg_irsl-0.3.0/schemas/types/timestamp.json +15 -0
  193. robot_msg_irsl-0.3.0/schemas/types/vec2.json +10 -0
  194. robot_msg_irsl-0.3.0/schemas/types/vec3.json +10 -0
  195. robot_msg_irsl-0.3.0/schemas/types/wrench.json +10 -0
  196. robot_msg_irsl-0.3.0/setup.cfg +4 -0
  197. robot_msg_irsl-0.3.0/setup.py +39 -0
@@ -0,0 +1,51 @@
1
+ cmake_minimum_required(VERSION 3.10)
2
+
3
+ file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" ROBOT_MSG_VERSION LIMIT_COUNT 1)
4
+ project(robot_msg VERSION "${ROBOT_MSG_VERSION}" LANGUAGES CXX)
5
+
6
+ include(GNUInstallDirs)
7
+ include(CMakePackageConfigHelpers)
8
+
9
+ add_subdirectory(internal/cpp)
10
+
11
+ configure_package_config_file(
12
+ "${CMAKE_CURRENT_SOURCE_DIR}/internal/cpp/cmake/robot_msgConfig.cmake.in"
13
+ "${CMAKE_CURRENT_BINARY_DIR}/robot_msgConfig.cmake"
14
+ INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/robot_msg"
15
+ )
16
+
17
+ write_basic_package_version_file(
18
+ "${CMAKE_CURRENT_BINARY_DIR}/robot_msgConfigVersion.cmake"
19
+ VERSION "${PROJECT_VERSION}"
20
+ COMPATIBILITY ExactVersion
21
+ )
22
+
23
+ install(
24
+ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/internal/cpp/include/"
25
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
26
+ FILES_MATCHING PATTERN "*.hpp"
27
+ )
28
+ install(
29
+ EXPORT robot_msgTargets
30
+ FILE robot_msgTargets.cmake
31
+ NAMESPACE robot_msg::
32
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/robot_msg"
33
+ )
34
+ install(
35
+ FILES
36
+ "${CMAKE_CURRENT_BINARY_DIR}/robot_msgConfig.cmake"
37
+ "${CMAKE_CURRENT_BINARY_DIR}/robot_msgConfigVersion.cmake"
38
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/robot_msg"
39
+ )
40
+
41
+ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
42
+ set(_robot_msg_build_testing_default ON)
43
+ else()
44
+ set(_robot_msg_build_testing_default OFF)
45
+ endif()
46
+ option(ROBOT_MSG_BUILD_TESTING "Build robot_msg tests" "${_robot_msg_build_testing_default}")
47
+ unset(_robot_msg_build_testing_default)
48
+ if(ROBOT_MSG_BUILD_TESTING)
49
+ enable_testing()
50
+ add_subdirectory(internal/tests)
51
+ endif()
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 robot_msg contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,15 @@
1
+ include VERSION
2
+ include LICENSE
3
+ include CMakeLists.txt
4
+ include setup.py
5
+ include internal/generator/wire_contract.json
6
+ recursive-include internal/cpp *.hpp *.cpp *.cmake *.cmake.in CMakeLists.txt
7
+ recursive-include internal/python/src/robot_msg *.py *.json py.typed
8
+ recursive-include schemas *.json
9
+ recursive-include internal/generator *.py *.json
10
+ include internal/tools/generate
11
+ include internal/tools/check-generated
12
+ recursive-include internal/tests *.py *.cpp *.json CMakeLists.txt
13
+ recursive-include internal/fixtures *.json
14
+ recursive-include internal/docs *.md
15
+ recursive-include example *.py *.cpp *.toml *.md CMakeLists.txt
@@ -0,0 +1,317 @@
1
+ Metadata-Version: 2.4
2
+ Name: robot-msg-irsl
3
+ Version: 0.3.0
4
+ Summary: Typed JSON and binary robot messages shared by C++ and Python
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Dynamic: license-file
10
+
11
+ # robot_msg
12
+
13
+ Typed, transport-independent robot messages for Python and C++. JSON schemas
14
+ produce shared models, validation, JSON/binary codecs, a message registry, and
15
+ installed schema resources. The runtime has no third-party dependencies.
16
+ The distribution is `robot-msg-irsl`; the import package and CMake target remain
17
+ `robot_msg` and `robot_msg::robot_msg`. Licensed under the [MIT License](LICENSE).
18
+
19
+ - [Python usage](internal/docs/python_usage.md)
20
+ - [C++ and CMake usage](internal/docs/cpp_usage.md)
21
+ - Runnable examples: [Python](example/python), [C++](example/cpp)
22
+
23
+ ## Requirements and distribution
24
+
25
+ - Python **3.11 or later**, with no upper version bound.
26
+ - C++14 or later; CMake 3.10 or later.
27
+ - Wheel construction uses setuptools; uv is required only for the optional
28
+ CMake bootstrap and uv-based installation commands.
29
+
30
+ The wheel includes Python code, C++ sources and headers, CMake configurations,
31
+ schemas and typing information. It does **not** contain a platform-specific C++
32
+ binary or compile C++ at installation time. The consuming CMake project builds
33
+ these sources with its own compiler. Generated sources are included, so ordinary
34
+ consumers do not run the generator.
35
+
36
+ Install a locally built wheel into your virtual environment:
37
+
38
+ ```sh
39
+ uv pip install /path/to/robot_msg_irsl-0.3.0-py3-none-any.whl
40
+ python -m robot_msg --cmake-dir
41
+ ```
42
+
43
+ After a release is published under the `robot-msg-irsl` distribution name, consumers
44
+ can use `uv add robot-msg-irsl==0.3.0` instead. Preparing this version's artifacts does
45
+ not imply that it has been published or that PyPI name ownership is established.
46
+
47
+ ```sh
48
+ cmake -S . -B build \
49
+ -Drobot_msg_DIR="$(uv run python -m robot_msg --cmake-dir)"
50
+ cmake --build build
51
+ ```
52
+
53
+ ```cmake
54
+ find_package(robot_msg CONFIG REQUIRED)
55
+ target_link_libraries(my_app PRIVATE robot_msg::robot_msg)
56
+ ```
57
+
58
+ Source-tree `add_subdirectory` and conventional CMake install/find_package remain
59
+ supported. Plain `find_package` does not download dependencies. The opt-in uv
60
+ bootstrap described in the C++ guide installs a pinned package into a build-local
61
+ environment; it does not change system Python or the application's existing venv.
62
+
63
+ ## Protocol 2 is a breaking release
64
+
65
+ Distribution version `0.3.0`, envelope protocol version `2`, binary magic `R2`,
66
+ and the message's string/FNV-1a wire ID are separate concepts. This release
67
+ requires consumer adapters to be updated; it does not transparently replace
68
+ protocol 1 submodules.
69
+
70
+ - Physical geometry uses shared types rather than unrelated arrays/matrices.
71
+ - Public `message.metadata` replaces `_robot_msg_timestamp` and the encoder's
72
+ `timestamp=` argument.
73
+ - Native SMPL-X parameters use `SmplState`, not the Meta-specific old class.
74
+ - Viewer legacy duplicates are removed, batches use paired items, and lifetime
75
+ semantics are explicit.
76
+
77
+ Both decoders reject protocol 1 before decoding its changed payload. The earlier
78
+ `RM` to `R2` magic change already separated the old bit-packed format from the
79
+ byte-aligned format; keeping that historical envelope version at 1 did not cause
80
+ old binary frames to be interpreted as the new layout.
81
+
82
+ ## Shared geometry and coordinate meaning
83
+
84
+ Import common models from `robot_msg.types` or include `<robot_msg/types.hpp>`.
85
+
86
+ | Type | Meaning |
87
+ |---|---|
88
+ | `Vec2(x,y)`, `Vec3(x,y,z)` | Ordered Cartesian components |
89
+ | `Quaternion(x,y,z,w)` | XYZW unit rotation; finite, `abs(norm²-1) <= 1e-6` |
90
+ | `Pose(position,orientation)` | Child-to-reference transform, `p_ref = R p_child + position` |
91
+ | `Wrench(force,torque)` | Force in N and moment in N·m; the containing field defines axes and moment origin |
92
+ | `RotationVector(x,y,z)` | Axis-angle model parameter in radians, not necessarily an absolute physical rotation |
93
+ | `ColorRGBA(r,g,b,a)` | Four components in [0,1] |
94
+
95
+ Quaternions are validated, never silently normalized or sign-flipped. Sender
96
+ adapters convert matrices or internal WXYZ values to wire XYZW. Frame identifiers
97
+ name coordinate systems; they do not establish calibration, transform discovery,
98
+ or a common world origin. Do not relabel an unknown device frame as `world`.
99
+
100
+ Distances are meters and times are seconds. `q`, `dq`, and viewer `qpos` remain
101
+ model-coordinate arrays: nq may differ from nv, and their components are not all
102
+ necessarily revolute joint angles. Matrix-shaped numerical auxiliary arrays use
103
+ row-major flattening.
104
+
105
+ ### Controller messages
106
+
107
+ `RobotState` carries `q`, `dq`, `tau_ext`, a publication `sequence`, named joint
108
+ and end-effector poses in `frame_id`, and `base_wrench_ext`. The latter's torque
109
+ is about the reference-frame origin, not automatically the sensor or center of
110
+ mass. A publication counter is not a clock.
111
+
112
+ `RobotAction` preserves the independent optional real-time and trajectory
113
+ branches. End-effector trajectories are `[arm][waypoint]`; configuration
114
+ trajectories are `[waypoint][coordinate]`. Contact link IDs are one-based; contact
115
+ points and forces are expressed in the referenced joint frame.
116
+
117
+ Optional command fields preserve presence. In particular, the existing
118
+ controller treats the presence of `ctrl_update` as an event; changing its bool
119
+ interpretation requires an explicit consumer migration. The message library
120
+ adds no acknowledgement or delivery guarantee.
121
+
122
+ ### SMPL-X parameters
123
+
124
+ `SmplState` separates root orientation, 21 body rotation vectors, 15 left-hand
125
+ and 15 right-hand rotation vectors, translation, optional 10 betas and gender.
126
+ `hand_pose_convention` distinguishes `absolute` from `mean_offset`. A mean-offset
127
+ parameter must not be converted into an absolute quaternion without the model's
128
+ hand-mean information.
129
+
130
+ `root_orientation_valid` and `translation_valid` distinguish measured estimates
131
+ from deliberately unspecified model parameters. In particular, a camera pipeline
132
+ that zeroes root/translation does not thereby estimate a world pelvis pose.
133
+ Translation remains the SMPL-X model translation parameter. Missing betas are
134
+ different from explicitly supplied zeros. The prior 169-value storage layout can
135
+ be reconstructed at the adapter boundary without changing model assets or
136
+ recording formats. No SMPL-X, Torch, NumPy or model files are dependencies here.
137
+
138
+ ### Viewer messages
139
+
140
+ Geometric messages identify their reference frame. Box dimensions are
141
+ `half_extents`, ellipsoid dimensions are axis radii, and arrow `direction` is a
142
+ full displacement vector from its origin. The previous viewer multiplied vector
143
+ length by two; preserving an old visualization therefore requires an explicit
144
+ adapter conversion, not an undocumented factor in the new message.
145
+
146
+ `Lifetime` has `one_frame`, `persistent`, or `seconds` modes. Only `seconds`
147
+ requires a positive `seconds` value. Old marker timeout zero maps to one-frame;
148
+ mesh colors that previously persisted map to persistent. Lifetimes begin at
149
+ receiver receipt on its local monotonic clock, not at the sender's timestamp.
150
+ Joint updates have separate queue-age semantics; expiration does not remove the
151
+ last applied robot pose.
152
+
153
+ Batch `items` keep associated geometry together, with shared appearance where
154
+ applicable. Preserve order, ID replacement, `visible=false` removal and empty
155
+ batch removal. `Clear` clears markers and message-applied colors, not the robot
156
+ model or last joint state. In `MessageBatch`, clear/update order is significant.
157
+
158
+ ## Metadata and optional diagnostic arrays
159
+
160
+ Every message has independent public metadata. Payload conversion intentionally
161
+ excludes it.
162
+
163
+ ```python
164
+ import robot_msg as rm
165
+ from robot_msg.types import MessageMetadata, NamedArray, Timestamp
166
+
167
+ message = rm.ControllerCommand(
168
+ ctrl_mode=2,
169
+ metadata=MessageMetadata(
170
+ sample_time=Timestamp(seconds=2.5, clock_kind="simulation", clock_id="sim-run-1"),
171
+ send_time=Timestamp(seconds=1730000000.25, clock_kind="unix"),
172
+ aux=[NamedArray(name="joint_error", shape=[2], data=[0.02, -0.01], unit="rad")],
173
+ ),
174
+ )
175
+ restored = rm.decode(rm.encode(message))
176
+ assert restored.metadata == message.metadata
177
+ ```
178
+
179
+ - `sample_time`: source sample time, if known.
180
+ - `receive_time`: time at which the sender received upstream data; not the
181
+ recipient's current receive time.
182
+ - `send_time`: time selected by the sender for transmission.
183
+
184
+ Each `Timestamp` declares `unix`, `monotonic`, `simulation`, or `device` clock
185
+ kind. Non-Unix clocks require a `clock_id`. Identical IDs do not imply a clock
186
+ synchronization accuracy guarantee. Encoding/decoding never stamps automatically
187
+ or overwrites metadata. Batch children retain their complete envelopes and
188
+ independent metadata; the outer envelope is not an implicit override.
189
+
190
+ `NamedArray(name,shape,data,unit?,frame_id?)` carries float64 diagnostics without
191
+ JSON strings or schema changes for each new name. `shape=[]` means one scalar;
192
+ a shape containing zero requires empty data. Names are unique per message.
193
+ Limits are 64 arrays, rank 8, 65,536 total values and bounded labels. Dimension
194
+ products, finite values and array lengths are validated. Integers and booleans
195
+ that require exact typed meaning belong in the payload, not float64 aux.
196
+
197
+ The aux limit is **not** a guarantee that the full payload or batch fits a
198
+ consumer's 1 MiB frame limit. Check the complete encoded frame size at the
199
+ transport boundary; batching several individually valid envelopes adds their
200
+ sizes.
201
+
202
+ ## Ports, not sockets or hosts
203
+
204
+ Python: `from robot_msg import ports`. C++: `<robot_msg/ports.hpp>`.
205
+
206
+ | Constant | TCP port |
207
+ |---|---:|
208
+ | `ROBOT_STATE` | 28400 |
209
+ | `CONTROLLER_COMMAND` | 28401 |
210
+ | `ROBOT_ACTION` | 28402 |
211
+ | `CONTACT_INFO` | 28403 |
212
+ | `VIEWER` | 28410 |
213
+ | `META` | 28420 |
214
+ | `SMPL_STATE` | 28421 |
215
+
216
+ `schemas/ports.json` generates both languages. These are project defaults, not
217
+ IANA/OS reservations. Consumers choose hosts, bind/connect roles and explicit
218
+ overrides. External VR input and Viewer HTTP ports are separate. No port scan,
219
+ collision fallback, address discovery or socket dependency is provided.
220
+
221
+ ZMQ PUB/SUB does not guarantee every message or deadline. CONFLATE keeps the
222
+ latest socket message, not the latest message per type. Use complete batch
223
+ snapshots when related data must survive together, or separate traffic policies.
224
+ Reliable commands require acknowledgements/retries outside this library.
225
+
226
+ ## Installed schema introspection
227
+
228
+ ```python
229
+ from robot_msg import message_catalog, get_payload_schema, get_envelope_schema
230
+
231
+ for info in message_catalog():
232
+ print(info.msg_type, info.wire_id, info.message_class, info.schema_id)
233
+ payload_schema = get_payload_schema(info.msg_type)
234
+ envelope_schema = get_envelope_schema(info.msg_type)
235
+ ```
236
+
237
+ The default resolved schemas contain no `$ref`, and defaults are JSON-compatible
238
+ objects. `resolved=False` returns the original form. Returned dictionaries are
239
+ independent copies. Resources come from the installed package, not a search for
240
+ a source checkout. Concrete dataclasses, type hints, `to_payload` and
241
+ `from_payload` remain available for editors and adapters.
242
+
243
+ ## Schema development
244
+
245
+ Canonical message schemas live in `schemas/messages/`, shared types in
246
+ `schemas/types/`, and the envelope in `schemas/envelope.json`. The generator uses
247
+ only the standard library. Modify schemas, not generated files.
248
+
249
+ ```sh
250
+ ./internal/tools/generate
251
+ ./internal/tools/check-generated
252
+ ```
253
+
254
+ Supported types are object, array, string, signed int64, float64 and boolean;
255
+ constraints include ranges, lengths and string enums. Objects forbid additional
256
+ properties. Optional fields without defaults use None/optional; null values are
257
+ not accepted. Required fields cannot declare defaults. Recursive object defaults
258
+ produce independent objects and are compared bit-exactly for binary omission.
259
+
260
+ Shared `$ref` is restricted to relative file-root references inside the shared
261
+ types directory, with description/default annotations. Remote references,
262
+ fragments, path escapes and cycles are rejected. `x-field-order` explicitly fixes
263
+ shared constructor/wire component order; otherwise fields are sorted by name.
264
+ `x-semantic` selects the small set of built-in cross-field checks. Unsupported
265
+ keywords are errors, not silently ignored rules.
266
+
267
+ The compatibility manifest detects unintended changes to field layout,
268
+ constraints/defaults and shared dependencies under the same protocol identity.
269
+ Updating a released contract requires an explicit version/release decision;
270
+ ordinary generation must not silently accept a new baseline.
271
+
272
+ ## Wire format
273
+
274
+ JSON uses `{version,msg_type,metadata?,payload}`. Duplicate keys, extra fields,
275
+ invalid Unicode, nonfinite numbers and unsupported versions/types are rejected.
276
+ `to_payload/from_payload` operate only on the payload. Public `validate` and both
277
+ codecs validate the metadata as well.
278
+
279
+ The byte-aligned little-endian binary format starts with:
280
+
281
+ ```text
282
+ 2 bytes magic R2
283
+ 2 bytes protocol version 2
284
+ 4 bytes FNV-1a message ID
285
+ 1 byte metadata presence flags: sample, receive, send, aux (bits 0..3)
286
+ N bytes present metadata fields, in that order
287
+ M bytes schema-driven payload
288
+ ```
289
+
290
+ Fields use float64 numbers, bounded integer/enum/length widths, object flag bits
291
+ for presence/boolean values, and no names on the wire. Defaults are omitted only
292
+ when bit-exactly equal, including signed zero. Unknown flags, truncation, invalid
293
+ lengths/values and trailing bytes are rejected. One decoder call consumes exactly
294
+ one complete envelope; framing and transport are the caller's responsibility.
295
+
296
+ ## Verification
297
+
298
+ The test suite additionally needs pip, setuptools and wheel in its selected
299
+ Python environment; offline bootstrap tests also need uv. These are development
300
+ tools, not runtime dependencies.
301
+
302
+ ```sh
303
+ uv venv .venv --python 3.11
304
+ uv pip install --python .venv/bin/python pip 'setuptools>=77.0.3' wheel
305
+ cmake -S . -B build -DPython3_EXECUTABLE="$(pwd)/.venv/bin/python"
306
+ cmake --build build
307
+ ctest --test-dir build --output-on-failure
308
+ ```
309
+
310
+ Tests cover deterministic generation, shared references/defaults, JSON/binary
311
+ validation, cross-language byte equality, metadata/aux boundaries, consumer
312
+ semantic contracts, installed schema APIs, wheel/sdist and external CMake
313
+ consumption. Packaging tests use isolated environments and the local wheel;
314
+ no robot or model inference is required.
315
+
316
+ The library provides no ZMQ, robot control, calibration, model loading, discovery,
317
+ or delivery scheduling. Consumer migrations remain separate changes.