ros_canopen conflict with motor card logic
Hello, i am using ROS melodic on an ubuntu 18 machine.
I have two motor card (Nanotec C5-E, which follows CiA 402), i am using roscanopen package to control them and it is working thus far. Except for one thing, i implemented some logic in the motor cards so that they block the motors with a digital input (emergency stop button), the code in the motor drive changes the Statusworld (6041h) from "Operation enabled" to "Quick Stop Active". This works perfectly when i use the motor drive provider software on Windows, but once i launch it with roscanopen on Ubuntu, the state does change for one cycle when pushing the button, but goes back to operation enabled in the next cycle. I feel like ros_canopen always send the transition to "Operation enable", this also happen if i use "Switched On" state instead of "Quick Stop Active".
One thing that does work is if i change the state to "Switch on disabled" or "Ready to Switch on" when pushing the button, in this case, as there is no direct transition to "Operation enabled", it stays in the state it was, but the downside is that the motors are not powered anymore, and i want to block them.
So, is there a way to forbid ros_canopen to change the state ? i want to use it solely for velocity input and odometry monitoring, and let the cards handle the state changes. Thanks.
Asked by sisssif on 2022-07-11 10:45:11 UTC
Comments