Git Product home page Git Product logo

vijirammech / franka_ros_interface Goto Github PK

View Code? Open in Web Editor NEW

This project forked from justagist/franka_ros_interface

0.0 0.0 0.0 35.87 MB

A ROS/Python API for controlling and managing the Franka Emika Panda robot (real and simulated). Contains exposed controllers for the robot (joint position, velocity, torque), interfaces for the gripper, controller manager, coordinate frames interface, etc. Provides almost complete sim-to-real / real-to-sim transfer of code.

Home Page: http://justagist.github.io/franka_ros_interface

License: Apache License 2.0

CMake 3.92% Python 53.81% Shell 2.24% C++ 40.03%

franka_ros_interface's Introduction

Franka ROS Interface Release DOI

Codacy Badge Build Status

A ROS interface library for the Franka Emika Panda robot, extending the franka-ros to expose more information about the robot, and providing low-level control of the robot using ROS and Python API.

Franka ROS Interface provides utilites for controlling and managing the Franka Emika Panda robot (real and simulated. Contains exposed controllers for the robot (joint position, velocity, torque), interfaces for the gripper, controller manager, coordinate frames interface, etc. Also provides utilities to control the robot using MoveIt! and ROS Trajectory Action & ActionClient. This package also provides almost complete sim-to-real / real-to-sim transfer of code with the panda_simulator package.

Documentation Page: https://justagist.github.io/franka_ros_interface

This branch requires franka_ros release versions 0.7.0, 0.7.1. franka_ros_version

A more unified ROS Python interface built over this package is available at PandaRobot, which provides a more intuitive interface class that combines the different API classes in this package. Simple demos are also available.

Features

  • Low-level controllers (joint position, velocity, torque, impedance) available that can be controlled through ROS topics and Python API (including position control for gripper).
  • Real-time robot state (end-effector state, joint state, controller state, etc.) available through ROS topics and Python API.
  • Python API for managing controllers, coordinate frames, collision behaviour, controlling and monitoring the gripper.
  • Python API classes and utility functions to control the robot using MoveIt! and ROS Trajectory Action Service.
  • The panda_simulator package (which is Gazebo-based simulator for the robot) can also be controlled using this package (ROS and Python interface), providing almost complete sim-to-real transfer of code.

vid Watch video here

vid Watch video here

vid Watch video here

Installation

ROS Melodic: Build Status

NOTE: Tested on Ubuntu 18.04 with ROS Melodic with franka_ros version 0.7.1 (release). Version for ROS Kinetic requires franka_ros v0.6.0; check the 'v0.6.0' branch of this repo. The latest updates to the package may not be compatible with Kinetic.

Dependencies

  • libfranka (sudo apt install ros-$ROS_DISTRO-libfranka or install from source). Make sure to use the release version if building from source.
  • franka-ros v0.7.1 (sudo apt install ros-$ROS_DISTRO-franka-ros or install from source). Make sure to use the release version if building from source. (git checkout 902fdbb from the cloned franka_ros github repo.)
  • (optional, but recommended) franka_panda_description (See Related Packages section for information about package). NOTE: If you do not want to use the franka_panda_description package, make sure you modify the franka_interface/launch/interface.launch file and replace all occurences of franka_panda_description with franka_description (two occurences).

Once the above dependencies are installed, the package can be installed using catkin:

   cd <catkin_ws>
   git clone https://github.com/justagist/franka_ros_interface src/franka_ros_interface
   catkin build franka_ros_interface # or catkin_make
   source devel/setup.bash

After building the package:

  • Copy/move the franka.sh file to the root of the catkin_ws $ cp src/franka_ros_interface/franka.sh ./
  • Change the values in the copied file (described in the file).

Usage

The 'driver' node can be started by running (can only be used if run in 'master' environment - see Environments section below):

    roslaunch franka_interface interface.launch # (use argument load_gripper:=false for starting without gripper)

Available keyword arguments for launch file:

  • load_gripper: start driver node with the Franka gripper (default: true).
  • start_controllers: load the available controllers to the controller manager (default: true).
  • start_moveit: start moveit server along with the driver node (default: true).
  • load_demo_planning_scene: loads a default planning scene for MoveIt planning with simple objects for collision avoidance (default: true). See create_demo_planning_scene.py.

This starts the robot controllers and drivers to expose a variety of ROS topics and services for communicating with and controlling the robot. The robot's measurements and controllers can be accessed using ROS topics and services (see below to find out about some of the available topics and services), or using the provided Python API (also see PandaRobot).

Basic usage of the API is shown in the test_robot.py example file. See documentation for all available methods and functionalities. More usage examples can be found in the PandaRobot.

The franka.sh environments

Once the values are correctly modified in the franka.sh file, different environments can be set for controlling the robot by sourcing this file.

  • For instance, running ./franka.sh master would start an environment assuming that the computer is directly connected to the robot (requires Real-Time kernel set up as described in the FCI documentation).
  • On the other hand, ./franka.sh remote would start an environment assuming that the robot is not connected directly to the computer, but to another computer in the network (whose IP must be specified in franka.sh). This way, if the 'master' is connected to the robot and running the driver node (see below), the 'remote' can control the robot (no need for Real Time kernel!) as long as they are in the same network.
  • Simulation environment can be started by running ./franka.sh sim (only required when using panda_simulator package).

Some useful ROS topics

Published Topics:
ROS Topic Data
/franka_ros_interface/custom_franka_state_controller/robot_state gravity, coriolis, jacobian, cartesian velocity, etc.
/franka_ros_interface/custom_franka_state_controller/tip_state end-effector pose, wrench, etc.
/franka_ros_interface/joint_states joint positions, velocities, efforts
/franka_ros_interface/franka_gripper/joint_states joint positions, velocities, efforts of gripper joints
Subscribed Topics:
ROS Topic Data
/franka_ros_interface/motion_controller/arm/joint_commands command the robot using the currently active controller
/franka_ros_interface/franka_gripper/[move/grasp/stop/homing] (action msg) command the joints of the gripper

Other topics for changing the controller gains (also dynamically configurable), command timeout, etc. are also available.

ROS Services:

Controller manager service can be used to switch between all available controllers (joint position, velocity, effort). Gripper joints can be controlled using the ROS ActionClient. Other services for changing coordinate frames, adding gripper load configuration, etc. are also available.

Python API

Most of the above services and topics are wrapped using simple Python classes or utility functions, providing more control and simplicity. This includes direct control of the robot and gripper using the provided controllers. Refer README files in individual subpackages.

Documentation

Related Packages

  • panda_simulator : A Gazebo simulator for the Franka Emika Panda robot with ROS interface, providing exposed controllers and real-time robot state feedback similar to the real robot when using the franka_ros_interface package. Provides almost complete real-to-sim transfer of code.
  • PandaRobot : Python interface providing higher-level control of the robot integrated with its gripper control, controller manager, coordinate frames manager, etc. with safety checks and other helper utilities. It also provides the kinematics and dynamics of the robot using the KDL library.
  • franka_panda_description : Robot description package modified from franka_ros package to include dynamics parameters for the robot arm (as estimated in this paper). Also includes transmission and control definitions required for the panda_simulator package.
License

License

Copyright (c) 2019-2020, Saif Sidhik

If you use this software, please cite it using DOI.

franka_ros_interface's People

Contributors

justagist avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.