Skip to content

ROS 2 port of franka_ros for Franka Emika Robot (FER) Panda Robots, part of Agri-OpenCore (AOC) project

License

Notifications You must be signed in to change notification settings

LCAS/franka_arm_ros2

 
 

Repository files navigation

ROS2 port of franka_ros for Franka Emika Panda (FER) robots

This project is for porting over the various functionalities from franka_ros into ROS2 for Panda robots. Franka Emika has dropped software support for robots older than FR3, which leaves a lot of older hardware outdated and unable to migrate to ROS2.

This repository attempts to remedy that somewhat, by bringing existing features from franka_ros over to ROS2 specifically for the Panda robots.

As of 16.11.23, almost all single-robot franka_ros features have been migrated, including different controller interfaces, error recovery, and runtime parameter setters. Multi-arm support is also available via franka_multi_hardware_interface, launched via dual_franka_launch.py.

For upgraded version of this repo including MuJoCo simulator version of Franka Panda arm, please visit [this repository][ https://github.com/yilmazabdurrah/multi_franka_arm_ros2]

Credits

The original version is forked from mcbed's port of franka_ros2 for humble.

Working (not thoroughly tested) features

  • Single arm:
    • FrankaState broadcaster
    • All control interfaces (torque, position, velocity, Cartesian).
    • Example controllers for all interfaces
    • Controllers are swappable using rqt_controller_manager
    • Runtime franka::ControlException error recovery via ~/service_server/error_recovery
      • Upon recovery, the previously executed control loop will be executed again, so no reloading necessary.
    • Runtime internal parameter setter services much like what is offered in the updated franka_ros2
  • Multi arm:
    • initialization and joint state broadcaster
    • Read/write interfaces
    • FrankaState broadcaster
    • Swappable controllers
    • Error recovery and parameter setters
    • Dual joint impedance & velocity example controllers

Known issues

  • Joint position controller might cause some bad motor behaviors. Suggest using torque or velocity for now.

Priority list

  • Publishing FrankaState
  • Completely replicate the functionalities of franka_hw
    • Implement joint limits interface (position, velocity, effort) Joint limits are not really working in ros2_control; they need to be implemented at controller level.
    • Adding different joint interfaces (joint {velocity, position} and cartesian {velocity, pose})
    • Adding logic for switching to different joint interfaces
  • Adding error recovery services
    • franka_ros2 crashes right away if the E-stop is pressed or a controller exception occurs.
    • franka_ros2 does not start if the robot is already in error mode before the node is started.
  • Adding additional example controllers (Cartesian, joint velocity/position, etc. )
  • Add reconfiguration service for:
    • Cartesian, Joint impedance
    • Force torque, full collision behaviors
    • EE, K frames
    • Load settings
  • Clean up base acceleration-dependent values in Franka State
  • Clean up dependency tree for packages
  • Test it out with moveit! 2
    • Implement tutorials for multi-arm moveit
    • bug fixing with SRDF/URDF not finding the base_link defined in the dual panda URDF
    • Implement quality-of-life functions for moveit
  • Investigating multiple arm control
    • Initialization
    • Reading joint states
    • Broadcasting franka states
    • Controllers for:
      • Joint-level stuff
      • Cartesian-level stuff
    • Splitting all broadcasters into its own nodes
    • Cleaning up parametrization
  • Test out gripper
  • Make reusable impedance controllers with proper subscribers for general use
  • Add extensive tutorials!

Installation Guide

(Tested on Ubuntu 22.04, ROS2 Humble, Panda FCI 4.0.4, 4.2.2 and 4.2.1, and Libfranka 0.8.0 and 0.9.2)

  1. Build libfranka 0.8.0 or 0.9.2 from source by following the instructions. Choose proper version according to your FCI version! If you need to install libfranka 0.9.2, you can use directly LCAS libfranka 0.9.2 release
  2. Install FLIR Blackfly_s camera ROS2 driver (required for panda_vision setup), following the instructions
  3. Clone this repository into your workspace's src folder.
  4. Source the workspace, then in your workspace root, call:
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DFranka_DIR:PATH=/path/to/libfranka/build`
  1. Add the build path to your LD_LIBRARY_PATH: LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/libfranka/build"
  2. To test, source the workspace, and run:
ros2 launch franka_moveit_config moveit_real_arm_platform.launch.py robot_ip:=<fci-ip> camera_type:=blackfly_s serial:="'<camera-serial>'" load_camera:=True planner:=<planner_name>

Example robot_ip:=172.16.0.2, serial:="'22141921'", planner:=pilz_industrial_motion_planner/CommandPlanner

If needed to test on fake hardware add use_fake_hardware:=True argument to the launch file

  1. To control the arm by MoveIt2 for plant scanning, please follow moveit2_commander_recorder and viewpoint_generator repositories.

License

All packages of franka_arm_ros2 are licensed under the Apache 2.0 license, following franka_ros2 and panda_ros2.

About

ROS 2 port of franka_ros for Franka Emika Robot (FER) Panda Robots, part of Agri-OpenCore (AOC) project

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 74.3%
  • Python 20.1%
  • CMake 4.9%
  • Other 0.7%