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
- MoveIt: At the highest layer, the robot can be controlled
through MoveIt and ROS.
- Currently this is provided by my fork of https://github.com/frankaemika/franka_ros2, a package that is already in the
nuws
- Currently this is provided by my fork of https://github.com/frankaemika/franka_ros2, a package that is already in the
- 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++.
- 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.
- 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
- The Franka workstations are not connected to the internet, therefore their clocks can drift relative to your computer
- It is advantageous that all nodes running on a local network have synchronized clocks
- 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
- Install chrony with
sudo apt install chrony
- 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
- Edit the configuration file
- 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
- When on the
station
you can view time synchronization status withchronyc tracking
- You can also view the state of the sources with
chronyc sources
- You can also view the state of the sources with
Getting Started
Rules
- Make sure the workspace is clear of people objects whenever the robot's lights are blue or green.
- Never force the robot to move physically. Always use the guided movement mode (pressing buttons on arm, lights are white).
- 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.
- Test actions in MoveIt with the fake hardware before deploying on the robot:
- Make sure that the robot moves as you expect
- 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.
- Follow all power on and power off procedures in this manual.
- 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!).
- Make sure the e-stop is not pressed (pull up on the red button).
- Turn the power-strip on.
- The workstation PC and Franka Controller should power on automatically
- The Panda lights should flash yellow for a time
- Wait for the yellow lights to stop flashing.
- Yellow lights indicate the robot is locked and cannot move.
The Web Interface
- 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.
- Make sure the enabling device is within reach and pressed down (robot is disabled).
- 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
- 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
- Make sure nobody is in the robot's workspace.
- Unlock the robot by clicking the unlock button. The robot's lights should turn white.
- 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
- In the hamburger menu in the upper-right corner, select Activate Franka Control Interface (FCI)
- The web interface no longer has control, and you can now use ROS
Using ROS
- ssh into
station
, using the credentials that I provide.- You can also use
ssh-copy-id
to install yourssh
certificate and avoid entering the password each time.
- You can also use
- Release the enabling device, so that the robot lights are blue
- On
station
runros2 launch franka_moveit_config moveit.launch.py use_rviz:=false robot_ip:=panda0.robot
to start the controllers and moveit - On laptop run
ros2 launch franka_moveit_config rviz.launch.py robot_ip:=panda0.robot
to launchrviz
- You can also specify the
rviz_config
parameter to load an alternativerviz
file, if you want to customize the visualization
- You can also specify the
- The
move_group
node is running onstation
, but you can communicate with it via itsactions
,services
, andtopics
without worrying about that - Pressing the
enabling
device will stop the robot and cause some nodes to crash
Enabling Device
- Feel free to press the enabling device at any time to stop the robot
- 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
- Make sure to terminate the
Finished With Robot
Before you step away from the robot:
- Move the robot to a reasonable ready position (either using MoveIt, or by manually moving it)
- Make sure the robot is disabled (press the enabling device so the lights turn white).
- Kill the any launchfiles or nodes that you started on
station
- In the web interface, disable the FCI.
- Lock the robot.
- It is okay to step away from the robot when it is locked.
Power Off
- In the web interface, select shutdown.
- Wait for the robot's lights to turn off and the fans in the control box to stop spinning
- Power off the power strip
Robot Status Lights
- 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.
- 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
- 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
- Green:
- This mode is entered when the robot is executing a command from the web interface
- We won't often see this mode
- 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
- Franka World provides a full SolidWorks Model of the robot and also CAD for mounting cameras to the arm
Resources
- Software Documentation
- Particular attention to franka_ros
- Franka World (Free signup required): provides access to the manual, and some useful SolidWorks models (for example to attach a realsense to the robot).