예제 #1
0
import rospy

from franka_interface import ArmInterface

if __name__ == '__main__':
    rospy.init_node("test_robot")
    r = ArmInterface()
    cm = r.get_controller_manager()
예제 #2
0
import rospy
import numpy as np
from franka_interface import ArmInterface
"""
:info:
    Demo showing ways to use API. Also shows how to move the robot using low-level controllers.

    WARNING: The robot will move slightly (small arc swinging motion side-to-side) till code is killed.
"""

if __name__ == '__main__':
    rospy.init_node("test_robot")
    r = ArmInterface(
    )  # create arm interface instance (see https://justagist.github.io/franka_ros_interface/DOC.html#arminterface for all available methods for ArmInterface() object)
    cm = r.get_controller_manager(
    )  # get controller manager instance associated with the robot (not required in most cases)
    mvt = r.get_movegroup_interface(
    )  # get the moveit interface for planning and executing trajectories using moveit planners (see https://justagist.github.io/franka_ros_interface/DOC.html#franka_moveit.PandaMoveGroupInterface for documentation)

    elapsed_time_ = rospy.Duration(0.0)
    period = rospy.Duration(0.005)

    r.move_to_neutral()  # move robot to neutral pose

    initial_pose = r.joint_angles()  # get current joint angles of the robot

    jac = r.zero_jacobian()  # get end-effector jacobian

    count = 0
    rate = rospy.Rate(1000)