Open TheWylieStCoyote opened 2 weeks ago
Are you using the most up to date version of the code? You might be running your code (that is based on an old version) in combination with the latest version of this repository.
In the latest version Driver
is a pure abstract base class that allows me to extend this driver from CAN to other interfaces like RS-485 in the future. The binding for Driver
in this version only exists as it is used in the interface of ActuatorInterface
. This way I could add an Rs485Driver
and use it interchangeably.
The syntax in the latest version is therefore slightly different (see the main read-me for more information):
import myactuator_rmd_py as rmd
driver = rmd.CanDriver("can0")
actuator = rmd.ActuatorInterface(driver, 1)
I pulled in the most newest. Where should I go?
The latest is perfectly fine but as said you are not running the right commands. As said try the following:
import myactuator_rmd_py as rmd
driver = rmd.CanDriver("can0")
actuator = rmd.ActuatorInterface(driver, 1)
Hi @TheWylieStCoyote, Did this resolve your issue?
Yes but, it ended up being a miss configured Python path problem is what I was having. When I would go to import myactuator_rmd_py it was returning the bindings for the old version. However now I am getting a SocketExecption: Interface 'can0' - Could not read CAN frame: Resource temporarily unavailable when ever I'm trying to communicate with the motors.
Pretty certain that this is not related to this driver but instead a misconfiguration of the communication. The three reasons that I can think of off the top of my head:
$ ifconfig
if the interface is up and its name is indeed can0
. Otherwise you might have set it to up as described in the Setup.md
read-me in the doc/
folder.cansend
(e.g. $ cansend can0 141#a400f401a08c0000
, for more details see the very same read-me). If this fails power cycle the actuator and try again.myactuator_rmd::can::ControllerProblemError
and I had to reset the CAN communication by connecting over UART with their Windows GUI and resetting the CAN communication as described in this post.
The python bindings fail when creating new driver.