-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review YarpOpenraveControlBoard for collision check #82
Comments
Related: #80 |
Adding to std::string outputStr;
pIndivControl->SendCommand(outputStr,"SetCheckCollisions 1");
CD_DEBUG("SetCheckCollisions[%d] returned: %s\n",i,outputStr.c_str()); And moving in # Convex Decomposition padding
teo_robot = env.GetRobots()[0]
cdmodel = databases.convexdecomposition.ConvexDecompositionModel(teo_robot)
# Load the ConvexDecomposition model, if it does not exit in the database generate it.
if not cdmodel.load(): # It always load the model with zero padding
# If not already in the database. Generate:
cdmodel.generate(padding=0.02)
cdmodel.save()
print 'Finished saving'
print 'Setting robot...'
cdmodel.setrobot()
print 'Finish setrobot' Got the following line at collisions during runtime: [idealcontroller.cpp:526 _ReportError] self collsion in trajectory: (teoSim:r55)x(teoSim:r65), contacts=0, time=0.130000 Which corresponds to this line, which is just a warning (no movement stop). This means we need changes at the OR (e.g. inside the "idealcontroller" SimulationStep) or ORYP level. |
PS: Line comes from _CheckConfiguration. |
Last commit wasn't working (as in "outputting the warning"), had to commit 1c9de50 ( |
Further experiments demonstrate:
[environment-core.h:2577 _SimulationThread] simulation thread exception: openrave (Assert): self collsion in trajectory: (teoSim:cintura)x(teoSim:r52), contacts=0, time=2.010000 |
More thoughts involve the issue that there is no awareness of which actuation is causing the collision, so all robot joints should be stopped. Seems like a task for a separate OpenRAVE plugin. |
Old WIP at |
Unfortunately, the callback mechanism only works enabling the ODE physics engine (not only a collision checker). Output achieved: [success] OpenraveCollisionStop.cpp:42 _IgnoreCollisionCallback(): Here: (teoSim:r65)x(teoSim:r63), contacts=16
[success] OpenraveCollisionStop.cpp:42 _IgnoreCollisionCallback(): Here: (teoSim:r60)x(teoSim:r62), contacts=16
[success] OpenraveCollisionStop.cpp:42 _IgnoreCollisionCallback(): Here: (teoSim:r55)x(teoSim:r53), contacts=16
[success] OpenraveCollisionStop.cpp:42 _IgnoreCollisionCallback(): Here: (teoSim:r50)x(teoSim:r52), contacts=16
[success] OpenraveCollisionStop.cpp:42 _IgnoreCollisionCallback(): Here: (teoSim:r31)x(teoSim:cintura), contacts=16
[success] OpenraveCollisionStop.cpp:42 _IgnoreCollisionCallback(): Here: (teoSim:r31)x(teoSim:cintura), contacts=16 |
And no improvement with |
Looks like FCL and Bullet implementations also do this. However, to not force the user to have these, may succumb to the temptation of implementing a separate thread. |
Tried some more things because PQP code looks like it should call the callbacks. Test 1: collisionChecker = RaveCreateCollisionChecker(env,'pqp')
collisionChecker.SetCollisionOptions(CollisionOptions.Contacts)
env.SetCollisionChecker(collisionChecker) Test 2 (can't even move): collisionChecker = RaveCreateCollisionChecker(env,'pqp')
collisionChecker.SetCollisionOptions(CollisionOptions.Distance|CollisionOptions.Contacts)
env.SetCollisionChecker(collisionChecker) Both constantly return the following after first attempt of movement: [success] OpenraveCollisionStop.cpp:42 _IgnoreCollisionCallback(): Here: ()x(), contacts=0 |
Current status (in addition to #83):
|
The culprit could be this while True. |
In the case of the current teo-openrave-models, there are still self-collisions even with zero padding. |
Thanks to #83, now model loading is faster. In addition, commenting out the |
The segfault has been traced to upstream robotology/yarp#1595, which means it wasn't due to race conditions but to the lack of the |
Strange things via
|
Less stranger things (but still strange) via
|
Link names are pretty crazy. This is tracked at roboticslab-uc3m/teo-main#37. |
For the record,
|
Better using openrave-yarp-plugins/libraries/YarpPlugins/YarpOpenraveControlboard/DeviceDriverImpl.cpp Lines 43 to 55 in f85d8be
Gets:
|
Interesting list of affected, via 639436d:
|
A quick hack is to only look at |
Deleting old OpenRAVE::EnvironmentMutex::scoped_lock lock(penv->GetMutex()); // lock environment
if(penv->CheckSelfCollision(probot)) { // Check if we collide.
CD_WARNING("Collision!!! Invalid position. Going back to the initial position\n"); Inspiring but broken anyway, as the current model self-collides a lot. |
Created OpenraveDumpManipulatorJointLinks as part of the process, for debugging, merged into Will probably integrate |
Already have example prepared for when working: openrave-yarp-plugins/examples/python/openraveYarpPluginLoader-controlboard-collision.py Line 17 in 18ea4ff
|
Blocked issue #53 is now closed/invalid. |
bf9e962 coops I did it again (ref: 12ea290#diff-187cc21333790ef079f4b46fe577256a where |
Review YarpOpenraveControlboard for collision check.
Might make YarpOpenraveControlboardCollision obsolete, so blocks #53.
The text was updated successfully, but these errors were encountered: