- Install Ubuntu 22.04 LTS (Jammy Jellyfish)
- Install Python
# Might need these dependencies
pip install catkin_pkg empy lark pytest jinja2 pyaml typeguard
- Install ROS2 Humble
gedit ~/.bashrc
# Add these two lines to ~/.bashrc
source /opt/ros/humble/setup.bash
export RCUTILS_COLORIZED_OUTPUT=1
sudo apt install -y libpoco-dev libeigen3-dev
mkdir project && cd project
git clone --recursive https://github.com/frankaemika/libfranka --branch 0.13.2
cd libfranka
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF ..
cmake --build . -j$(nproc)
cpack -G DEB
# Replace the * with the actual numbers in the file name, which can be found in the current directory (run "ls" to see).
sudo dpkg -i libfranka-*.deb
sudo apt install -y \
ros-humble-hardware-interface \
ros-humble-generate-parameter-library \
ros-humble-ros2-control-test-assets \
ros-humble-controller-manager \
ros-humble-control-msgs \
ros-humble-xacro \
ros-humble-angles \
ros-humble-ros2-control \
ros-humble-realtime-tools \
ros-humble-control-toolbox \
ros-humble-moveit \
ros-humble-ros2-controllers \
ros-humble-joint-state-publisher \
ros-humble-joint-state-publisher-gui \
ros-humble-ament-cmake \
ros-humble-ament-cmake-clang-format \
python3-colcon-common-extensions
# Create a workspace
cd
cd project && mkdir franka_ws
cd franka_ws && mkdir src && cd src
# Clone and build
git clone https://github.com/LOOP115/franka_ros2
cd franka_ros2 && git checkout humble
cd
cd project/franka_ws
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
gedit ~/.bashrc
# Add this line to ~/.bashrc
source ~/project/franka_ws/install/setup.bash
# Run the example
ros2 launch franka_moveit_config moveit.launch.py robot_ip:=dont-care use_fake_hardware:=true
could not find a configuration file for package franka that is compatible with requested version 0.13.2
-
Make sure to install the right version of
libranka
-
Remove uncompatible libfranka versions
dpkg -l | grep libfranka
sudo dpkg -r libfranka
sudo apt autoremove
- Create a new Ubuntu One account using your email, and register to Ubuntu Pro (free for personal use)
- Find the free token and copy it
- To attach your personal machine to a free Pro subscription, run:
sudo pro attach <your_token>
. - To enable the real-time beta kernel, run:
sudo pro enable realtime-kernel --b
- Restart the computer, and verify that real-time kernel is running
- run:
uname -r
.
- run:
- After the
PREEMPT_RT
kernel is running, add a group named realtime and add the user controlling your robot to this group:
sudo addgroup realtime
sudo usermod -a -G realtime <user>
- Afterwards, add the following limits to the realtime group in
/etc/security/limits.conf
:
@realtime soft rtprio 99
@realtime soft priority 99
@realtime soft memlock 102400
@realtime hard rtprio 99
@realtime hard priority 99
@realtime hard memlock 102400
- IMPORTANT:
- The limits will be applied after you log out and in again. (if not, restart the computer)
sudo apt install cpufrequtils
cpufreq-info
- Then, execute the following commands
sudo systemctl disable ondemand
sudo systemctl enable cpufrequtils
sudo sh -c 'echo "GOVERNOR=performance" > /etc/default/cpufrequtils'
sudo systemctl daemon-reload && sudo systemctl restart cpufrequtils