Reject port names containing whitespace#18
Conversation
When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6bf9c7a to
a96649c
Compare
dsobek
left a comment
There was a problem hiding this comment.
Makes sense, just going to give this a test in against MoveIt Pro before approving.
For the forward port, could you evaluate if it makes sense to merge the upstream of behaviortree.cpp into our fork? In particular, I realized that some of the validation logic I pointed to you exists in the upstream master branch, and so there might be some duplicate work there. I created a separate issue for this https://github.com/PickNikRobotics/moveit_pro/issues/17640.
Commit 8f86eb9 adds comprehensive name validation that fully covers our whitespace check and more. Merging upstream into our fork would make this PR's BT.CPP change redundant. Should I take on #17640? |
If we still want to get this fixed for |
9080eff to
56b976a
Compare
78c8456 to
9dfb6a2
Compare
9dfb6a2 to
54bafc0
Compare
54bafc0 to
e71f68d
Compare
|
@dsobek could you check? thanks |
d7130f2 to
a13dd02
Compare
|
Since I added a commit here, I should no longer be the person approving. Added @shaur-k to review. |
|
@shaur-k could you check this ? thanks |
Deduplicates the whitespace validation that was inlined in both CreatePort (basic_types.h) and loadSubtreeModel (xml_parsing.cpp). Addresses shaur-k's review comment on PR #18.
a13dd02 to
178d3cd
Compare
Deduplicates the whitespace validation that was inlined in both CreatePort (basic_types.h) and loadSubtreeModel (xml_parsing.cpp). Addresses shaur-k's review comment on PR #18.
178d3cd to
dc99a79
Compare
std::isspacecheck toIsAllowedPortName()to reject port names containing whitespaceCreatePorterror message to mention the whitespace constraint