This the ROS2 Hardware Interface Package for the EPMC (Easy PID Motor Controller) Module with ROS2 in a PC or microcomputer, after successful setup with the epmc_setup_application.
-
ensure you've already set up your microcomputer or PC system with ROS2
-
install the
libserial-devpackage on your linux machinesudo apt-get update sudo apt install libserial-dev
-
install
rosdepso you can install necessary ros related dependencies for the package.sudo apt-get update sudo apt install python3-rosdep sudo rosdep init rosdep update
-
In the
src/folder of yourros workspace, clone the repo (or you can download and add it manually to thesrc/folder)git clone https://github.com/robocre8/epmc_hardware_interface.git
-
from the
src/folder, cd into the root directory of yourros workspaceand run rosdep to install all necessary ros dependenciescd ../ rosdep install --from-paths src --ignore-src -r -y -
build the
epmc_hardware_interfacepackage with colcon (in the root folder of your ros workspace):colcon build --packages-select epmc_hardware_interface
Note
The epmc_hardware_interface package will now be available for use in any project in your ros workspace.
You can see example of how the use the epmc_hardware_interface in the example_control_file
- Please check out the
mobo_botpackage to see a proper sample of how the EPMC is used.
-
ensure the
Easy PID Motor Controller (EPMC) Module(i.eL298N EPMC Moduleor anyCustom EPMC Interface Board), with the motors connected and fully set up for velocity PID, is connected to the microcomputer or PC via USB. -
check the serial port the driver is connected to:
ls /dev/ttyA*you should see /dev/ttyACM0 or /dev/ttyACM1 and so on
-
once you have gotten the port, update the port parameter in the
<ros2_control>tag in the URDF'sros2_control.xacro -
you can the build and run your robot.
-
Good Luck !!!