Closed deepakraina99 closed 4 years ago
I request someone to look into this issue. It's very urgent. Thanks
@deepakraina99 Hi, Sorry to respond too late, because of the recent matter. I have tested you code using UR3 (because I have changed the original version of UR5 and UR10 urdf model), I found the coordinate of end- effector of Kuka iiwa and UR series is different. I think you should change the urdf model or you can add the coodinate transformation to modify this mismatch.
Thanks @TFLQW for your response. I think I have already changed the desired orientation (i.e sphere.orienation) as per UR5 robot. Actually I noted down the orientation at the initial position and kept that as desired throughout the motion of robot. I am attaching code for your reference:
# I set the reference orientation to a constant
sphere.orientation = np.array([-0.49940256, 0.5001992, 0.50019888, 0.50019888])
While in Kuka IIWA, this has been kept as
# I set the reference orientation to a constant
sphere.orientation = np.array([1, 0, 0, 0])
So I think orientation will not be an issue in this case. Please let me know if my thinking is right. Thanks!
@deepakraina99 In this force control example, I want to keep the force as a constant along the z axis of end-effector. So I choose the sphere.orientation = np.array([1, 0, 0, 0]), If you select sphere.orientation = np.array([-0.49940256, 0.5001992, 0.50019888, 0.50019888]) that mean the z axis of your robot end-effector is not vertical to the desk. The essential cause of the problem you are facing is the difference between the urdf model of iiwa and ur
@TFLQW I have changed UR5 end-effector frame by making changes in the URDF file. You can check the same in the pictures below:
But when I am loading UR5 using the _examples/force_control/Force_controlexample.py, it is still not able to do the appropriate force tracking. I am attaching the video, code, and URDF file for your reference.
Code: code.zip
Can you please guide me regarding this? I shall be thankful to you.
Thanks for your help. I am able to solve the above issue. The error is due to incorrect Joint ID in JointForceTorqueSensor. I have to change the Joint ID to 6 (earlier I was using 5) and it worked fine then.
FT_sensor = sensors.JointForceTorqueSensor(sim, body_id=robot.id, joint_ids=6)
Now the problem is that it is showing fluctuations especially on the one side of the circular trajectory. Although it is able to converge to the desired force value on one side of circle. What could be the reason for this? Attaching a video for your reference.
@deepakraina99 I am good to know that it has been solved, but I have not met this new problem, maybe you can modulate the M/D/K parameters or the stiffness of the table (in urdf model).
@TFLQW Thanks for your suggestion. PyRoboLearn is very useful library. Also can you tell me where table urdf is located in package ? I could not find this.
@deepakraina99 You can find the table urdf model in pybullet package which address maybe : /lib/python2.7/site-packages/pybullet_data/table
@TFLQW I have been able to solve the issue by changing the object (table). Thank you so much for your help with this.
@TFLQW and @deepakraina99 thank you so much for the interaction and communication for this issue! It's great to know that @deepakraina99 managed to solve the problem. By the way @deepakraina99, would you like to share your code by integrating in Pyrobolearn? We welcome nice code like the one you are working on! As @TFLQW, you just need to create a PR in order for us to review your code and integrate it in this framework!
@lrozo I would be happy to share my code and contribute to Pyrobolearn. Let me know the process for the same.
@lrozo Hi~, I think this version code of the force control have no problem, maybe need add an attention to help the user set the urdf model coordinate system to be the same as the example, or change the stiffness of the robot or the table.
@lrozo I agree with @TFLQW. I am planning to add a few more capabilities to this and then we can create a new PR.
@TFLQW Can the same code work for a wavy surface (picture below)?
@deepakraina99 I guess it could work in some other complex surface if you can get appropriate parameters (M/D/K), this example code in the package is used to prove the force control function feasibility in this package, if you want to develop more complex tasks, you can add more useful function, it is very thankful to create the pull request to improve this package.
@TFLQW I have noticed that robot is converging to desired force value but without making any contact with uneven surface. The video below will explain the issue. Any suggestions on this ? I have loaded the uneven surface using following code:
world.load_mesh(filename='examples/tele-ultrasound/wavy_table/wavy_table.stl', position=np.array([0.5, 0.05, 0.2]), orientation=(0, 0, 1, 1), mass=0., scale=(6., 6., 6.))
Attaching the model files for your reference. wavy_table.zip
I have seen _Force_controlexample.py with the Kuka-IIWa robot, which is working perfectly fine. But then I tried to implement the same with the UR5 robot, then it is not able to do the force tracking. Can you please let me know, what I am doing wrong here. Is it an issue with M/D/K parameter tunning?
Code: