Ask Your Question
0

Simulation deteriorates over time, robot arms do not go to the same position

asked 2020-08-05 14:32:54 -0600

luna gravatar image

Hi! I'm currently running a ROS network (ROS Melodic, Ubuntu 18.04) using the ARIAC 2019 simulation interface. I have the competition going on a loop, and two UR10 arms that run on independent threads.

In the beginning of the Gazebo simulation, the robot arms pick up the parts on the conveyor belt just fine, but over time, they don't seem to go back to the same position. In fact, three minutes into the simulation, the robot arm hardly ever picks up parts even though it's the same code, just running on a loop. After checking the topic that contains the arms' joint states, I've come to the conclusion that the arm doesn't reach the same position as I'm specifying when publishing to the topic. Has anyone else experienced something similar? (i.e. after running a simulation on Gazebo where the robot actions are all looped/the same, the behavior is not consistent/deviates more and more away from expected/preferred behavior)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-08-06 08:09:48 -0600

Weasfas gravatar image

@luna, unfortunately that is the normal behaviour of Gazebo and other similar simulation enviroments. The way Gazebo and ODE works let the simulation to be unnacurate over time. The more time passed the more inaccurate Gazebo calculations are, but that is something inherent to the Simulation.

What you can do is to adjust the physics and physics engine params to test how you can improve over time the simulation. I am refering particularly to the SDF physics params ERP and CFM that are direcly related to the kd and kp params and are used to enhance the performance and stability of the simulation. And, on the other hand, you can try to adjust the SDF physics engine params, if you used ODE as the physics engine I am refering particularly to the min_step_size and the iters params, which you can increase to enhance the computations accuracy in detriment of the simulation performance (or the needed resources).

Those params can help you to achieve better results on the simulation, but as I said the more time the simulation is working the more unstable it will be due to the error accumulation on the different computations done in simulation time.

Hope that can help you with this problem.

Regards.

edit flag offensive delete link more

Comments

Thank you for your response! That definitely makes sense, and is really unfortunate. I'm looking into the physics engine params right now. I just wanted to clarify-- would I be able to solve this issue with some sort of feedback loop/calibration mechanism? Based on the level of abstraction this problem seems to be occurring, it doesn't sound too likely that I will, but I just wanted to make sure.

luna gravatar image luna  ( 2020-08-07 09:51:53 -0600 )edit

Mmm that indeed is a good idea @luna, but the problem is how to implement such thing. Corect me if I am mistaken but what you want is to produce a kind of feedback loop that attemps to fix this error accumulation dinamically on simulation time or at least to balance your commands depending of the simulation deviation error. The problem here is that you are trying to solve a problem that is not deterministic, in other words non lineal. Because you do not know how the errors are going to be and how the simulation is going to behave in a certain t in simulation time, maybe you are able to predict how the error in simulation is going to alter your robot behaviour but how you measure this and translate it to balance new commands is something that become a very complex task. I have never tried such ...(more)

Weasfas gravatar image Weasfas  ( 2020-08-07 11:39:43 -0600 )edit

Thanks! You've given me a lot to think about in terms of improving my simulation. One last question-- do you know where the error in Gazebo calculations is accumulating? Is it error in calculating joint effort or just does the environment as a whole become intensely uncalibrated?

luna gravatar image luna  ( 2020-08-07 12:53:03 -0600 )edit

Enviroment is not very important, what is important is the collision checking ODE performs in every sim cycle. The most important errors comes from the contraints: some "soft" and some "hard. This constraints can be violated with the introduction of unintentional errors. On the other hand, there is a inherent error accumulation in the joint relative position calculations. Extracted from ODE: "When a joint attaches two bodies, those bodies are required to have certain positions and orientations relative to each other. However, it is possible for the bodies to be in positions where the joint constraints are not met. This "joint error" can happen [...]". Since the force apply in simulation time does not always end with the joint in the proper position (due to calculations errors) the ERP apply a little force to the links in order to decrease this error and bring its bodies back into correct alignment. I ...(more)

Weasfas gravatar image Weasfas  ( 2020-08-08 05:01:34 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-08-05 14:32:54 -0600

Seen: 149 times

Last updated: Aug 06 '20