Shared YAML-parsing helpers for kinematics plugin factories.
- Author
- Roelof Oomen
- Date
- May 1, 2026
- Copyright
- Copyright (c) 2026
- License
- Software License Agreement (Apache License)
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Parse a "*_sample_resolution" sequence into a joint id -> discretisation map.
Each entry decodes as a PositionerSampleResolution, which supplies name and value and leaves min/max optional. This function applies the parts that need the scene graph: joint limits as the [min, max] defaults, and validation that [min, max] lies within the joint's full limits and is non-empty. A CONTINUOUS joint is unbounded: it defaults to [-pi, pi], accepts any ordered explicit range, and needs no limits.
Feed the result to toSampleGridConfig() once the sampled chain's joint order is known.
- Parameters
-
| sample_res_node | The YAML sequence node, e.g. config.at("tool_sample_resolution").getValue(). |
| scene_graph | Used to look up each joint's limits. |
| block_label | Name of the config block, quoted into error messages (e.g. "tool_sample_resolution"). The reporting factory's identity is supplied by whoever catches, so it is not repeated here. |
- Exceptions
-
| std::runtime_error | on any of the malformed-input or out-of-range conditions above. |