MoveIt2
Installation Required Dependencies
1. Installing the Preempt-RT Real-Time Patch on Ubuntu 22.04
1.1 Check Kernel Version and Install Necessary Packages
uname -a
1.2 Install Necessary Packages
apt install autoconf automake libtool make libncurses-dev flex bison libelf-dev libssl-dev zstd net-tools
1.3 Download the Kernel and Patches
https://mirrors.edge.kernel.org/pub/linux/kernel/
Download the Linux kernel from the Link. Find your version—it's not the small files above, scroll down to find the Linux kernel files starting with "Linux" that are over 100MB.
https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/
Download the real-time patches from the Link. Make sure to choose the patch that matches your kernel version.
1.4 Extract and Apply the Patch
tar -zxvf linux-5.19.tar.gz
xz -d patch-5.19-rt10.patch.xz
cd linux-5.19/
patch -p1 < ../patch-5.19-rt10.patch
1.5 Kernel Configuration
make menuconfig
After entering the graphical configuration interface, perform the following operations:
- General Setup -> Preemption Model -> Fully Preemptible Kernel(RT)
- General Setup -> Timers subsystem -> Timer tick handling -> Full dynticks system
- General Setup -> Timers subsystem -> High Resolution Timer Support
- Processor type and features -> Timer frequency -> 1000 HZ
Remember to save and exit.
vi .config
CONFIG_SYSTEM_TRUSTED_KEYS=""
CONFIG_SYSTEM_REVOCATION_KEYS=""
Save and exit.
1.6 Compile and Install
make -j8`nproc`
After completion:
make modules_install
make install
1.7 Configure GRUB Boot Options
vim /etc/default/grub
- Comment out the following line to display the boot menu:
GRUB_TIMEOUT_STYLE=hidden
- Adjust the timeout value:
GRUB_TIMEOUT=5 # Timeout in seconds
- Update GRUB configuration:
update-grub
1.8 Reboot
1.9 Testing
apt-get install rt-tests
cyclictest -t 5 -p 80 -i 1000
cyclictest
will perform 1000 cyclic tests over 5 seconds at the highest priority to measure the real-time performance of the Linux system. After the test, cyclictest will output statistical information about the test results.
2. ROS2-Humble
It is easy to be installed by learning ROS2 documentation: Humble
3. ROS2-Control
It is easy to be installed by learning this link
4. MoveIt2
It is easy to be installed by learning this link
5. IGH-EtherCAT
5.1 Installing EtherLab
It is easy to be installed by learning this link
5.2 Building ethercat_driver_ros2
It is easy to be installed by learning this link
6. ROS2_eRob_MoveIt
git clone https://github.com/wdb-123/ROS2_eRob_MoveIt
cd ROS2_eRob_MoveIt
colcon build
source ./install/seup.bash
ros2 launch erob_position_control demo.launch.py