I have some troubles with ur_rtde library using Python (with IO part to be exact): Examples — ur_rtde 1.4.1 documentation
First problem is I cant figure out how to read digital input. There is no equivalent of setStandardDigitalOut for reading purposes.
I’ve tried getActualDigitalInputBits but there is no further explanation how it works in the documentation: API Reference — ur_rtde 1.4.1 documentation
Unfortunately this function always returns 0 no matter of digital input state (I connected combination of H and L state to some inputs via jumper wires). Do anybody know what is going on or how to walk around this problem? My goal is to read digital inputs via RTDE.
Second problem is strange behavior of setAnalogOutputVoltage function. I made a setup where analog input 0 is connected to analog output 0. According to documentation: API Reference — ur_rtde 1.4.1 documentation
setting 0 means minimum voltage, and setting 1 is maximum volatage. Anything between means voltage level is fraction of maximum voltage. Unfortunately this is not a case. To my surprise those voltages are unpredictable. Even more suspicious is that the function takes arguments outside given range 0-1 no problem.
I thought it’s noise or something with wiring but those values are repeatable. There are commands I’ve run + comments:
io.setAnalogOutputVoltage(0, 0) # zero means 0 volts
r.getStandardAnalogInput0() # but there is almost 15!
io.setAnalogOutputVoltage(0, 1) # one means maximum so 24 volts
r.getStandardAnalogInput0() # but there is less than that of 0…
io.setAnalogOutputVoltage(0, 0) # results are repeatable…
io.setAnalogOutputVoltage(0, 1) # repeatable again
io.setAnalogOutputVoltage(0, -1) # and again (with some margin of error)
Any help is very appreciated
This is a 3rd party library produced at University of Southern Denmark. One of the benefits of this is supports C++ where as the standard UR RTDE samples are only for Python. @anpl posted the link to this here a couple of years ago and could potentially assist with this issue.
Personally I have never used this one, but the standard RTDE examples in Python found at the bottom of below article work well for IO handling.
Thanks a lot. I’m also able to get correct values using this library.
I wasn’t able to find this library in Python Package Index. Is it published somewhere else or this is download-only as it is?
Download as is I think, not in any repositories to my knowledge.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.