shadow-robot / optoforce

ROS driver for the Optoforce sensor
GNU General Public License v2.0
21 stars 17 forks source link

Can I use the 6D sensor in python without ROS? #31

Open cancanxinxin opened 5 years ago

cancanxinxin commented 5 years ago

Can you provide the examples in python with serial or EtherCAT? Thank you!

cancanxinxin commented 5 years ago

And I have use the serial to get the following information, can anyone do me a favor? How can I convent the bytes to the information that I want to get?! I'll appreciate your kindness! the data is: b'\x04\x00\x00\x1f\x00\x01\x0f\xaa\x07\x08\x10#\x1b\x00\x00\xff\x05\x00%\xfeR\x00\xfcc\x00\x06\x05E\xaa\x07\x08\x10#%#W\x00\x00\xff\x05\x00&\xfeR\x00^\xfcd\x00\x06\x05\x81\xaa\x07\x08\x10#a\x00\x00\xff\x05\x00&\xfeR\x00^\xfcd\x00\x06\x05\x8b\xaa\x07\x08\x10#k\x00\x00\xff\x05\x00&\xfeR\x00^\xfcd\x00\x06\x05\x95\xaa\x07#C\x00\x00\xff\x05\x00%\xfeS\x00\xfcd\x00\x06\x05o\xaa\x01^\x0e\x00\xc8\x00\xc8\x00\xc8\'\x10\'\x10\x19d\x00\xc8\x05"\xaa\x07\x08\x10#M\x00\x00\xff\x05\x00%\xfeS\x00^\xfcc\x00\x05\x05u\xaa\x07\x08\x10\x08\x10#\x89\x00\x00\xff\x05\x00%\xfeS\x00_\xfcc\x00\x05\x05\xb2\xaa\x07\x08\x10#\x93\x00\x00\xff\x06\x00%\xfeS\x00_\xfcc\x00\x07\x05\xbf\xaa\x07\x08\x10#\x9d\x00\x00\xfcd\x00\x05\x05\xda\xfcd\x00\x06\x06\x10\xaa\x07\x08\x10#u\x00\x00\xff\x05\x00&\xfeS\x00_\xfcc\x00\x05\x05\x9f\xaa\x07\x08\x10#\x7f\x00\x00\xff\x05\x00&\xfeS\x00\xfcd\x00\x06\x05\xac\xaa\x01\xc2\x0e H \x1e\x05\xf8+\xfbD$d\x06x\x05\xb8\xaa\x07\x08\x10#\x89\x00\x00\xff\x05\x00%\xfeS\x00\xfcc\x00\x05\x05\xb2\xaa\x07\x08\x10#\x93\x00\x00\xff\x06\x00%\xfeS\x00\xfcc\x00\x07\x05\xbf\xaa\x07\x08\x10#\x9d\x00\x00\xfcd\x00\x05\x05\xda\xfcd\x00\x06\x06\x10\xaa\x07\x08\x10g;\x00\x00\xff\x05\x00&\xfeT\x00^\xfcc\x00\x06\x05\xaa\xaa\x07\x08\x10gE\x00\x00\xff\x06\x00%\xfeT\x00_\xfcc\x00\x05\x05\xb4\xaa\x07\x08\x10gO\x00\x00\xff\x04\x00%\xfeU\x00]\xfcd\x00\x05\x05\xbc\xaa\x01^\x0e\x00\xc8\x00\xc8\x00\xc8\'\x10\'\x10\x19d\x00\xc8\x05"\xaa\x07\x08\x10gY\x00\x00\xff\x05\x00$\xfeT\x00^\xfce\x00\x05\x05\xc7\xaa\x07\x08\x10gc\x00\x00\xff\x05\x00%\xfeT\x00^\xfce\x00\x05\x05\xd2\xaa\x07\x08\x10gm\x00\x00\xff\x05\x00%\xfeT\x00^\xfcd\x00\x04\x05\xda\xaa\x07\x08\x10gw\x00\x00\xff\x05\x00%\xfeT\x00^\xfcd\x00\x04\x05\xe4\xaa\x07\x08\x10g\x81\x00\x00\xff\x05\x00%\xfeT\x00^\xfcd\x00\x04\x05\xee\xaa\x01\xc2\x0e H \x1e\x05\xf8+\xfbD$d\x06x\x05\xb8\xaa\x07\x08\x10g\x8b\x00\x00\xff\x05\x00&\xfeT\x00^\xfcd\x00\x06\x05\xfb\xaa\x07\x08\x10g\x95\x00\x00\xff\x05\x00%\xfeT\x00^\xfcd\x00\x05\x06\x03\xaa\x07\x08\x10g\x9f\x00\x00\xff\x05\x00%\xfeT\x00^\xfcd\x00\x05\x06\r\xaa\x07\x08\x10g\xa9\x00\x00\xff\x05\x00%\xfeT\x00]\xfcc\x00\x05\x06\x15\xaa\x07\x08\x10g\xb3\x00\x00\xff\x05\x00%\xfeT\x00^\xfcd\x00\x05\x06!\xaa\x07\x08\x10g\xbd\x00\x00\xff\x06\x00%\xfeT\x00^\xfcd\x00\x05\x06,\xaa\x00\n'`

toliver commented 5 years ago

Can you tell us exactly what model of sensor are you using?

cancanxinxin commented 5 years ago

HEX-70-XE-200N, this model, can I have your email? Thank you!

cancanxinxin commented 5 years ago

And my email address is lvbs2012@gmail.com, looking forward to your reply!

cancanxinxin commented 5 years ago

Moreover, I use the optoforce ethercat converter v2.1 to connect the optoforce sensor with my ubuntu16.04 PC.