UP | HOME

Emika Franka Panda Robot

Introduction

The Emika Franka Panda robot is a 7-DOF robot arm with a 3kg max payload and full torque sensing at each joint.

The robot is connected to a workstation computer running the Realtime Linux Kernel. Your laptop connects to the workstation computer. In general, the software you write will run on your laptop and control the robot over the network; however, in more advanced configurations it is possible to run your code on the workstation computers.

Layers of Control

  1. MoveIt: At the highest layer, the robot can be controlled through MoveIt and ROS.
  2. ros_control: There are several ROS controllers that can be used, written with the ros_control package. It is also possible to write your own controllers.
  3. libfranka: this is a C++ library provided by Franka. ROS uses this library to communicate with and control the robot, and you can use it also.
  1. Web interface: a web interface is available at robot.franka.de. Graphical programming of pre-determined tasks is possible, as is interactively placing the robot and storing its position.

Software Setup

These instructions are somewhat in flux, as the relevant franka and MoveIt packages are being updated for noetic.

  1. Make sure you have the most up-to-date ROS packages:

    sudo apt update
    sudo apt upgrade
    
  2. Install the pre-requisites:

    sudo apt install \
         ros-noetic-franka-ros\
         ros-noetic-moveit \
         ros-noetic-moveit-visual-tools \
         ros-noetic-panda-moveit-config
    
  3. Check to make sure you have the ~/custom_ws on your CMAKE_PREFIX_PATH (echo $CMAKE_PREFIX_PATH). If not, complete the PincherX 100 Setup Instructions and make sure that you source ~/custom_ws in ~/.bashrc
  4. Add the panda_moveit_config to your custom workspace:

    cd ~/custom_ws/src
    git clone https://github.com/ros-planning/panda_moveit_config 
    cd panda_moveit_config
    git checkout c2eeb1f
    cd ~/custom_ws
    catkin_make
    
  5. Make sure that the custom_ws is on your CMAKE_PREFIX_PATH (echo $CMAKE_PREFIX_PATH)

Getting Started

Power On

If the robot is off, you will need to turn it on (obviously!).

  1. Make sure the e-stop is not pressed (pull up on the red button).
  2. Turn the power-strip on.
    • The workstation PC should power on automatically
  3. Turn the Franka Controller on.
    • The Panda lights should flash yellow
  4. Wait for the yellow lights to stop flashing.
  5. Yellow lights indicate the robot is locked and cannot move.

The Web Interface

  1. Plug the ethernet cord into your computer.
  2. Make sure the enabling device is within reach and pressed down (robot is disabled)
  3. Your computer should obtain an ip address automatically.
  4. You should be able to ping robot.franka.de and station (the workstation computer)
    • There is a slight delay before DNS name resolution starts working, so be patient
  5. Navigate in your web browser to robot.franka.de
    • This is the graphical, non-programmer interface to the robot
    • Login with the information I have provided
    • Although I do have command-line library in development, for now we will have to use this interface to lock/unlock the robot
  6. If somebody has already been using the robot, you will be prompted to request control
    • Press request control
    • Click enforce
    • Click the button labeled with a circle on the top of the robot
    • The web interface should now be enabled
  7. Press the enabling device to disable the robot.
  8. Unlock the robot by clicking the unlock button. The lights should turn white.
  9. You can now manually move the robot by pressing the two buttons on the end of the arm
    • The web-interface has some options about how this movement works, and you can toggle between them on the robot arm itself
    • Two buttons on the top of the head open and close the grippers
    • Do not force the robot, it should move freely when pressing the buttons properly

Enabling ROS

  1. We need to relinquish web control of the robot to use ROS
  2. In the hamburger menu in the upper-right corner, select Activate Franka Control Interface (FCI)
  3. The web interface no longer has control, and you can now use ROS

Using ROS

  1. The nodes that are responsible for controlling the robot and reading its sensor data should run on the workstation computer 1

From Laptop

  1. Make sure your ROS_MASTER_URI is http://$(hostname):11311, where $(hostname) is the name of your computer (you see user@hostname at your command prompt).
    • echo $ROS_MASTER_URI to see its value. If it is http://localhost:11311 add export ROS_MASTER_URI=http://$(hostname):11311 to your ~/.bashrc
  2. SSH into the robot workstation: ssh -oSendEnv=ROS_MASTER_URI student@station
    • If access is denied, follow the Turtlebot3 instructions to obtain the id_turtle ssh key.

From station

  1. Start the franka_ros controllers: roslaunch franka_control franka_control.launch robot_ip:=robot.franka.de
    • Keep this console open. If these ever stop running, you will need to start them again to use the robot.
  2. At this point you could theoretically move the robot using the low-level ros_control topics, and you can load a robot_description into rviz to visualize the robot location.

From Laptop

  1. rosnode list and rostopic list should now show several franka-related nodes and topics
  2. Start moveit with roslaunch panda_moveit_config panda_control_moveit_rviz.launch launch_franka_control:=false robot_ip:=robot.franka.de
  3. You will need to add the moveitcommander panel in rviz if you want to control the robot
  4. If the robot was disabled when starting the controllers, you will need to enable it and clear the error before using moveit.
  5. Before enabling the robot, make sure the workspace is clear
  6. When moving the robot, be ready to press the enabling device at all times.

Enabling Device

  1. If the robot is disabled (white lights) the robot will not move
  2. To enable the robot, twist the enabling device so it pops up. The robot lights should turn blue
  3. You will then need to reset the error state of the robot, which can be done by rostopic pub -1 /franka_control/error_recovery/goal franka_msgs/ErrorRecoveryActionGoal "{}",
  4. Sometimes you need to try some combination of pressing the enabling device, releasing it, and publishing to that topic:

Finished With Robot

Before you step away from the robot:

  1. Move the robot to a reasonable ready position (either using MoveIt, or by manually moving it)
  2. Make sure the robot is disabled (press the enabling device so the lights turn white).
  3. Kill the franka_controller that you started on the robot
  4. In robot.franka.de, deactivate the FCI
  5. Lock the robot.

Power Off

  1. In the robot.franka.de menu, select shutdown.
  2. Wait for the robot's lights to turn off and the fans in the control box to stop spinning
  3. Power off the control box
  4. Power off the power strip

Robot Status Lights

  1. Yellow: Robot is Locked. Do not attempt to move the arm, you can damage it.
    • The franka_ros controller will fail to start if the robot is locked
    • If you leave the robot unattended, put it lock mode.
  2. White: Robot is disabled. You can physically move the arm by pressing the move buttons near the end-effector
    • Do not attempt to force the arm to move in this mode
    • The arm cannot undergo a motion initiated from the computer in this mode
    • This mode is entered by pressing the enabling device
  3. Blue: Robot is enabled. It can move due to computer commands.
    • No person (including you) should not be in the robot workspace when the robot is blue.
    • You must pay attention and be ready to press the enabling device (to disable the robot) if an unexpected movement occurs
    • Enter this mode by twisting the enabling device so that the button pops up
  4. Green:
    • This mode is entered when the robot is executing a command from the web interface
    • We won't often see this mode
  5. Red: Error
    • You can enter this mode in a number of ways, but one way is if you try to force any of the arm joints to move too much
    • You will need to power cycle the robot to remove the error
    • If power-cycling does not clear the red lights, contact me and stop using the robot

Mechanical

  1. Franka World provides a full SolidWorks Model of the robot and also CAD for mounting cameras to the arm

Resources

  1. Software Documentation
    • Particular attention to franka_ros
  2. Franka World (Free signup required): provides access to the manual, and some useful SolidWorks models (for example to attach a realsense to the robot).

Footnotes:

1

You have a choice to run rosmaster on either the workstation or your laptop; however, these instructions assume that rosmaster runs on your laptop. The key here is that ROS_MASTER_URI is set on both computers to be the same (and not to localhost).

Author: Matthew Elwin.