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, 7 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

Expert Talk

Hitting the Mark with Marketing: The Do’s and Don’ts of Creating a Message Around Robotics

While robotics companies have been around for decades, the spotlight on the industry has only really intensified in recent years as new technologies become more readily available and more implicated in the lives of humans.

Read more
Expert Talk

For the Greater Good: The Importance of Fulfilling Corporate Social Responsibility

By now, it goes without saying that the cornerstone of Kinova’s DNA is our desire to create products that empower humanity, and that fulfilling our ethical, human and social responsibilities is fundamental to maintaining the core of our culture. Always has been, always will be.

Read more
Expert Talk

FOR ETHICS IN AI, KEEP HUMANS in THE LOOP (UNTIL FURTHER NOTICE.)

As discussions around the advancement of AI evolve, so too do the concerns. And for good reason. Machines are getting smarter and smarter, able to complete complex tasks and process information incredibly fast. But, what happens when the developments in AI move too quickly — and we lose sight of human ethics?

Read more