visose / Robots

Create and simulate ABB, KUKA, UR, and Staubli robot programs.
MIT License
306 stars 127 forks source link

[Bug] Joint target creation error (invalid cast String > double[]) #148

Closed ianisl closed 2 years ago

ianisl commented 2 years ago

Is there an existing issue for this?

What Robots version are you using?

1.1.9

What Rhino version are you using?

Rhino 7 on Windows

Current Behavior

Hi,

Thanks for the great library.

I am experiencing an issue with the Create Target component in Joint target mode, when supplying the angles via the Joint input. The component yields an invalid cast String > double[] error. See attached screenshot and minimum example file.

Important: the error only arises when using a PC with a french version of Windows (which we have to use in our school's lab). On my machine using an EN-US Windows install, everything works fine. Could it be a problem with localization of number formats in Windows (comma is used as a decimal separator in french) ?

I have tried changing Windows number formatting settings but so far this has not helped with solving the issue.

Capture d’écran 2022-03-10 112022

joint-error-example.zip

Thanks!

Expected Behavior

No response

Steps To Reproduce

No response

Anything else?

No response

visose commented 2 years ago

This a broken backwards compatibility issue. In the latest release the Joints input data type has been replaced from a text parameter to a custom "Joints" parameter.

To fix this issue, remove the Joints input from the target component and add it again, then connect back the the text panel with comma separated values (this will work as before).

I will try to add some check on files saved with an older versions and update this input to the new data type automatically.

ianisl commented 2 years ago

Thanks for the quick reply. It works with the suggested solution 👍

visose commented 2 years ago

Reopening the issue until backwards compatibility is fixed, as this might happen often.

visose commented 2 years ago

The latest version should hopefully be able to open older files without getting this error. If you still get an you can reopen the issue.