set download source
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'add ros-key
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -download noetic package
sudo apt update
sudo apt install ros-noetic-desktop-fullset global environment
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrcinstall tools for ros
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall generator python3-wstool build-essentialcheck the installation
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_keybuild from the ROS repositories, and please refer to here to check the version-match between the franka system and the softwares'
sudo apt-get update
sudo apt-get install ros-noetic-libfranka ros-noetic-franka-rosbuild from source
mkdir -p catkin_ws/src
cd catkin_ws/src
git clone [email protected]:rail-berkeley/serl_franka_controllers.git
cd catkin_ws
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 --pkg serl_franka_controllers
cd ..
source catkin_ws/devel/setup.bashbuild miniforge if you don't have it
cd /path/you/want/to/locate/
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
source /path/to/your/miniforge3/bin/activatebuild the corresponding environment
cd robot_infra
conda create -n robot_infra python=3.9
conda activate robot_infra
pip install -e .check the path of each package in the env
python
import _package_to_test_
print(_package_to_test_.__file__)- initialization
source /home/franka/jeffrey/miniforge3/bin/activate
conda activate robot_infra
cd /home/franka/jeffrey/Franka_Robot_Arm- run
source catkin_ws/devel/setup.bash
python franka_ctrl/test.py --robot_ip=192.168.3.20- close
killall -9 roscore
killall -9 rosmasterinstall the packages for SpaceMouse (3Dconnexion)
pip install numpy termcolor atomics scipy
pip install git+https://github.com/cheng-chi/spnav
sudo apt install libspnav-dev spacenavd
sudo systemctl start spacenavddownload the source from here
# build foler
mkdir franka_env
cd franka_env
# download corresponding packages
curl -SLO https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.76.tar.gz
curl -SLO https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patch-5.15.76-rt53.patch.gz
# unzip
tar xvzf linux-5.15.76.tar.gz
gunzip patch-5.15.76-rt53.patch.gz
# extract source code and insert the patch
cd linux-5.15.76
patch -p1 < ../patch-5.15.76-rt53.patchbuild the kernel from now on (refer to here or here)
# download neccessary packages
sudo apt-get install build-essential bc curl ca-certificates gnupg2 libssl-dev lsb-release libelf-dev bison flex dwarves zstd libncurses-dev
# borrow the config setting from current kernel
make olddefconfigupdate the config of current kernel
make menuconig- General Setup -> Preemption Model -> Fully Preemptible Kernel (Real-Time)
- Cryptographic API -> Certificates for signature checking -> Provide system-wide ring of trusted keys -> Additional X.509 keys for default system keyring -> remove "debian/canonical-certs.pem" -> save to .config open .config for further update
gedit .config
# change the following old commands
CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"
CONFIG_SYSTEM_REVOCATION_KEYS="debian/canonical-revoked-certs.pem"
CONFIG_DEBUG_INFO_BTF=y
# to the following new commands
CONFIG_SYSTEM_TRUSTED_KEYS=""
CONFIG_SYSTEM_REVOCATION_KEYS=""
CONFIG_DEBUG_INFO_BTF=nbegin to build kernel locally
fakeroot make -j24 deb-pkgfinally, install the built kernel with patch
# install
sudo dpkg -i ../linux-headers-5.15.76-rt53*.deb ../linux-image-5.15.76-rt53*.deb
# re-start the computer
sudo reboot
# check
uname -msrbuild a group for realtime command
sudo addgroup realtime
sudo usermod -a -G realtime $(whoami)add the following limits into /etc/security/limits.conf, which is set for realtime group
@realtime soft rtprio 99
@realtime soft priority 99
@realtime soft memlock 102400
@realtime hard rtprio 99
@realtime hard priority 99
@realtime hard memlock 102400finally, re-start your computer to apply it
reboot🔪 libfranka: Move command aborted by reflex! ["communication_constraints_violation"] control_command_success_rate: 0,78
the problem mainly comes from the communication delay between the PC and the franka, and you can check the following reasons: 1) overloaded PC (limited CPU resources) 2) unsuitable network card 3) inactive real-time kernel 3) network issues from cable
🔪 Robot error: joint limit reached
the error seems to result from an abnormal recovery process of the Franka arm, with the underlying cause still unclear. As a temporary solution, we manually move the arm several times and wait briefly to allow for recovery.