- Hardware Setting
- real-time kernal.md
Before you usingFranka FCI, youMUSTset upreal-time kernalfirst, becausereal-time kernalwill make sure that the rate of control reaches 1kHz without delay. see more details inreal-time kernal.md - libfranka
- franka-interface
- frankapy (current markdown)
This is a software package used for controlling and learning skills on the Franka Research Arm (Emika Panda and Franka Research 3)
Installation Instructions and Network Configuration Instructions are also available here: https://iamlab-cmu.github.io/frankapy
To join the Discord community, click the link here.
- A computer with the Ubuntu 18.04 / 20.04.
- ROS Melodic / Noetic
- Protocol Buffers
This library is intended to be installed on any computer in the same ROS network with the computer that interfaces with the Franka (we call the latter the Control PC).
FrankaPy will send commands to franka-interface, which actually controls the robot.
This is only needed if you plan to modify the proto messages. You don't need to install or compile protobuf for using frankapy
We use both C++ and Python versions of protobufs so you would need to install Protobufs from source.
Do nproc to find out how many cores you have, and use that as the N number in the make command below:
nproc
output (this is just an example of my computer)
12
then execute
sudo apt-get install autoconf automake libtool curl make g++ unzip
cd $HOME/Franka/
wget https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.zip
unzip protobuf-all-21.8.zip
cd protobuf-21.8
./configure
make -jN
make check -jN
sudo make install
sudo ldconfigSee detailed instructions here
cd $HOME/Franka
git clone --recurse-submodules [email protected]:iamlab-cmu/frankapy.git All directories below are given relative to /frankapy.
pip install -e .output
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 2.9 MB/s eta 0:00:00
Downloading ruamel.yaml.clib-0.2.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (724 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 724.9/724.9 kB 1.9 MB/s eta 0:00:00
Downloading threadpoolctl-3.5.0-py3-none-any.whl (18 kB)
Downloading tifffile-2024.8.30-py3-none-any.whl (227 kB)
Building wheels for collected packages: empy
Building wheel for empy (setup.py) ... done
Created wheel for empy: filename=empy-3.3.4-py3-none-any.whl size=29380 sha256=3ab9fd8ace346824ddf8cdb8a09722661c6af2c4c350ad90f872849a0175e684
Stored in directory: /home/robotics/.cache/pip/wheels/c7/0a/c4/a0dc05ea753ca932849616e1c1886ad3c50aaa2c8f09c6a552
Successfully built empy
Installing collected packages: empy, threadpoolctl, setproctitle, ruamel.yaml.clib, protobuf, numpy, networkx, llvmlite, joblib, dill, colorlog, tifffile, ruamel.yaml, opencv-python, numpy-quaternion, numba, multiprocess, imageio, scikit-learn, scikit-image, autolab_core, frankapy
Attempting uninstall: empy
Found existing installation: empy 4.2
Uninstalling empy-4.2:
Successfully uninstalled empy-4.2
Attempting uninstall: numpy
Found existing installation: numpy 2.0.1
Uninstalling numpy-2.0.1:
Successfully uninstalled numpy-2.0.1
DEPRECATION: Legacy editable install of frankapy==1.0.0 from file:///home/robotics/Franka/frankapy (setup.py develop) is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457
Running setup.py develop for frankapy
Successfully installed autolab_core-1.1.1 colorlog-6.9.0 dill-0.3.9 empy-3.3.4 frankapy imageio-2.37.0 joblib-1.4.2 llvmlite-0.43.0 multiprocess-0.70.17 networkx-3.2.1 numba-0.60.0 numpy-1.26.4 numpy-quaternion-2023.0.4 opencv-python-4.11.0.86 protobuf-6.30.0 ruamel.yaml-0.18.10 ruamel.yaml.clib-0.2.12 scikit-image-0.24.0 scikit-learn-1.6.1 setproctitle-1.3.5 threadpoolctl-3.5.0 tifffile-2024.8.30
- bash
source ~/Franka/frankapy/catkin_ws/devel/setup.bash --extend
- zsh
source ~/Franka/frankapy/catkin_ws/devel/setup.zsh --extend
compile
./$HOME/Franka/frankapy/bash_scripts/make_catkin.sh/home/ubuntu/Franka/frankapy/bash_scripts/make_catkin.sh: 第 1 行: cd: $'catkin_ws\r': 没有那个文件或目录
usage: catkin [-h] [-a] [--test-colors] [--version]
[--force-color | --no-color]
[build | clean | config | create | env | init | list | locate | profile | test]
...
' provided.own verb 'build
sudo apt-get install dos2unix
dos2unix $HOME/Franka/frankapy/bash_scripts/make_catkin.sh
we use the franka_ros package, so install libfranka and franka_ros using the following command
- noetic
sudo apt install ros-noetic-libfranka ros-noetic-franka-ros5. To make the protobufs use the following script (you don't need to do this if you haven't modified the proto messages):
./$HOME/Franka/frankapy/bash_scripts/make_proto.sh然后激活FCI
显示这样的状态证明激活
make sure the operations option in Execution option so that can use programs to control
control_pc_uname="robotics"
control_pc_use_password=0
control_pc_password=""
control_pc_franka_interface_path="/home/robotics/Franka/franka-interface"
start_franka_interface=1
robot_number=1
robot_ip="192.168.1.10"
with_gripper=1
old_gripper=0
log_on_franka_interface=0
stop_on_error=0
here you should set
control_pc_uname: your ubuntu namecontrol_pc_franka_interface_path: yourfranka-interfacepathrobot_ip: your FR3 control unit ip
bash ./$HOME/Franka/frankapy/bash_scripts/start_control_pc.sh -i localhost弹出4个窗口且没有报错则证明运行成功
/home/ubuntu/Franka/frankapy/bash_scripts/start_control_pc.sh: 行 2: $'\r':未找到命令
/home/ubuntu/Franka/frankapy/bash_scripts/start_control_pc.sh: 行 3: 未预期的符号“$'{\r'”附近有语法错误
'home/ubuntu/Franka/frankapy/bash_scripts/start_control_pc.sh: 行 3: `die () {
dos2unix $HOME/Franka/frankapy/bash_scripts/start_control_pc.sh
- zsh
sudo vim ~/.zshrc
source $HOME/Franka/frankapy/catkin_ws/devel/setup.zsh
- bash
sudo vim ~/.bashrc
source $HOME/Franka/frankapy/catkin_ws/devel/setup.bash
python $HOME/Franka/frankapy/scripts/reset_arm.pyoutput
WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
Starting robot
Reset with joints
Opening Grippers
WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
Traceback (most recent call last):
File "/home/ubuntu/Franka/frankapy/scripts/reset_arm.py", line 2, in <module>
from frankapy import FrankaArm
File "/home/ubuntu/Franka/frankapy/frankapy/__init__.py", line 1, in <module>
from .franka_arm import FrankaArm
File "/home/ubuntu/Franka/frankapy/frankapy/franka_arm.py", line 23, in <module>
from .skill_list import *
File "/home/ubuntu/Franka/frankapy/frankapy/skill_list.py", line 10, in <module>
from .proto import *
File "/home/ubuntu/Franka/frankapy/frankapy/proto/__init__.py", line 1, in <module>
from .feedback_controller_params_msg_pb2 import *
File "/home/ubuntu/Franka/frankapy/frankapy/proto/feedback_controller_params_msg_pb2.py", line 5, in <module>
from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder'
protobuf版本过低,卸载后下载新的
pip install protobuf==4.21.0
python $HOME/Franka/frankapy/scripts/run_guide_mode.pyoutput
Starting robot
Applying 0 force torque control for 100s
Tra: [0.30519667 0.17031028 0.47904631]
Rot: [[ 0.88890429 0.40035878 0.2226252 ]
[ 0.40509148 -0.91390459 0.02606254]
[ 0.21389255 0.06701647 -0.97455568]]
Qtn: [0.01053589 0.97177216 0.2072117 0.11229941]
from franka_tool to world
[-0.25088293 -0.97060835 0.51566798 -2.42281932 0.42787614 1.74904618
0.44488596]
python $HOME/Franka/frankapy/scripts/close_gripper.pypython $HOME/Franka/frankapy/scripts/open_gripper.pypython $HOME/Franka/frankapy/control/getJ.pypython $HOME/Franka/frankapy/control/getP.pypython $HOME/Franka/frankapy/control/moveP.pypython $HOME/Franka/frankapy/control/moveJ.pypython $HOME/Franka/frankapy/scripts/record_trajectory.py默认记录10s轨迹数据,数据存储在frankapy下,文件名为franka_traj.pkl
python scripts/run_recorded_trajectory.py -t franka_traj.pklSee example scripts in the examples/ and scripts/ to learn how to use the FrankaPy python package.
If this library proves useful to your research, please cite the paper below::
@article{zhang2020modular,
title={A modular robotic arm control stack for research: Franka-interface and frankapy},
author={Zhang, Kevin and Sharma, Mohit and Liang, Jacky and Kroemer, Oliver},
journal={arXiv preprint arXiv:2011.02398},
year={2020}
}







