sudo apt install ros-melodic-libfranka ros-melodic-franka-ros ros-melodic-control-msgs # you can change to noetic
conda create -n franka-teleop python=3.10 -y # 3.8(stable) / 3.10
conda activate franka-teleop
pip install colcon-common-extensions "empy==3.3.4" lark-parser lxml netifaces pyyaml rosdistro vcstool setuptools
cd frankapy
pip install -e . # you should run this before installing franka-interface
cd ..cd franka-interface You should follow the instructions in README.md
cd frankapyYou should follow the instructions in README.md
You can also follow the instructions in Website
-
Make sure that the Franka Robot has been unlocked in the Franka Desk GUI and has blue lights.
-
Open up a new terminal and go to the frankapy directory.
cd frankapy sudo ufw disable # especially on C19 NUC
You should modify
control_pc_franka_interface_pathin./bash_scripts/start_control_pc.sh, to find the franka-interface.- If you are running franka-interface and frankapy on the same computer, run the following command:
bash ./bash_scripts/start_control_pc.sh -i localhost
- Otherwise run the following command:
bash ./bash_scripts/start_control_pc.sh -u [control-pc-username] -i [control-pc-name]
Please see the
start_control_pc.shbash script for additional arguments, including specifying a custom directory for wherefranka-interfaceis installed on the Control PC as well as the username of the account on the Control PC. By default the username isiam-lab. -
Open up a new terminal, enter into the same virtual environment and go to the frankapy directory. Do:
# in ROS 1 source catkin_ws/devel/setup.bash # in ROS 2 source ros2_ws/install/setup.bash
Be in the same virtualenv or Conda env that FrankaPy was installed in. Place your hand on top of the e-stop. Reset the robot pose with the following command.
python scripts/reset_arm.py
-
Please note that if you are using a custom gripper or no gripper, please set the with_gripper=True flag in frankapy/franka_arm.py to False as well as set the with_gripper=1 flag in bash_scripts/start_control_pc.sh to 0.
See example scripts in the examples/ and scripts/ folders to learn how to use the FrankaPy python package.
If you want to use space_mouse to teleop and collect data, you should follow the instruction