Open magiino opened 2 years ago
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\""
was created with use ofjson.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.