ingeniamc / ingeniamotion

Motion library for Ingenia servo drives
Other
6 stars 0 forks source link

Usage of package under linux - Import errors #152

Closed jeferal closed 5 months ago

jeferal commented 6 months ago

Hello,

We are very interested in using the library under linux to communicate with servos using Ethercat only.

At the moment, importing the MotionController module fails with this error: from ingeniamotion import MotionController

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingeniamotion/__init__.py", line 3, in <module>
    from .motion_controller import MotionController
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingeniamotion/motion_controller.py", line 4, in <module>
    from ingenialink.network import Network
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingenialink/__init__.py", line 16, in <module>
    from .ethercat.network import EthercatNetwork
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingenialink/ethercat/network.py", line 22, in <module>
    from ingenialink.ethercat.servo import EthercatServo
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingenialink/ethercat/servo.py", line 16, in <module>
    from ingenialink.ethercat.dictionary import EthercatDictionary
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingenialink/ethercat/dictionary.py", line 7, in <module>
    from ingenialink.ethercat.register import EthercatRegister
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingenialink/ethercat/register.py", line 1, in <module>
    from ingenialink.canopen.register import CanopenRegister
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingenialink/canopen/__init__.py", line 2, in <module>
    from .network import CAN_DEVICE, CAN_BAUDRATE
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/ingenialink/canopen/network.py", line 14, in <module>
    from can.interfaces.ixxat.exceptions import VCIError
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/can/interfaces/ixxat/__init__.py", line 9, in <module>
    from can.interfaces.ixxat.canlib import IXXATBus
  File "/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/can/interfaces/ixxat/canlib.py", line 26, in <module>
    from can.ctypesutil import CLibrary, HANDLE, PHANDLE, HRESULT as ctypes_HRESULT
ImportError: cannot import name 'HRESULT' from 'can.ctypesutil' (/home/jesusferrandiz/robot_automatic_validation/venv/lib/python3.8/site-packages/can/ctypesutil.py)

We have an application working for us in Windows where we communicate with the servos through ethercat only using: mc.communication.connect_servo_ethercat

Is it actually possible to achieve this in linux?

Thank you for your help in advance.

GullinBustin commented 5 months ago

Ingeniamotion 0.8.0 supports Linux https://pypi.org/project/ingeniamotion/0.8.0/

jeferal commented 5 months ago

This is very good news, thank you for letting us know!