Closed OXOSMDF closed 1 month ago
Hi, I have observed this behavior, too. Unfortunately, this seems to be a limitation of libfranka, that a gripper movement cannot be stopped once commanded, as all other gripper commands seem to wait for the current gripper command to terminate. I have no solution to this problem except to use a different gripper. Best, Tim
Hello, I try to use franky to manipulate franka panda and collect data from it. I wrote this ROS node. I separate gripper control, robot movement control and data collection into 3 threads. I found problem when I use gripper.open_async and gripper.grasp_async as I would block other 2 threads and I could only use other 2 threads after open gripper and grasp gripper is done. `#!/usr/bin/env python import rospy from geometry_msgs.msg import Twist from franky import * import franky import threading from std_msgs.msg import Int16, Float32 from teng_arduino.msg import TwistGripper import pyrealsense2 as rs import numpy as np import pickle import copy import traceback import os from scipy.spatial.transform import Rotation import open3d as o3d
def visualize_point_cloud(points): """ Visualize the point cloud using Open3D. :param points: The Nx3 numpy array of point cloud coordinates. """
Convert points to Open3D point cloud
def quaternion_to_euler(q):
class FrankaRobotController: def init(self): rospy.init_node('franka_robot_controller') robot_ip = rospy.get_param('~robot_ip') self.robot = Robot(robot_ip) self.robot.recover_from_errors() self.robot.relative_dynamics_factor = 0.05 self.robot.velocity_rel = 0.4 self.robot.acceleration_rel = 0.2 self.robot.jerk_rel = 0.02 self.gripper = franky.Gripper(robot_ip) self.gripper_speed = 0.02 self.gripper_force = 5 print('Connecting to robot at {}'.format(robot_ip))
if name == 'main': controller = FrankaRobotController() controller.run()`