RainbowRobotics / rbpodo

A client library for Rainbow Robotics' cobots
https://www.rainbow-robotics.com/
Apache License 2.0
8 stars 4 forks source link

[Help or Bug] Example error #7

Closed juho2610 closed 5 months ago

juho2610 commented 5 months ago
import rbpodo as rb

ROBOT_IP = '192.168.1.102'
robot = rb.Cobot(ROBOT_IP)
rc = rb.ResponseCollector()

try:
    [result, out] = robot.get_system_variable(rc, rb.SystemVariable.SD_TCP_RX, timeout=2)
    print("reslut", result)
    rc = rc.error().throw_if_not_empty() # here

    print("System variable SD_J1_REF:", out)
except Exception as e:
    print(f"Error occurred: {e}")
    for error in rc.error().msg:
        print(error)

this code failed

error meassage

Exception has occurred: RuntimeError
Not empty: [{ "type": Error, "category": "msg", "msg": "Parsing Error!" }]
  File "C:\Users\JUNO_MIZO\Desktop\pypro\sul copy.py", line 10, in <module>
    rc = rc.error().throw_if_not_empty()
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Not empty: [{ "type": Error, "category": "msg", "msg": "Parsing Error!" }]

Rainbo-RB(Mobile) message is.. IMG_5053

robot model is RB3-1200E control box is CB04

juho2610 commented 5 months ago

After checking, it turned out that the issue was with the version of the controller. Once I updated the controller, the logic worked correctly