RobotExMachina / Machina.NET

A library for real-time robot control.
MIT License
86 stars 33 forks source link

Close to Singularity Error #3

Closed bendnorman closed 6 years ago

bendnorman commented 6 years ago

Hey There!

I have successfully built the sample projects and connected to the robot in the C# interactive shell. However, when I call bot.MoveTo(30, 0, 0); (or with any other coordinates) I either get a Close to Singularity error in RobotStudio or the Robot does not move at all. Any thoughts? This is the message MoveTo returns:

> bot.MoveTo(10, 0, 0);
TICKING StreamQueue: 1 actions pending
About to set targets
Setting frame #3
    current value for 'vel3': [20,20,1000,1000]
        NEW value for 'vel3': [20,20,5000,1000]
    current value for 'zone3': [FALSE,5,8,8,0.8,8,0.8]
        NEW value for 'zone3': [FALSE,5,7.5,7.5,0.75,7.5,0.75]
    current value for 'rt3': [[1000,0,500],[0,0,1,0],[0,0,0,0],[0,9E+09,9E+09,9E+09,9E+09,9E+09]]
        NEW value for 'rt3': [[10,0,0],[0.5,0,0.866025,0],[0,0,0,0],[0,9E+09,9E+09,9E+09,9E+09,9E+09]]
    current value for 'act3': 1
        NEW value for 'act3': 1
    current value for 'pset3': FALSE
        NEW value for 'pset3': TRUE
TICKING StreamQueue: 0 actions pending
Not setting targets: 0 True

Thanks

garciadelcastillo commented 6 years ago

Hi @bendnorman

As of right now, Machina doesn't do Forward/Inverse Kinematics checks, and therefore, is not able to prevent the user from trying motion that is dangerous/unreachable for the robot. Moving to (30,0,0) would mean the robot hitting against its own base, and the controller will raise an error if you do.

Try two things: