What accuracy to expect for trajectory tracking using position control

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
paperstiger
Posts: 4
Joined: Thu Jun 27, 2019 8:54 pm

What accuracy to expect for trajectory tracking using position control

Post by paperstiger » Thu Jun 27, 2019 9:05 pm

Hi all, I am using pybullet to simulate ur5 robot. I have a trajectory (time stamped joint configuration and velocity) that I want to track. What my code does is basically

Code: Select all

for i in range(self.eeId - 1):
	p.setJointMotorControl2(self.robotId, i + 1, p.POSITION_CONTROL,
                                            target_p[i], target_v[i], positionGain=1, velocityGain=0.5)
where target_p and target_v are calculated from evaluating a function which does interpolation.

This code sort of works but has unsatisfactory trajectory tracking error (maximum of 0.01 for some joint). I calculate this error by comparing the logged joint angles and target_p. It is like (the subplot below)

Image

I found that:
1. increase positionGain does not improve tracking accuracy once it reaches a value like 1.

My question is:
1. How on earth is position control implemented?
2. Is there anyway to improve this tracking accuracy since this is quite essential to my application?

steven
Posts: 57
Joined: Mon Nov 05, 2018 8:16 am
Location: China

Re: What accuracy to expect for trajectory tracking using position control

Post by steven » Fri Jun 28, 2019 1:39 am

Could you provide a complete simple test? i can work with you to find the root cause.

paperstiger
Posts: 4
Joined: Thu Jun 27, 2019 8:54 pm

Re: What accuracy to expect for trajectory tracking using position control

Post by paperstiger » Fri Jun 28, 2019 3:41 pm

steven wrote:
Fri Jun 28, 2019 1:39 am
Could you provide a complete simple test? i can work with you to find the root cause.
Here you go. I am sharing a minimum test case and you can download it from here.

https://drive.google.com/file/d/1W6iPNO ... sp=sharing

Thank you for your time.

steven
Posts: 57
Joined: Mon Nov 05, 2018 8:16 am
Location: China

Re: What accuracy to expect for trajectory tracking using position control

Post by steven » Sun Jun 30, 2019 5:45 am

thanks for your sharing.
why did you said "maximum of 0.01 for some joint"? i add the following to print the max delta, the value is about 0.006. how much tracking accuracy do you need? the accuracy is very high if don't care about the velocity.

print("max value=", np.max(robotlog[mask,17:23] - qeval))
max value= 0.006000822848596599

paperstiger
Posts: 4
Joined: Thu Jun 27, 2019 8:54 pm

Re: What accuracy to expect for trajectory tracking using position control

Post by paperstiger » Sun Jun 30, 2019 4:38 pm

steven wrote:
Sun Jun 30, 2019 5:45 am
thanks for your sharing.
why did you said "maximum of 0.01 for some joint"? i add the following to print the max delta, the value is about 0.006. how much tracking accuracy do you need? the accuracy is very high if don't care about the velocity.

print("max value=", np.max(robotlog[mask,17:23] - qeval))
max value= 0.006000822848596599
Actually I do care about velocity and want to improve this accuracy as much as I could.

Did you try the second test case, using python minimum_debug_case.py 1? I bet in that case, stranger things will happen.

steven
Posts: 57
Joined: Mon Nov 05, 2018 8:16 am
Location: China

Re: What accuracy to expect for trajectory tracking using position control

Post by steven » Mon Jul 01, 2019 12:47 pm

in the second case, the robot collides with the ground which will impact the links and joints of the robot.

paperstiger
Posts: 4
Joined: Thu Jun 27, 2019 8:54 pm

Re: What accuracy to expect for trajectory tracking using position control

Post by paperstiger » Tue Jul 02, 2019 2:46 am

steven wrote:
Mon Jul 01, 2019 12:47 pm
in the second case, the robot collides with the ground which will impact the links and joints of the robot.
Wait, really? I should have used the software with GUI turned on.

Post Reply