You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to simplify string parameters in system.
The need of prefixing and postfixing string parameter with \" - "value": "\"AuboI5Gripper.robotconfig\"" was
created with use of json.loads("") which is used for converting string to correct data type. We do not even need type provided in parameter datamodel.
But the drawback of this is that strings must be prefixed and postfixed with \".
Both object parameter and project parameter has knowledge about type in their data model. ObjectParameter
{
name: string,
type: string,
value: string
}
ProjectParameter
id: string,
name: string, // Gets or sets name of parameter for usage in the script.
type: string,
value: string,
displayName: string, // Gets or sets localized name of the parameter that can be displayed in UI.
description: string,
range?: Range
Solution would be to use json.loads("") just for non string parameters.
With this we can ommit prefixing and postfixing string parameters with \".
Example code how we deal with this issue on our side with project parameters.
But object parameters are parsed on Arcor2 side when scene is loaded in Resources class.
See link to issue - link.
What is your opinion?
I would make PR if we agree.
One more question comes to my mind.
What changes needs to be done in AR editor?
AR editor can put objects to scene and set their parameters.
Also is working with project parameters, I gues PR is needed also here.
The text was updated successfully, but these errors were encountered:
Well, I'm not sure if handling the string parameter value differently than other types would simplify things or complicate them. Sure, for string parameters, the current state might seem more complicated than it could be. But the approach is the same for all types - there is consistency. Handling one type of parameter in a different way than others sounds to me like a source of potential trouble.
We would like to simplify string parameters in system.
The need of prefixing and postfixing string parameter with
\"
-"value": "\"AuboI5Gripper.robotconfig\""
wascreated with use of
json.loads("")
which is used for converting string to correct data type. We do not even needtype
provided in parameter datamodel.But the drawback of this is that strings must be prefixed and postfixed with
\"
.Both object parameter and project parameter has knowledge about type in their data model.
ObjectParameter
ProjectParameter
Solution would be to use
json.loads("")
just for non string parameters.With this we can ommit prefixing and postfixing string parameters with
\"
.Example code how we deal with this issue on our side with project parameters.
But object parameters are parsed on Arcor2 side when scene is loaded in
Resources
class.See link to issue - link.
What is your opinion?
I would make PR if we agree.
One more question comes to my mind.
What changes needs to be done in AR editor?
AR editor can put objects to scene and set their parameters.
Also is working with project parameters, I gues PR is needed also here.
The text was updated successfully, but these errors were encountered: