Package: panda-robot
Panda RobotA Python interface package built over theFranka ROS Interfacepackage, combining its different classes to provide a unified interface for controlling and handling the Franka Emika Panda robot. Also works directly withPanda Simulator.The package provides an extensive and unifiedAPIfor controlling and managing the Franka Emika Robot (and gripper) using pre-defined low-level controllers (position, velocity, torque, joint impedance), MoveIt planners, and JointTrajectory action service.NOTE: This version requiresFranka ROS Interface v0.7.1('master'/'v0.7.1-dev' branch) to be installed. For usage with older versions, use Panda Robot branchv0.6.0from Github.FeaturesProvides simple-intuitive interface classes with methods to directly and easily control the robot using low-level controllers, MoveIt planners, or Trajectory action client.Get real-time robot state, joint state, controller state, kinematics, dynamics, etc.Provides Kinematics computation (usingKDL library). Automatically adjusts computations for the end-effector frames set in Dash or by code.Integrated with gripper control.Manage frames transformation and controller switching using simple utility functions.Works directly on simulated robot when usingPanda Simulatorproviding direct sim-to-real and real-to-sim code transfer.DOCUMENTATION:https://justagist.github.io/panda_robot/Watch videohereWatch videohereInstallationNOTE:This branch should work with ROS Melodic and ROS Noetic. Tested on:ROS VersionRequired Python VersionMelodic2.7+Noetic3.6+The following dependencies have to be met before installing PandaRobot:Requires ROS Melodic or Noetic (preferably thedesktop-fullversion to cover all dependencies such as PyKDL and MoveIt)Franka ROS Interfacepackage.This package should be installed from source (v0.7.1 or master branch) following all instructions in theInstallationsection. Installing this package correctly would also resolve all the other dependencies for PandaRobot.Once the dependencies are installed, the package can be installed either from pypi, or by building from source. Note that the installation may be successful even if the above dependencies are not met, but the package cannot be used until the dependencies are installed.Install with pippipinstallpanda-robotNOTE: This will not check for the required ROS dependencies. They have to be installed as described in the previous section.Build from sourceIf you want to install the package from source, you can either clone this repository and runpython setup.py install, or build it as a catkin package in your ROS workspace. To build as catkin package:Clone this repo tosrcfolder of your catkin workspace.In catkin workspace root, run:catkinbuildsourcedevel/setup.bashNote: This package is written to be compatible with both Python 2 and 3, so make sure you have the Pythonfuturemodule installed (pip install future).UsageNote: If using with a real physical Franka Emika Panda robot, the franka_ros_interface 'driver' should be running in the 'master' environment in one terminal (SeeFranka ROS Interface instructionsfor details). Then, any code which uses PandaRobot or Franka ROS Interface should be run in 'master' or 'remote' environment (as appropriate). When using withPanda Simulator, this package can be used directly without the need for any specific environment as long as this package, the simulator package, and Franka ROS Interface packages are in the same ROS workspace, and correctly sourced.Example: Testing interface in terminal>>python# or `python3` # start interactive python session; make sure the correct ros workspace is sourced.>>importrospy
>>frompanda_robotimportPandaArm
>>rospy.init_node("panda_demo")# initialise ros node>>r=PandaArm()# create PandaArm instance>>r.move_to_neutral()# moves robot to neutral pose; uses moveit if available, else JointTrajectory action client>>pos,ori=r.ee_pose()# get current end-effector pose (3d position and orientation quaternion of end-effector frame in base frame)>>r.get_gripper().home_joints()# homes gripper joints>>r.get_gripper().open()# open gripper>>r.move_to_joint_position([-8.48556818e-02,-8.88127666e-02,-6.59622769e-01,-1.57569726e+00,-4.82374882e-04,2.15975946e+00,4.36766917e-01])# move robot to the specified pose>>r.move_to_cartesian_pose(pos,ori)# move the robot end-effector to pose specified by 'pos','ori'See script (test/test_pos_controllers.py) to see how the robot can be controlled using low-level joint controllers.See script (scripts/env.py), and run it interactively (python -i env.py) for testing other available functionalities.See other files in thetestsanddemosdirectories for more usage examples.Learn about all available functionalities in theDocumentation.LicenseCopyright (c) 2019-2021, Saif SidhikIf you use this software for research, please considering citing using.