Our top priority

We are as proud of our service as we are of our robots.

  • ROS drivers
Forgot your password?
Register

Splash Forums Development Ubuntu APIs ROS drivers

This topic contains 2 replies, has 2 voices, and was last updated by  kmpatel9 1 year, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2414

    kmpatel9
    Participant

    Hello,
    I am using Jaco arm for pick and place task using 3 finger gripper.
    My code is in ROS. I set the noint angles first using jaco_angle_action server, then try to control finger positions using jaco_fingers_action server.
    These two action servers are sent the goals in same python node. Finger positions are changed by the client periodically in a while loop.
    I observe that, both of the tasks, that are, moving the fingers and holding up the arm position fail to happan simultaneously.
    The arm is seen to be moving under the influence of gravity when fingers are being controlled.
    The arm keeps going down in jerks, finally ends up on the floor.

    Any pointers on how to work it around are most appreciated.
    Also a quick response would be highly useful as publishing a paper with approaching deadline is blocked by this issue.

    Thanking in advance,
    Kunal

    #2415

    lzhao
    Participant

    Hello,

    Firstly, are you using the ROS package from our official website (https://github.com/Kinovarobotics/kinova-ros). Since neither in the previous release or current release, we don’t have node named “jaco_fingers_action” nor “jaco_angle_action”.

    I would expect you are using “joints_action_client.py” and “fingers_action_client.py” from the literal meaning. Internally, arm joint values and finger values are both stored in TrajectoryPoint.UserPosition datatype. Under the Kinova_Comm level, you will find that “setFingerPositions” and “setJointAngles” are both calling the same API function “sendAdvanceTrajectory(TrajectoryPoint)”. Which means you can move either finger or arm at a specific time, while keep the other (arm or finger) static. Please give more detail on how the actionlib goals are sent in your code. However, in any case, this should not case a falling down of the arm. If you would like set some debug points, I would suggest to check if you read and set current arm values correctly in the “setFingerPositions”.

    Best regards!
    Longfei

    #2416

    kmpatel9
    Participant

    Thank you Longfei,
    To answer your question
    1) Yes I am using the same repo as you mentioned.

    2) I used the jaco_finger_action.py and jaco_angle_action.py initially. Individually they work just fine. But I need to change finger angles (so that the grip is tight or loos according to my custom force sensor) while the arm is lifting up the object.

    Now to do that I wrote a new node , using the above two nodes as reference, as follows: (just the main routine)

    if __name__ == '__main__':
       	
        try:
            rospy.init_node(str(sys.argv[1]) + '_gripper_workout')
    	rate = rospy.Rate(5) # 10hz
    
    	# subscribe to force sensor topics
    	rospy.Subscriber("magX", Int16, magXlistener)
    	rospy.Subscriber("magY", Int16, magYlistener)
    	rospy.Subscriber("magZ", Int16, magZlistener)
    
    	#bring the arm to target location
    	#objectPosition = rospy.get_param('/targetPositionFile')
    	print('Using joint angles from file: {}'.format("/home/aryabhatta/catkin_ws/src/SRL_jaco_arm/jaco_demo/nodes/jaco_demo/goodPosition.txt"))
            angles = goal_generators.joint_angles_from_file("/home/aryabhatta/catkin_ws/src/SRL_jaco_arm/jaco_demo/nodes/jaco_demo/goodPosition.txt")
    	for angle_set in angles:
                print('    angles: {}'.format(angle_set))
                result = joint_angle_client(angle_set,jointClient)
    	#result = joint_angle_client(angles[0])
    
    	# Open the gripper
    	
    	raw_positions = [float(0) for n in sys.argv[2:]]
        	positions = [raw_positions]
    	gripper_client([0.0,0.0,0.0],gripperClient)
    	result = time.sleep(5)
    	
    	raw_positions = [float(40) for n in sys.argv[2:]]
        	positions = [raw_positions]
    	gripper_client([40.0, 40.0, 40.0],gripperClient)
    	result = time.sleep(5)
    
    	i=0
    	print	 "Starting Gripeer With Force Feedback"
    		
    	while not rospy.is_shutdown():
    		
    		#start closing
    		gripForceThreshold_ = rospy.get_param('/gripForce')
    		print	"force : " + str( force[0]) +"\t"+ str( force[1])+"\t"+ str( force[2])
    
            	if (force[2] > (gripForceThreshold_+10)) and (i <50) and not rospy.is_shutdown():
    			raw_positions = [float(i) for n in sys.argv[2:]]
    		    	positions = [raw_positions]
    		#	for position in positions:
    		#	    print('    position: {}'.format(position))
    			result = gripper_client(positions[0],gripperClient)			
    			i = i+1
    
    		elif (force[2] < (gripForceThreshold_-10)) and (i <50) and not rospy.is_shutdown():
    			raw_positions = [float(i) for n in sys.argv[2:]]
    		    	positions = [raw_positions]
    		#	for position in positions:
    		#	    print('    position: {}'.format(position))
    			result = gripper_client(positions[0],gripperClient)			
    			i = i-1
    
    		elif i>38 :
    			i = i-1
    			raw_positions = [float(i) for n in sys.argv[2:]]
    
    		    	positions = [raw_positions]
    		#	for position in positions:
    		#	    print('    position: {}'.format(position))
    			result = gripper_client(positions[0],gripperClient)
    			
    		#result = joint_angle_client(angle_set,jointClient)
    		rate.sleep()
    	
            print('Done!')
    
        except rospy.ROSInterruptException:
            print "program interrupted before completion"
    

    This node keeps sending action goal to both actions servers, (finger and joint action server) in a loop.

    Test 1:
    I send same joint angle values and then kee sending updated goal for finger in the loop.
    Result:
    I observe that the arm keeps falling down in small jerks when fingers are moving

    So I do Test 2:
    In this I keep sending same position to joint_action_client in the loop.
    Result:
    The arm still falls down while fingers move. But now the arm comes back to the desired position, then tries to move fingers and starts falls down again. This keeps happening.

    (I have also tried defining a new action server, which processes gripper and joint angles action requests in single class, however that did not work either. Hence not discussing that here for now)

    Now I have new problem I need help with as well.
    To check if the firmware is the issue, I used the Kinova SDK for Jaco arm to reset the firmware (/opt/kinova/ResetFirmware/ResetJACO2_6DOF). After the update the Ros Driver itself is not able to initialize the API. i get following error

    [ INFO] [1473187274.203537902]: Initializing Kinova API (header version: 50101, library version: 5.0.6)
    [ERROR] [1473187274.205820876]: JacoCommException: Could not initialize Kinova API (return code: 1015)

    Can you help me with this issue as well?

    Also, let me know if you need any further information.

    Thanks,
    Kunal

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Trending now

News & Events

Kinova’s Vice President of Medical Robotics, Appointed to 2 Boards, 2 Committees

2018 is bound to be a busy year for Kinova’s own Stuart Kozlick. In 2017, Stuart has been appointed to sit on four prestigious committees and boards, effectively positioning Kinova among key industry thought leaders. These strategic partnerships will allow Kinova to accelerate the adoption of new technologies within the healthcare system and encourage alignment within the industry, healthcare communities and governments facilitating accessibilities and communities.

Read more
Humans & Robots

THE NEW NORMAL: UPROOTING ASSISTIVE NORMS in 2018

A new year is a time for new beginnings and starting things afresh. In the spirit of making a change, there’s a specific paradigm that needs to be addressed, or, as many in the industry would say, “disrupted.” Consider 2018 the year of “The New Normal” for the Assistive market. The New Normal is a term coined by our colleague, Abe Clark, in the United States.

Read more
Expert Talk

STEERING TOWARDS CO-CREATION, COLLABORATION, AND INNOVATION – #KINOVAONTHEROAD in 2018

My objective at Kinova is to build bridges between people, businesses, educational organizations, and governments to effectively fuel the cycle of innovation. Unsurprisingly, that means hopping on a plane and going to find the best people in the world to exchange with. This is why the concept of Steering Committees as I came to realize is, and will increasingly be, vital.

Read more