Draw from two (cloned) enviroments

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Draw from two (cloned) enviroments

jmainpri
Hi everyone,

Is it possible to draw in one window two separate environments when they operate in different threads (the second environment is cloned from the first one)?.

For instance, to draw I am using functions like this one:

OpenRAVE::GraphHandlePtr fig = env->drawlinelist( ppoints, nb_points, 3*sizeof(float), 3.0, colors );

I am not interested in drawing the cloned robots and objects, only lines and spheres. env differs for each thread but I'd like to have the drawing in the same viewer window.

I have tried to attached the viewer from the original environment to each new environment but that's forbidden... Any thoughts?

-- Jim
Reply | Threaded
Open this post in threaded view
|

Re: Draw from two (cloned) enviroments

jmainpri
I just found that using the environment mutex on the main environment before calling the plotting functions works:

OpenRAVE::EnvironmentMutex::scoped_lock lock(or_env_->GetMutex());

However when I start the environment using "with Env:" in python it stops the execution, I am guessing on the first Mutex...

-- Jim
Reply | Threaded
Open this post in threaded view
|

Re: Draw from two (cloned) enviroments

Rosen Diankov
Administrator
In reply to this post by jmainpri
Dear Jim,

you'll have to program your own solution for transposing a clone environment's state on an existing environment.

Ideally I would for us to be able to attach a viewer to every cloned environment. Unfortunately we're using a really buggy 3d graphics library (coin3d), which doesn't allow this. Perhaps you can pull it off with the openscenegraph viewer...?

sincerely,



2014-05-14 10:58 GMT+09:00 jmainpri <[hidden email]>:
Hi everyone,

Is it possible to draw in one window two separate environments when they
operate in different threads (the second environment is cloned from the
first one)?.

For instance, to draw I am using functions like this one:

OpenRAVE::GraphHandlePtr fig = env->drawlinelist( ppoints, nb_points,
3*sizeof(float), 3.0, colors );

I am not interested in drawing the cloned robots and objects, only lines and
spheres. env differs for each thread but I'd like to have the drawing in the
same viewer window.

I have tried to attached the viewer from the original environment to each
new environment but that's forbidden... Any thoughts?

-- Jim



--
View this message in context: http://openrave-users-list.185357.n3.nabble.com/Draw-from-two-cloned-enviroments-tp4026972.html
Sent from the OpenRAVE Users List mailing list archive at Nabble.com.

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users