Motor control using ROS, Epos2 and CANOpen
Hello everyone,
I happen to be stuck for a few days now by problems some of the forum's members apparently already encountered, whence this question. I hope the latter will not be considered as superfluous, and that it could prove to be helpful to others.
My computer runs a 64-bit Debian GNU/Linux 10 (buster) OS, and ROS Noetic Ninjemys (rosversion -d
says noetic
). I besides installed the package "ros_canopen" from the "package.ros.org" repositories using sudo apt-get install ros-noetic-ros-canopen
.
My current goal is to manage to send rotation speed commands to an AC motor equipped with a Hall sensor (similar to this model) through an EPOS2 70/10 electric drive, using the CANOpen communication protocol, and thus, the "ros_canopen" package. My problem is that I actually don't know where to start to achieve such objective.
After some researches, I ended up trying to follow the steps proposed here on the forum. I was though not even able to complete the first stage, consisting in setting-up SocketCAN. I met indeed two issues:
- When loading the drivers, the command
sudo modprobe pcan
returnsmodprobe: FATAL: Module pcan not found in directory /lib/modules/4.19.0-9-amd64
- When running
sudo ip link set can0 up type can bitrate 1000000
, which sayssudo ip link set can0 up type can bitrate 1000000
. The device "can0" does besides not appear in the list provided byifconfig -a
.
Could you please give me a clue about how to overcome those problems ?
An additional difficulty may come from the fact that I have chosen thus far to connect the EPOS2 controller to my computer using its USB output only. I do not employ any CAN-to-USB interface, simply because I do not have one to hand for now. Is such a device necessary to perform motor control ?
Could you finally please recommend me a tutorial, or give me pieces of advice, regarding motor control using the "ros_canopen" package.
Thanks a lot, regards,
Julien.