Page 1 of 1

Objects freeze mid air on resetting position

Posted: 16 May 2020, 14:06
by mabouseif

I have an scene where a UR5 robot arm is grasping some simple objects I created in its workspace. Upon grasping all objects in the workspace, I set the position of each object to random locations within the workspace.
The problem is that on EVERY run, at some point or some iteration of the task, one or two objects become completely rigid, and they freeze in their new position and become completely rigid/frozen, so the arm tries to pick the object up but it does not move, and the robot becomes stuck on trying to grasp it, as this is a learning framework.
There's a video attached.
When the robot tries to pick the blue cylinder up, it does not even budge and it is stuck/frozen mid-air (the reset position).
If i click on the scene anywhere, it proceeds to become normal again. All objects are collidable, , renderable, measureable, detectable, dynamic, and respondable. (Notice that AFTER i click on the scene near the object, it falls down to the floor and becomes normal again.)
The issue is that this only started happening recently, and in different scenes that I have not even modified for a while. Like, suddenly, this became an issue.

I am awaiting a response and a hopefully a solution, thanks.

Re: Objects freeze mid air on resetting position

Posted: 18 May 2020, 06:50
by coppelia

thanks for mentioning this. This is very probably the same problem as described in this post. Can you provide a minimalistic scene where the problem can easily be reproduced? Does the problem also resolve if you simply click into the scene, not even near the incriminated object?
Your scene also has some other problem from the video, there is some strange vibration in the gripper..


Re: Objects freeze mid air on resetting position

Posted: 18 May 2020, 13:43
by mabouseif
Thanks for responding.

Yes, the problem is resolved when I click randomly in the scene.
I am doing Reinforcement Learning so I am doing many iterations, 1000+. Now when the objects freeze it destroys the learning since the robot is doing the right action but with no success. It starts happening after maybe 5 iterations.

Scene 1: ... uzUu7S6bKN
In Scene 1, this happens randomly to 1-2 objects when I am "respawning" the objects.

Scene 2: ... o3IeT1uA8L
In Scene 2, this happens to the red sphere (fluid). It does not happen to the cup though.
And when the red sphere freezes, you cannot lift the cup since it cannot go through the frozen solid red sphere.

About the vibration of the gripper, I have no idea why is that, and since it is relatively "working", I thought I'd deal with it later. Do you have any idea why?


Re: Objects freeze mid air on resetting position

Posted: 22 May 2020, 10:21
by coppelia
Thanks. When you say that it starts after 5 iterations... do you stop and restart a simulation between iterations? Could it be that the problem is directly linked to the reinforcement learning PyRep that you are using?
How can I reproduce that bug without PyRep? e.g. by starting/stoping the simulation several times? (e.g. also automated).

About the vibration: it is difficult to say what is wrong. But if you simply replace the gripper with the gripper from the model library, the vibration is gone, so you must have modified some parameters in that gripper model.


Re: Objects freeze mid air on resetting position

Posted: 22 May 2020, 12:14
by mabouseif
I do not stop and restart the simulation. By iterations I mean one attempted action, after which an empty workspace check is done, if true, randomly respawn objects into the workspace again.

I am not using PyRep.

I am not sure how to reproduce the bug.

What I did for now is that I installed an auto-clicker and positioned the mouse to click on the scene every 1 second. It worked, but now I cannot run simulations by day, and secondly, I need to run simulations in headless mode.

Anything that can be done?


Re: Objects freeze mid air on resetting position

Posted: 22 May 2020, 13:35
by coppelia
hum, if we can't reproduce it, it is super difficult to debug. Maybe you can answer some additional questions:

1. does it work if you click on the CoppeliaSim application bar, instead of in the window?
2. does it work if you click on the model library?
3. Does it work if you click in the scene hierarchy
4. or does it only work if you click into the scene? And if so, if you click into the scene a slightly move the camera (and keep the currently selected items selected, i.e. not changing the object selection state)


Re: Objects freeze mid air on resetting position

Posted: 02 Jun 2020, 11:47
by m_jau
On my Simulation the Dynamic works only again if i click on the window of the scene. At the application bar, model libary and scene hierarchy i can click but the Dynamics works not. only i click on the scene.