robocre8
AboutContactSocial
  • robocre8
  • About
  • Contact
  • Social
  • DOCUMENTATIONS
    • MoboBot Documentation
    • EPMC Documentation
    • EIMU Documentation
  • EIMU TUTORIALS
    • How To Calibrate And Setup The EIMU
    • How To Use EIMU With ROS2
    • How To Use EIMU With Arduino
  • EPMC TUTORIALS
    • How To Setup DC Motor PID Speed Control With The EPMC
  • How To Use the EPMC With ROS2
  • How To Use EPMC With Arduino
  • TUTORIALS
    • How To Install ROS2 Humble Desktop On PC (FULL INSTALL)
    • How To Install ROS2 Humble Base On Raspberry Pi 4B (FULL INSTALL)
Powered by GitBook
On this page
  • Before Using The EPMC in ROS2
  • Using The EPMC in ROS2

How To Use the EPMC With ROS2

Learn how to test and integrate the Easy IMU (EIMU) in your ROS2 project

PreviousHow To Setup DC Motor PID Speed Control With The EPMCNextHow To Use EPMC With Arduino

Last updated 1 month ago

Before Using The EPMC in ROS2

  • Firstly, ensure you have your Geared DC motors connected to the EPMC Module and the motor PID gains already set up. If not, follow the instructions here [link to the post]

  • Also, before you start, it is worth knowing that you can use it with a PC, Raspberry Pi, or any microcomputer running Ubuntu OS and ROS2. You can also use docker (if you can).

  • You should also have some experience with ROS2 as a beginner or intermediate user. (e.g. Installing ROS2, setting up ros workspace, building packages with colcon, rosdep, ros topics, rviz, ros transforms, e.t.c)

Using The EPMC in ROS2

  • First clone and install the epmc harware plugin package - epmc_ros_hw_plugin.

  • Next clone and install the demo_bot package - demo_bot. The demo_bot package is a test robot for testing the EPMC plugin package. I contains example on how to implement the EPMC ROS2 control on a differential drive robot. (It requires that the epmc hardware interface plugin be installed on your computer)

NOTE: you can use in place of the demo_bot your preferred robot where you have already implemented the EPMC ROS2 control. You can also make use of the demo_bot to build your preferred 2 or 4 wheeled differential drive robot.


Basically, after cloning, installing necessary dependencies, compiling, and installing both packages using colcon build --symlink-install , you can quickly follow the steps below to test the EPMC.

  • You need to first connect the EPMC Module to your PC (or microcomputer)

  • Check the USB port the EPMC Module is connected to and give the port necessary permissions.

  • Go to the epmc_ros2_control.xacro file found in the demo_bot/demo_bot_description/urdf/ folder

  • change the port param file to the USB port found in the second step above <param name="port"> {discovered port value} </param>

  • Then ensure the motorA_wheel_name and the motorB_wheel_name params properly indicates which port you connected your left and right motor wheel.

  • Change the command interface velocity min and max parameter, to that of you Motor (i.e *W_MAX value during setup)

NOTE: at this point, you don't need to re-compile and build with colcon if you've built previosly using the --symlink-install

  • open a new terminal (and source your workspace) and launch the demo_bot_base ros2 launch demo_bot_base robot.launch.py

  • open another terminal (and source your workspace) and launch the demo_bot_rviz view file ros2 launch demo_bot_rviz robot.launch.py

  • You can drive using the ros teleop package or the arrow_key_teleop_drive package


Finally, please chekout and go through the demo_bot package to see proper sample of how combine the EIMU with the EPMC and ekf sensor-fusion in a mobile robot.