Objects freeze mid air on resetting position

Report crashes, strange behaviour, or apparent bugs
mabouseif
Posts: 3
Joined: 05 Feb 2020, 12:20

Objects freeze mid air on resetting position

Post by mabouseif »

Hi,

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.



coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: Objects freeze mid air on resetting position

Post by coppelia »

Hello,

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

Cheers

mabouseif
Posts: 3
Joined: 05 Feb 2020, 12:20

Re: Objects freeze mid air on resetting position

Post by mabouseif »

Hi,
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: https://drive.google.com/open?id=13lMvC ... uzUu7S6bKN
In Scene 1, this happens randomly to 1-2 objects when I am "respawning" the objects.

Scene 2: https://drive.google.com/open?id=1RQLWp ... 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?

Thanks.

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: Objects freeze mid air on resetting position

Post 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.

Cheers

mabouseif
Posts: 3
Joined: 05 Feb 2020, 12:20

Re: Objects freeze mid air on resetting position

Post 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?

Thanks

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: Objects freeze mid air on resetting position

Post 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)

Cheers

m_jau
Posts: 16
Joined: 09 Apr 2020, 12:44

Re: Objects freeze mid air on resetting position

Post 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.

Cheers

m_jau
Posts: 16
Joined: 09 Apr 2020, 12:44

Re: Objects freeze mid air on resetting position

Post by m_jau »

There are some solutions for that problem ?

Thanks

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: Objects freeze mid air on resetting position

Post by coppelia »

Hello,

it is frustrating to not be able to reproduce this. Which platform and what coppeliaSim version are you using? Does it happen with all physics engines, or only one in particular? It is happening randomly? Would you be able to share a minimalistic, self-contained scene that illustrates this?

Cheers

m_jau
Posts: 16
Joined: 09 Apr 2020, 12:44

Re: Objects freeze mid air on resetting position

Post by m_jau »

Hello,

it happens with every verison of coppelia sim. In the moment i work with 4.1, but i test it with 4.2 too an there it happens to.
Yes ist happens wit all physics engines. In a minimalistic scene ist doenst happens.

Now i found a solution. i start the simulation on Windows over the command line and in the headless mode.
Since 30 hours the simulation runs without problems

'coppeliaSim.exe -s -h sceneName.ttt'

cheers

Post Reply