Skip to content

Enable interpretation of subtree ports as numbers.#23

Merged
JWhitleyWork merged 2 commits intomainfrom
fix-subtree-numerics
Apr 27, 2026
Merged

Enable interpretation of subtree ports as numbers.#23
JWhitleyWork merged 2 commits intomainfrom
fix-subtree-numerics

Conversation

@dsobek
Copy link
Copy Markdown
Collaborator

@dsobek dsobek commented Apr 27, 2026

Subtree ports should not be strongly typed. This causes bugs where usage of blackboard variables become incompatible later on because of type mismatches.

This addresses https://github.com/PickNikRobotics/moveit_pro/issues/18587 on the scripting side. Instead of erroring-out, a strongly typed number summed with a non-strongly typed number should still do arithmetic. The behavior should be

ST number + ST number = number
ST number + non-ST number = number
non-ST number + non-ST number = concatenated string
^ This behavior is to prevent causing a breaking change, but we should get rid of the string concat behavior of + in the future to disambiguate things.

Examples (note that numbers in quotes are not strong types, as they would be when set in a subtree port field):

1 + 2 = 3
'1' + 2 = 3
'1' + '2' = '23'

@dsobek dsobek self-assigned this Apr 27, 2026
@JWhitleyWork JWhitleyWork merged commit 62b4f7a into main Apr 27, 2026
8 checks passed
@JWhitleyWork JWhitleyWork deleted the fix-subtree-numerics branch April 27, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants