asterism 0.3.0 → 0.4.1

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 (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +149 -0
  3. data/NOTICE +12 -7
  4. data/README.md +305 -74
  5. data/data/msgs/LICENSE-BSD-3-Clause-tf2_msgs.txt +29 -0
  6. data/data/msgs/NOTICE +19 -13
  7. data/data/msgs/builtin_interfaces/msg/Duration.rb +4 -0
  8. data/data/msgs/builtin_interfaces/msg/Time.rb +4 -0
  9. data/data/msgs/diagnostic_msgs/msg/DiagnosticArray.rb +40 -0
  10. data/data/msgs/diagnostic_msgs/msg/DiagnosticStatus.rb +55 -0
  11. data/data/msgs/diagnostic_msgs/msg/KeyValue.rb +37 -0
  12. data/data/msgs/example_interfaces/srv/AddTwoInts.rb +7 -0
  13. data/data/msgs/geometry_msgs/msg/Accel.rb +4 -0
  14. data/data/msgs/geometry_msgs/msg/AccelStamped.rb +4 -0
  15. data/data/msgs/geometry_msgs/msg/Point.rb +5 -0
  16. data/data/msgs/geometry_msgs/msg/Point32.rb +5 -0
  17. data/data/msgs/geometry_msgs/msg/PointStamped.rb +4 -0
  18. data/data/msgs/geometry_msgs/msg/Pose.rb +4 -0
  19. data/data/msgs/geometry_msgs/msg/Pose2D.rb +5 -0
  20. data/data/msgs/geometry_msgs/msg/PoseStamped.rb +4 -0
  21. data/data/msgs/geometry_msgs/msg/PoseWithCovariance.rb +39 -0
  22. data/data/msgs/geometry_msgs/msg/Quaternion.rb +6 -0
  23. data/data/msgs/geometry_msgs/msg/QuaternionStamped.rb +4 -0
  24. data/data/msgs/geometry_msgs/msg/Transform.rb +4 -0
  25. data/data/msgs/geometry_msgs/msg/TransformStamped.rb +5 -0
  26. data/data/msgs/geometry_msgs/msg/Twist.rb +4 -0
  27. data/data/msgs/geometry_msgs/msg/TwistStamped.rb +4 -0
  28. data/data/msgs/geometry_msgs/msg/TwistWithCovariance.rb +39 -0
  29. data/data/msgs/geometry_msgs/msg/Vector3.rb +5 -0
  30. data/data/msgs/geometry_msgs/msg/Vector3Stamped.rb +4 -0
  31. data/data/msgs/geometry_msgs/msg/Wrench.rb +4 -0
  32. data/data/msgs/geometry_msgs/msg/WrenchStamped.rb +4 -0
  33. data/data/msgs/nav_msgs/msg/MapMetaData.rb +52 -0
  34. data/data/msgs/nav_msgs/msg/OccupancyGrid.rb +44 -0
  35. data/data/msgs/nav_msgs/msg/Odometry.rb +49 -0
  36. data/data/msgs/nav_msgs/msg/Path.rb +40 -0
  37. data/data/msgs/rcl_interfaces/msg/Log.rb +64 -0
  38. data/data/msgs/rcl_interfaces/msg/Parameter.rb +39 -0
  39. data/data/msgs/rcl_interfaces/msg/ParameterEvent.rb +52 -0
  40. data/data/msgs/rcl_interfaces/msg/ParameterValue.rb +69 -0
  41. data/data/msgs/sensor_msgs/msg/BatteryState.rb +18 -0
  42. data/data/msgs/sensor_msgs/msg/CompressedImage.rb +43 -0
  43. data/data/msgs/sensor_msgs/msg/FluidPressure.rb +5 -0
  44. data/data/msgs/sensor_msgs/msg/Illuminance.rb +5 -0
  45. data/data/msgs/sensor_msgs/msg/Imu.rb +9 -0
  46. data/data/msgs/sensor_msgs/msg/JointState.rb +7 -0
  47. data/data/msgs/sensor_msgs/msg/LaserScan.rb +71 -0
  48. data/data/msgs/sensor_msgs/msg/MagneticField.rb +5 -0
  49. data/data/msgs/sensor_msgs/msg/NavSatFix.rb +9 -0
  50. data/data/msgs/sensor_msgs/msg/NavSatStatus.rb +4 -0
  51. data/data/msgs/sensor_msgs/msg/PointCloud2.rb +68 -0
  52. data/data/msgs/sensor_msgs/msg/PointField.rb +53 -0
  53. data/data/msgs/sensor_msgs/msg/Range.rb +9 -0
  54. data/data/msgs/sensor_msgs/msg/RelativeHumidity.rb +5 -0
  55. data/data/msgs/sensor_msgs/msg/Temperature.rb +5 -0
  56. data/data/msgs/std_msgs/msg/Bool.rb +3 -0
  57. data/data/msgs/std_msgs/msg/Byte.rb +3 -0
  58. data/data/msgs/std_msgs/msg/ByteMultiArray.rb +4 -0
  59. data/data/msgs/std_msgs/msg/Char.rb +3 -0
  60. data/data/msgs/std_msgs/msg/ColorRGBA.rb +6 -0
  61. data/data/msgs/std_msgs/msg/Empty.rb +1 -0
  62. data/data/msgs/std_msgs/msg/Float32.rb +3 -0
  63. data/data/msgs/std_msgs/msg/Float32MultiArray.rb +4 -0
  64. data/data/msgs/std_msgs/msg/Float64.rb +3 -0
  65. data/data/msgs/std_msgs/msg/Float64MultiArray.rb +4 -0
  66. data/data/msgs/std_msgs/msg/Header.rb +4 -0
  67. data/data/msgs/std_msgs/msg/Int16.rb +3 -0
  68. data/data/msgs/std_msgs/msg/Int16MultiArray.rb +4 -0
  69. data/data/msgs/std_msgs/msg/Int32.rb +3 -0
  70. data/data/msgs/std_msgs/msg/Int32MultiArray.rb +4 -0
  71. data/data/msgs/std_msgs/msg/Int64.rb +3 -0
  72. data/data/msgs/std_msgs/msg/Int64MultiArray.rb +4 -0
  73. data/data/msgs/std_msgs/msg/Int8.rb +3 -0
  74. data/data/msgs/std_msgs/msg/Int8MultiArray.rb +4 -0
  75. data/data/msgs/std_msgs/msg/MultiArrayDimension.rb +5 -0
  76. data/data/msgs/std_msgs/msg/MultiArrayLayout.rb +4 -0
  77. data/data/msgs/std_msgs/msg/String.rb +3 -0
  78. data/data/msgs/std_msgs/msg/UInt16.rb +3 -0
  79. data/data/msgs/std_msgs/msg/UInt16MultiArray.rb +4 -0
  80. data/data/msgs/std_msgs/msg/UInt32.rb +3 -0
  81. data/data/msgs/std_msgs/msg/UInt32MultiArray.rb +4 -0
  82. data/data/msgs/std_msgs/msg/UInt64.rb +3 -0
  83. data/data/msgs/std_msgs/msg/UInt64MultiArray.rb +4 -0
  84. data/data/msgs/std_msgs/msg/UInt8.rb +3 -0
  85. data/data/msgs/std_msgs/msg/UInt8MultiArray.rb +4 -0
  86. data/data/msgs/tf2_msgs/msg/TFMessage.rb +35 -0
  87. data/data/msgs/visualization_msgs/msg/Marker.rb +132 -0
  88. data/data/msgs/visualization_msgs/msg/MarkerArray.rb +35 -0
  89. data/data/msgs/visualization_msgs/msg/MeshFile.rb +37 -0
  90. data/data/msgs/visualization_msgs/msg/UVCoordinate.rb +37 -0
  91. data/lib/asterism/cruby/objects.rb +25 -10
  92. data/lib/asterism/cruby/ros.rb +6 -4
  93. data/lib/asterism/cruby/zenoh.rb +190 -60
  94. data/lib/asterism/version.rb +1 -1
  95. data/lib/asterism.rb +2 -2
  96. data/mrblib/asterism.rb +112 -19
  97. data/mrblib/cdr.rb +5 -1
  98. data/mrblib/future.rb +11 -2
  99. data/mrblib/proxy.rb +13 -3
  100. data/mrblib/ros.rb +189 -44
  101. data/tools/asterism_msggen.rb +32 -5
  102. metadata +29 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f03c6be1c5461da008a067c55b609a009b31b7552810836b7272bcdd35443ba7
4
- data.tar.gz: df8c8641c8039408dcb3ca803b7fdcfe0a24e3eef3199da0b1277e980977f936
3
+ metadata.gz: fd2f9fe700f5ca0b88f98fc6598217c87be3257e31a655d33ba710f9260b76ea
4
+ data.tar.gz: '0943fd816e28b2a60c5d812095d5c87d9ac0f1a8d1a0aaf7428989f34526aeb5'
5
5
  SHA512:
6
- metadata.gz: 663fbb3e79d9b824128b541b899028809d899916af70a28fe761581fa2e28285f9841ef78dfafd088c2583f2c9df705328566b1f465ec31886df277c013c90a2
7
- data.tar.gz: d447307b7bba1387d35316044c483f974a814ab1b0a4c7f5d32e17e8fc0b954ed2388ee53aaef9bf780bb7ccb98a93669fdf30f0efb7357d007535cae26a33ec
6
+ metadata.gz: 86426bc1893654601c5a7b9234b09d82b10c6e8260553160f2484b2665ec0eba6bf4293fa1994f88b814997cbad2c69af2d4b2a492f034303ee20c61145f3f43
7
+ data.tar.gz: 387f4b1de6234f98b3c4b71ce0aee0d6f4d70ec32250350786cff73ec4cf1d500a64277b90f389f2544465409279aba601ac67fd0b3470919f0902727a21334e
data/CHANGELOG.md ADDED
@@ -0,0 +1,149 @@
1
+ # Changelog
2
+
3
+ All notable changes to asterism (the CRuby gem) and picoruby-asterism (the
4
+ mrbgem; the same `mrblib/`). 0.4.0 is the first version on rubygems.org;
5
+ the earlier ones are only in this repository. From 0.4.0 the two Zenoh
6
+ bindings (asterism-zenoh, picoruby-asterism-zenoh) carry the same minor
7
+ version (a patch release of one may come without the other).
8
+
9
+ ## 0.4.1
10
+
11
+ Additions and a fix; every 0.4.0 call works as before. Needs
12
+ asterism-zenoh / picoruby-asterism-zenoh 0.4.0 (unchanged).
13
+
14
+ Added
15
+
16
+ - More bundled types (`data/msgs`, 62 -> 84 files): rcl_interfaces (Log for
17
+ `/rosout`, ParameterEvent, Parameter, ParameterValue), nav_msgs
18
+ (Odometry, Path, MapMetaData, OccupancyGrid), sensor_msgs (LaserScan,
19
+ PointField, PointCloud2, and CompressedImage for Marker),
20
+ diagnostic_msgs (DiagnosticArray, DiagnosticStatus, KeyValue),
21
+ tf2_msgs/TFMessage, visualization_msgs (Marker, MarkerArray, MeshFile,
22
+ UVCoordinate), geometry_msgs PoseWithCovariance and TwistWithCovariance
23
+ (for Odometry). Every type hash matches ROS 2 Jazzy's type description
24
+ JSON. tf2_msgs is under the BSD 3-Clause License
25
+ (`data/msgs/LICENSE-BSD-3-Clause-tf2_msgs.txt`); the gem's licenses are
26
+ now `MIT`, `Apache-2.0` and `BSD-3-Clause`.
27
+ - `FIELD_TYPES` in every generated message: per field
28
+ `[name, base, kind, nested, capacity, string_capacity]`, plain Arrays,
29
+ Strings, Integers and nil (kind is `"scalar"`, `"array"`,
30
+ `"bounded_sequence"` or `"sequence"`). A string sequence and a number
31
+ sequence can now be told apart without the .msg.
32
+ - `Asterism::ROS.field_types(type)`: the `FIELD_TYPES` of a type and of
33
+ every message type it is made of, `{ROS name => FIELD_TYPES}` (for a
34
+ service, its Request and Response).
35
+
36
+ Fixed
37
+
38
+ - `Asterism::ROS.require_type` checks the type name before it builds a
39
+ path: `pkg/msg/Name` or `pkg/srv/Name`, the package `[a-z][a-z0-9_]*`,
40
+ the name `[A-Z][A-Za-z0-9]*` (checked byte by byte; the boards have no
41
+ Regexp). A package name with `..` could point above a `TYPE_PATH`
42
+ directory. Anything else raises `ArgumentError`, as a malformed name did
43
+ before.
44
+
45
+ Types generated by the 0.4.0 generator still load; regenerate them to get
46
+ `FIELD_TYPES`.
47
+
48
+ ## 0.4.0
49
+
50
+ The first step of the API review toward 1.0 (docs/api_review.md):
51
+ additions, deprecations and fixes. Every 0.3.0 call works as before.
52
+ Needs asterism-zenoh / picoruby-asterism-zenoh 0.4.0.
53
+
54
+ Added
55
+
56
+ - Time limits in seconds everywhere: `Asterism[path, timeout: 2.0]` (or
57
+ `timeout_ms:`), `client.call` / `node.call(timeout:)`,
58
+ `Asterism.connect(connect_timeout:, check_timeout:)`; on the CRuby API
59
+ `timeout_ms:` next to `timeout:` and `query_timeout:` on
60
+ `advanced_subscriber`. Giving a time limit twice raises `ArgumentError`.
61
+ Time-out messages give both units (`within 2.0 s (2000 ms)`).
62
+ - `node.every(ms: 500)`, `Timer#period_ms`.
63
+ - `Future#took`, `ROS::Call#took` (seconds).
64
+ - `request:` on `client.call` / `call_async` / `node.call`.
65
+ - `node.subscribe(topic, type)` without a block returns the subscription
66
+ (as `node.subscription`) instead of raising, on the boards as on CRuby.
67
+ - `pending` / `received` on `ROS::Subscription`.
68
+ - `Proxy#remote_methods`.
69
+ - `Asterism.off_join` / `off_leave` (and on `Net`).
70
+ - One error tree under `Asterism::Error`: `TimeoutError` (was `Timeout`),
71
+ `ROS::TimeoutError` (under `TimeoutError`; was `ROS::Timeout`),
72
+ `ROS::UnknownType` and `CDR::DecodeError` moved under it, and the
73
+ bindings' `Zenoh::Error` / `Zenoh::ClosedError` are under it too. The ROS
74
+ layer raises `Zenoh::ClosedError` when its session or entity is closed.
75
+ - CRuby API: `Connection#connection_count`, `Subscription#each_sample`,
76
+ `c.liveliness(key) { }` and `c.publisher(key) { |pub| }` (closed after
77
+ the block), `net[path, timeout_ms:]`.
78
+ - `DEFAULT_TIMEOUT`, `CHECK_TIMEOUT`, `Client::DEFAULT_TIMEOUT` (seconds).
79
+ - CRuby API: `depth:` on `Connection#get`, `#liveliness_get` and
80
+ `Querier#get`. A get's queue held 16 and could not be changed, so a
81
+ wildcard get past the 16th reply lost the rest (a router answers in one
82
+ burst; `liveliness_get("@ros2_lv/**")` returned 16 of 31).
83
+ - CRuby API: `dropped` (with `received`, and `errors` for gets) on what a
84
+ get gives: `liveliness_get` returns a `KeyList` (an Array with
85
+ `dropped` / `received`), `get` and `Querier#get` without a block a
86
+ `GetEnumerator` (an Enumerator with the counts of the last get it sent).
87
+ `Watch#dropped` / `pending` / `received` (before only through
88
+ `w.watch.dropped`).
89
+ - CRuby API: a get, liveliness watch or subscription whose depth was left
90
+ at the default warns once (`Asterism.warn_once`) when something was
91
+ dropped. So does the object layer's watch, on every Ruby.
92
+ - README: "Which API?" (the portable API and the CRuby API), the error
93
+ tree, the defaults, the threads table, the deprecations and what 1.0
94
+ changes, reserved keywords. Internal methods are marked `@api private`.
95
+
96
+ Changed
97
+
98
+ - CRuby API: the default depth of `get`, `liveliness_get`, `Querier#get`
99
+ and `liveliness_watch` is the binding's `DEFAULT_GET_DEPTH` /
100
+ `DEFAULT_WATCH_DEPTH`, 1024 (was 16; the boards stay at 16).
101
+ - The object layer's liveliness watch (behind `Asterism.each` and
102
+ `Asterism.nodes`) holds 1024 on CRuby (64 on the boards, as before).
103
+
104
+ Deprecated (each warns once per name; `Asterism.deprecations = :raise`
105
+ raises instead)
106
+
107
+ - `Asterism[path, ms]` (the time as a positional argument; a Float there
108
+ warns with its own message: it is milliseconds).
109
+ - `Asterism::Timeout`, `Asterism::ROS::Timeout` (the names; they still
110
+ rescue the same errors, through `const_missing`, so that inside
111
+ `module Asterism` the name `Timeout` is Ruby's again).
112
+ - `Proxy#methods` returning the remote methods: `remote_methods`.
113
+ - CRuby API: `Connection#peers` (`connection_count`) and
114
+ `Connection::Subscription#each_pending` (`each_sample`).
115
+ - A request field named `timeout` / `timeout_ms` given as a keyword to
116
+ `client.call` (use `request:`).
117
+
118
+ Fixed
119
+
120
+ - A Float as the positional time limit was taken as milliseconds and
121
+ truncated (`Asterism[path, 2.0]` waited 2 ms); it now warns and says so.
122
+ - A service whose request has a field named like the time-limit keyword
123
+ could not be called with keyword fields: `request:` (or a Hash) now
124
+ carries the request, and `timeout:` the time limit.
125
+
126
+ ## 0.3.0
127
+
128
+ - CRuby API: publishers, queriers, the advanced publisher / subscriber and
129
+ events with blocks; `Asterism.connect(config:)` for TLS.
130
+ - Strings are built from a fresh String (frozen literals); CI on Ruby 3.2
131
+ to 4.0 and with frozen literals, against asterism-zenoh main, and an
132
+ installed-gem check.
133
+ - docs/api_review.md (the review this version starts on) and profile/
134
+ (the Ruby profile of the shared layer across implementations).
135
+
136
+ ## 0.2.0
137
+
138
+ - The CRuby API: blocks, a receiving thread and Enumerators over the
139
+ portable API (`Asterism::Zenoh.open`, `Asterism.connect { |net| }`,
140
+ `Asterism::ROS.connect`).
141
+ - In the shared layer: `on_join` / `on_leave`, `node.every`,
142
+ `node.subscribe` blocks and `deconstruct_keys`.
143
+
144
+ ## 0.1.0
145
+
146
+ - The pure Ruby layers as one source for the CRuby gem and the mrbgem: the
147
+ object layer (`Asterism.connect / expose / [] / poll`), `Asterism::CDR`,
148
+ `Asterism::ROS` (topics and services over rmw_zenoh's wire format), the
149
+ type generator and the bundled ROS 2 Jazzy types.
data/NOTICE CHANGED
@@ -4,7 +4,8 @@ Asterism's own code is under the MIT License (LICENSE).
4
4
 
5
5
  This repository also contains material made from ROS 2 message and service
6
6
  definitions, which are licensed under the Apache License, Version 2.0
7
- (data/msgs/LICENSE-Apache-2.0.txt):
7
+ (data/msgs/LICENSE-Apache-2.0.txt), except tf2_msgs, which is under the BSD
8
+ 3-Clause License (data/msgs/LICENSE-BSD-3-Clause-tf2_msgs.txt):
8
9
 
9
10
  - tools/ros2_jazzy/: the .msg / .srv definitions and the package.xml of
10
11
  their packages as distributed with ROS 2 Jazzy
@@ -16,12 +17,16 @@ definitions, which are licensed under the Apache License, Version 2.0
16
17
  - test/msgs/golden_cdr.tsv and test/msgs/test_type_hashes.txt: values
17
18
  computed by ROS 2's tools (rclpy, rosidl) in a ROS 2 Jazzy image.
18
19
 
19
- The ROS 2 packages these come from, all "Apache License 2.0" in their
20
- package.xml:
20
+ The ROS 2 packages these come from, with the license in their package.xml:
21
21
 
22
- - std_msgs, geometry_msgs, sensor_msgs (ros2/common_interfaces)
23
- - builtin_interfaces, service_msgs (ros2/rcl_interfaces)
24
- - example_interfaces (ros2/example_interfaces)
22
+ - std_msgs, geometry_msgs, sensor_msgs, nav_msgs, diagnostic_msgs,
23
+ visualization_msgs (ros2/common_interfaces): "Apache License 2.0"
24
+ - builtin_interfaces, service_msgs, rcl_interfaces (ros2/rcl_interfaces):
25
+ "Apache License 2.0"
26
+ - example_interfaces (ros2/example_interfaces): "Apache License 2.0"
27
+ - tf2_msgs (ros2/geometry2): "BSD" (the BSD 3-Clause License of that
28
+ repository; Copyright (c) 2008, Willow Garage, Inc.)
25
29
 
26
30
  Copyright in the definitions belongs to their authors (Open Source Robotics
27
- Foundation, Inc. and the ROS 2 contributors); see those repositories.
31
+ Foundation, Inc., Willow Garage, Inc. and the ROS 2 contributors); see those
32
+ repositories.