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, write software on your laptop and control the robot over the network; however, in more advanced configurations it is possible to run your code directly 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 ros2_control package. It is also possible to write your own controllers in C++.
  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 that runs on the robot.
    • Graphical programming of pre-determined tasks is possible, as is interactively placing the robot and storing its position.

Software Setup

# Create a new ros 2 workspace
mkdir -p ws/franka/src
cd ws/franka

# Clone the repositories
vcs import --recursive --input \
    https://raw.githubusercontent.com/m-elwin/numsr_patches/iron_patches/iron_patches.repos src

# Install dependencies
rosdep install --from-paths src -r -y

# Add the numsr colcon mixin
colcon mixin add numsr_patches file://$(pwd)/src/numsr_patches/index.yaml
colcon mixin update numsr_patches

# Build the workspace
colcon build --mixin numsr

Time Synchronization

  1. The Franka workstations are not connected to the internet, therefore their clocks can drift relative to your computer
  2. It is advantageous that all nodes running on a local network have synchronized clocks
  3. To synchronize directly between your laptop and the robot we will set up an NTP server and using chrony
    • chrony provides an advanced NTP client and server
  4. Install chrony with sudo apt install chrony
  5. Set up the server:
    • Edit the configuration file sudoedit /etc/chrony/chrony.conf
    • Add the following lines

      allow 192.168.18/24
      local stratum 10
      
    • Restart chrony: sudo systemctl restart chrony
  6. After this one-time install, you can resync the workstation time with your computer by running the following command on the station:
    • sudo -E timesync.bash
    • The above command should be run whenever you switch laptops in order to have the station synchronize with the newly connected laptop
  7. When on the station you can view time synchronization status with chronyc tracking
    • You can also view the state of the sources with chronyc sources

Getting Started

Rules

  1. Make sure the workspace is clear of people objects whenever the robot's lights are blue or green.
  2. Never force the robot to move physically. Always use the guided movement mode (pressing buttons on arm, lights are white).
  3. Be gentle in the guided movement mode and don't try to force the robot.
    • In guided mode the robot should be easy to move. If it is resisting stop and investigate.
  4. Test actions in MoveIt with the fake hardware before deploying on the robot:
    • Make sure that the robot moves as you expect
  5. Always have somebody ready to press the enabling device to stop the robot.
    • Some projects will require the three-state switch rather than the enabling device (I will let you know).
    • Press the device whenever the robot deviates from how you expect it to behave or if it looks like it might crash.
  6. Follow all power on and power off procedures in this manual.
  7. If you ever see Red lights, power off the robot and turn it on.
    • If they remain red after one complete power cycle, stop working and contact me.

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 and Franka Controller should power on automatically
    • The Panda lights should flash yellow for a time
  3. Wait for the yellow lights to stop flashing.
  4. Yellow lights indicate the robot is locked and cannot move.

The Web Interface

  1. Plug the ethernet cord from the robot into your computer.
    • Your computer should obtain an ip address automatically, but it may take a little while.
  2. Make sure the enabling device is within reach and pressed down (robot is disabled).
  3. Navigate in your web browser to https://panda0.robot
    • This is the graphical, non-programmer interface to the robot
    • You will get an SSL warning. It is okay to accept the risk and continue (you are not on the internet here this is just the robot and I can't change its SSL certificate).
    • Login with the information I have provided
  4. 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
  5. Make sure nobody is in the robot's workspace.
  6. Unlock the robot by clicking the unlock button. The robot's lights should turn white.
  7. 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 by pressing it's buttons
    • 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. In the hamburger menu in the upper-right corner, select Activate Franka Control Interface (FCI)
  2. The web interface no longer has control, and you can now use ROS

Using ROS

  1. ssh into station, using the credentials that I provide.
    • You can also use ssh-copy-id to install your ssh certificate and avoid entering the password each time.
  2. Release the enabling device, so that the robot lights are blue
  3. On station run ros2 launch franka_moveit_config moveit.launch.py use_rviz:=false robot_ip:=panda0.robot to start the controllers and moveit
  4. On laptop run ros2 launch franka_moveit_config rviz.launch.py robot_ip:=panda0.robot to launch rviz
    • You can also specify the rviz_config parameter to load an alternative rviz file, if you want to customize the visualization
  5. The move_group node is running on station, but you can communicate with it via its actions, services, and topics without worrying about that
  6. Pressing the enabling device will stop the robot and cause some nodes to crash

Enabling Device

  1. Feel free to press the enabling device at any time to stop the robot
  2. After pressing, you will need to
    • Make sure to terminate the moveit.launch.py launchfile
    • Release the enabling device (possibly after manually guiding the robot to a new position)
    • Re-run the moveit.launch.py launchfile

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 any launchfiles or nodes that you started on station
  4. In the web interface, disable the FCI.
  5. Lock the robot.
  6. It is okay to step away from the robot when it is locked.

Power Off

  1. In the web interface, 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 power strip

Robot Status Lights

  1. Yellow: Robot is Locked. Do not attempt to move the arm, you can damage it.
    • 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

Red Light Troubleshooting

  • If the red lights turn on but then clear after resetting the robot you are likely near a joint limit
  • To see if this is the issue, unlock the robot and enable it (Blue Lights)
    • In the web interface, under "Robot Status" the robot picture will be blue but there will be a message saying "joint limit exceeded"
  • To clear the joint limit exceeded message you need to carefully manipulate each joint (under white lights) so that they are not near the joint limits.

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).

Author: Matthew Elwin