Mobile Ground Robot Velocity Control

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

Mobile Ground Robot Velocity Control

seanmason337
Hello All,

I am very new to openRave and need help getting started with commanding my differential drive robot. I took a look at the simple navigation example, however it appears that it does not implement a differential drive. How can I control the velocity of my two wheel joints, and have the robot move in the simulation?

-Sean Mason
Reply | Threaded
Open this post in threaded view
|

Re: Mobile Ground Robot Velocity Control

Rosen Diankov
Administrator
hi sean,

If you are interested in velocity control within a physics engine, you
can create the ODEVelocity controller and attach it to your robot.
testphysicscontroller.py is a simple python script that shows this off
for an arm.

openrave.py --example testphysicscontroller

If you are having trouble setting up your robot, we can create an example.

rosen,

2010/11/11 seanmason337 <[hidden email]>:

>
> Hello All,
>
> I am very new to openRave and need help getting started with commanding my
> differential drive robot. I took a look at the simple navigation example,
> however it appears that it does not implement a differential drive. How can
> I control the velocity of my two wheel joints, and have the robot move in
> the simulation?
>
> -Sean Mason
> --
> View this message in context: http://openrave-users-list.185357.n3.nabble.com/Mobile-Ground-Robot-Velocity-Control-tp1882454p1882454.html
> Sent from the OpenRAVE Users List mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Centralized Desktop Delivery: Dell and VMware Reference Architecture
> Simplifying enterprise desktop deployment and management using
> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
> client virtualization framework. Read more!
> http://p.sf.net/sfu/dell-eql-dev2dev
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Mobile Ground Robot Velocity Control

Rosen Diankov
Administrator
Hi Sean,

In the XML file joint definition specify enable="false", that should move the joint to the passive list.  Also, you can use spherical joints for complete rotational degree of freedom.

<joint type="spherical" enable="false" ...>
...
</joint>

rosen,

2010/11/15 Sean Mason <[hidden email]>
I almost have everything up and working. My last problem is that the robot I am using has a differential drive and a caster wheel. I would like the caster wheel to be able to pivot and spin freely, but I do not know how to un-select it from my active DOF's.

Currently the robot fights against that joint when turning, as I am sending a 0 vel command to the joint. 

Here is the important part of my code below:

        r = raw_input("input right wheel velocity: ")
        l = raw_input("input left wheel velocity: ")
        print 'velocities: '+ l + ' '+ r + ' 0 0 '
        robot.GetController().SendCommand('setvelocity '+r +' ' + l + ' 0 0')

And a screenshot of my robot




I plan to simulate a line following robot and then execute the same code on the real thing. 

-Sean

On Mon, Nov 15, 2010 at 11:59 AM, Rosen Diankov <[hidden email]> wrote:
hi sean,

usually if you build the INSTALL project in the visual studio
solution, it will install all resources file for you...

rosen,

2010/11/15 Sean Mason <[hidden email]>:
> Got it now. I had to copy some files to the share/robots folder. Thanks
> again!
> -Sean
>
> On Mon, Nov 15, 2010 at 11:46 AM, Sean Mason <[hidden email]> wrote:
>>
>> I found the file and placed it in the right folder, however now the floor
>> is not loading and the robot simply falls. Any ideas? The code looks very
>> strait forwards, so I'm not sure what could be wrong.
>> -Sean
>>
>> On Mon, Nov 15, 2010 at 10:55 AM, Rosen Diankov <[hidden email]>
>> wrote:
>>>
>>> can you make sure the
>>>
>>> c:\program files\openrave\share\openrave\data\diffdrive_sample.env.xml
>>>
>>> exists? If not, can you make sure it exists in the source dir? perhaps
>>> something didn't install correctly?
>>>
>>> rosen,
>>>
>>> 2010/11/15 Sean Mason <[hidden email]>:
>>> > Rosen,
>>> > I really appreciate the example. I am receiving the following error
>>> > when I
>>> > run it:
>>> > [openravepy_int.cpp:2588] viewer qtcoin successfully attached
>>> > [xmlreaders.h:340] could not find file data/diffdrive_sample.env.xml
>>> > [environment-core.h:384] load failed on file
>>> > data/diffdrive_sample.env.xml
>>> > Traceback (most recent call last):
>>> >   File "C:\Program
>>> > Files\openRave\python\examples\testphysics_diffdrive.py",
>>> > lin
>>> > e 55, in <module>
>>> >     run()
>>> >   File "C:\Program
>>> > Files\openRave\python\examples\testphysics_diffdrive.py",
>>> > lin
>>> > e 42, in run
>>> >     robot = env.GetRobots()[0]
>>> > IndexError: list index out of range
>>> > QObject::killTimers: timers cannot be stopped from another thread
>>> > -Sean
>>> > On Mon, Nov 15, 2010 at 10:21 AM, Rosen Diankov
>>> > <[hidden email]>
>>> > wrote:
>>> >>
>>> >> hi sean,
>>> >>
>>> >> openrave.py is a program, you execute it normally by opening the
>>> >> command
>>> >> line.
>>> >>
>>> >> Nevertheless, it is also possible to start a sample through ipython
>>> >> using:
>>> >>
>>> >> openravepy.examples.testphysics.run()
>>> >>
>>> >> Anyway, a diff drive physics sample was just added so users can get
>>> >> started more easily (r1838)
>>> >>
>>> >> openrave.py --example testphysics_diffdrive
>>> >>
>>> >> The robot file is in robots/diffdrive_sample.robot.xml
>>> >>
>>> >> good luck!
>>> >> rosen,
>>> >>
>>> >> 2010/11/15 Sean Mason <[hidden email]>:
>>> >> > Rosen,
>>> >> > I really appreciate your response. How easy would it be to control
>>> >> > the
>>> >> > velocity of the wheels and have the physics actually simulate
>>> >> > movement?
>>> >> > I believe it may simply be easier for me to control the robot simply
>>> >> > through
>>> >> > position and orientation.
>>> >> > I had been looking through the simplenavigation example and could
>>> >> > not
>>> >> > find
>>> >> > out how position and orientation is controlled. This is all I need
>>> >> > in
>>> >> > order
>>> >> > to progress with creating my differential drive simulation.
>>> >> > In addition, I am just getting started with learning python and I am
>>> >> > a
>>> >> > little confuse with where I can communicate with openrave.py. I open
>>> >> > the
>>> >> > python commandline terminal, check my path, and then try to run the
>>> >> > example:
>>> >> > Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
>>> >> > (Intel)]
>>> >> > on
>>> >> > win32
>>> >> > Type "help", "copyright", "credits" or "license" for more
>>> >> > information.
>>> >> >>>> import sys
>>> >> >>>> sys.path
>>> >> > ['', 'C:\\Program Files\\openRave\\share\\openrave',
>>> >> > 'C:\\WINDOWS\\system32\\pyt
>>> >> > hon26.zip', 'C:\\Program Files\\DLLs', 'C:\\Program Files\\lib',
>>> >> > 'C:\\Program Fi
>>> >> > les\\lib\\plat-win', 'C:\\Program Files\\lib\\lib-tk', 'C:\\Program
>>> >> > Files',
>>> >> > 'C:\
>>> >> > \Program Files\\lib\\site-packages', 'C:\\Program
>>> >> > Files\\lib\\site-packages\\PIL
>>> >> > ']
>>> >> >>>> openrave.py --example testphysicscontroller
>>> >> >   File "<stdin>", line 1
>>> >> >     openrave.py --example testphysicscontroller
>>> >> >                                               ^
>>> >> > SyntaxError: invalid syntax
>>> >> > What am I doing wrong?
>>> >> > Thank you in advanced.
>>> >> > -Sean Mason
>>> >> > P.S. I am creating tutorials that will document all the necessary
>>> >> > steps
>>> >> > to
>>> >> > get started with openRave for beginners like myself. You can see
>>> >> > this
>>> >> > at http://dasl.mem.drexel.edu/~seanMason/?cat=6 .
>>> >> > On Fri, Nov 12, 2010 at 6:29 PM, Rosen Diankov
>>> >> > <[hidden email]>
>>> >> > wrote:
>>> >> >>
>>> >> >> hi sean,
>>> >> >>
>>> >> >> If you are interested in velocity control within a physics engine,
>>> >> >> you
>>> >> >> can create the ODEVelocity controller and attach it to your robot.
>>> >> >> testphysicscontroller.py is a simple python script that shows this
>>> >> >> off
>>> >> >> for an arm.
>>> >> >>
>>> >> >> openrave.py --example testphysicscontroller
>>> >> >>
>>> >> >> If you are having trouble setting up your robot, we can create an
>>> >> >> example.
>>> >> >>
>>> >> >> rosen,
>>> >> >>
>>> >> >> 2010/11/11 seanmason337 <[hidden email]>:
>>> >> >> >
>>> >> >> > Hello All,
>>> >> >> >
>>> >> >> > I am very new to openRave and need help getting started with
>>> >> >> > commanding
>>> >> >> > my
>>> >> >> > differential drive robot. I took a look at the simple navigation
>>> >> >> > example,
>>> >> >> > however it appears that it does not implement a differential
>>> >> >> > drive.
>>> >> >> > How
>>> >> >> > can
>>> >> >> > I control the velocity of my two wheel joints, and have the robot
>>> >> >> > move
>>> >> >> > in
>>> >> >> > the simulation?
>>> >> >> >
>>> >> >> > -Sean Mason
>>> >> >> > --
>>> >> >> > View this message in context:
>>> >> >> >
>>> >> >> >
>>> >> >> > http://openrave-users-list.185357.n3.nabble.com/Mobile-Ground-Robot-Velocity-Control-tp1882454p1882454.html
>>> >> >> > Sent from the OpenRAVE Users List mailing list archive at
>>> >> >> > Nabble.com.
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > ------------------------------------------------------------------------------
>>> >> >> > Centralized Desktop Delivery: Dell and VMware Reference
>>> >> >> > Architecture
>>> >> >> > Simplifying enterprise desktop deployment and management using
>>> >> >> > Dell EqualLogic storage and VMware View: A highly scalable,
>>> >> >> > end-to-end
>>> >> >> > client virtualization framework. Read more!
>>> >> >> > http://p.sf.net/sfu/dell-eql-dev2dev
>>> >> >> > _______________________________________________
>>> >> >> > Openrave-users mailing list
>>> >> >> > [hidden email]
>>> >> >> > https://lists.sourceforge.net/lists/listinfo/openrave-users
>>> >> >> >
>>> >> >
>>> >> >
>>> >
>>> >
>>
>
>



------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Mobile Ground Robot Velocity Control

Rosen Diankov
Administrator
hi sean,

there are two ways of doing this in openrave:

1. create an IV or VRML file with a texture attached. If you are using
windows, this might not be possible since coin might not be compiled
with texture support....

2. the openrave environment has a drawplane function which allows you
to specify a texture (check out the testplotting.py example). This
method is also convenient if you want to dynamically build new roads
without going through files.

rosen,

2010/11/16 Sean Mason <[hidden email]>:

> Rosen,
> Things are really coming along now. Is there any way that I can import a
> texture onto a surface? I am building a line following robot and need some
> kind of pattern to follow. I tried making 2D blocks that the camera could
> see on my world's surface, but there are rendering error and the image comes
> across glitchy. I also tried to place a texture that I drew in paint on my
> platform in SolidWorks; however, when I exported the file as a .wrl the
> texture was loss. Any ideas?
> -Sean
>
> On Mon, Nov 15, 2010 at 10:46 PM, Rosen Diankov <[hidden email]>
> wrote:
>>
>> Hi Sean,
>>
>> In the XML file joint definition specify enable="false", that should move
>> the joint to the passive list.  Also, you can use spherical joints for
>> complete rotational degree of freedom.
>>
>> <joint type="spherical" enable="false" ...>
>> ...
>> </joint>
>>
>> rosen,
>>
>> 2010/11/15 Sean Mason <[hidden email]>
>>>
>>> I almost have everything up and working. My last problem is that the
>>> robot I am using has a differential drive and a caster wheel. I would like
>>> the caster wheel to be able to pivot and spin freely, but I do not know how
>>> to un-select it from my active DOF's.
>>> Currently the robot fights against that joint when turning, as I am
>>> sending a 0 vel command to the joint.
>>>
>>> Here is the important part of my code below:
>>>         r = raw_input("input right wheel velocity: ")
>>>         l = raw_input("input left wheel velocity: ")
>>>         print 'velocities: '+ l + ' '+ r + ' 0 0 '
>>>         robot.GetController().SendCommand('setvelocity '+r +' ' + l + ' 0
>>> 0')
>>> And a screenshot of my robot
>>>
>>>
>>>
>>> I plan to simulate a line following robot and then execute the same code
>>> on the real thing.
>>> -Sean
>>> On Mon, Nov 15, 2010 at 11:59 AM, Rosen Diankov <[hidden email]>
>>> wrote:
>>>>
>>>> hi sean,
>>>>
>>>> usually if you build the INSTALL project in the visual studio
>>>> solution, it will install all resources file for you...
>>>>
>>>> rosen,
>>>>
>>>> 2010/11/15 Sean Mason <[hidden email]>:
>>>> > Got it now. I had to copy some files to the share/robots folder.
>>>> > Thanks
>>>> > again!
>>>> > -Sean
>>>> >
>>>> > On Mon, Nov 15, 2010 at 11:46 AM, Sean Mason <[hidden email]>
>>>> > wrote:
>>>> >>
>>>> >> I found the file and placed it in the right folder, however now the
>>>> >> floor
>>>> >> is not loading and the robot simply falls. Any ideas? The code looks
>>>> >> very
>>>> >> strait forwards, so I'm not sure what could be wrong.
>>>> >> -Sean
>>>> >>
>>>> >> On Mon, Nov 15, 2010 at 10:55 AM, Rosen Diankov
>>>> >> <[hidden email]>
>>>> >> wrote:
>>>> >>>
>>>> >>> can you make sure the
>>>> >>>
>>>> >>> c:\program
>>>> >>> files\openrave\share\openrave\data\diffdrive_sample.env.xml
>>>> >>>
>>>> >>> exists? If not, can you make sure it exists in the source dir?
>>>> >>> perhaps
>>>> >>> something didn't install correctly?
>>>> >>>
>>>> >>> rosen,
>>>> >>>
>>>> >>> 2010/11/15 Sean Mason <[hidden email]>:
>>>> >>> > Rosen,
>>>> >>> > I really appreciate the example. I am receiving the following
>>>> >>> > error
>>>> >>> > when I
>>>> >>> > run it:
>>>> >>> > [openravepy_int.cpp:2588] viewer qtcoin successfully attached
>>>> >>> > [xmlreaders.h:340] could not find file
>>>> >>> > data/diffdrive_sample.env.xml
>>>> >>> > [environment-core.h:384] load failed on file
>>>> >>> > data/diffdrive_sample.env.xml
>>>> >>> > Traceback (most recent call last):
>>>> >>> >   File "C:\Program
>>>> >>> > Files\openRave\python\examples\testphysics_diffdrive.py",
>>>> >>> > lin
>>>> >>> > e 55, in <module>
>>>> >>> >     run()
>>>> >>> >   File "C:\Program
>>>> >>> > Files\openRave\python\examples\testphysics_diffdrive.py",
>>>> >>> > lin
>>>> >>> > e 42, in run
>>>> >>> >     robot = env.GetRobots()[0]
>>>> >>> > IndexError: list index out of range
>>>> >>> > QObject::killTimers: timers cannot be stopped from another thread
>>>> >>> > -Sean
>>>> >>> > On Mon, Nov 15, 2010 at 10:21 AM, Rosen Diankov
>>>> >>> > <[hidden email]>
>>>> >>> > wrote:
>>>> >>> >>
>>>> >>> >> hi sean,
>>>> >>> >>
>>>> >>> >> openrave.py is a program, you execute it normally by opening the
>>>> >>> >> command
>>>> >>> >> line.
>>>> >>> >>
>>>> >>> >> Nevertheless, it is also possible to start a sample through
>>>> >>> >> ipython
>>>> >>> >> using:
>>>> >>> >>
>>>> >>> >> openravepy.examples.testphysics.run()
>>>> >>> >>
>>>> >>> >> Anyway, a diff drive physics sample was just added so users can
>>>> >>> >> get
>>>> >>> >> started more easily (r1838)
>>>> >>> >>
>>>> >>> >> openrave.py --example testphysics_diffdrive
>>>> >>> >>
>>>> >>> >> The robot file is in robots/diffdrive_sample.robot.xml
>>>> >>> >>
>>>> >>> >> good luck!
>>>> >>> >> rosen,
>>>> >>> >>
>>>> >>> >> 2010/11/15 Sean Mason <[hidden email]>:
>>>> >>> >> > Rosen,
>>>> >>> >> > I really appreciate your response. How easy would it be to
>>>> >>> >> > control
>>>> >>> >> > the
>>>> >>> >> > velocity of the wheels and have the physics actually simulate
>>>> >>> >> > movement?
>>>> >>> >> > I believe it may simply be easier for me to control the robot
>>>> >>> >> > simply
>>>> >>> >> > through
>>>> >>> >> > position and orientation.
>>>> >>> >> > I had been looking through the simplenavigation example and
>>>> >>> >> > could
>>>> >>> >> > not
>>>> >>> >> > find
>>>> >>> >> > out how position and orientation is controlled. This is all I
>>>> >>> >> > need
>>>> >>> >> > in
>>>> >>> >> > order
>>>> >>> >> > to progress with creating my differential drive simulation.
>>>> >>> >> > In addition, I am just getting started with learning python and
>>>> >>> >> > I am
>>>> >>> >> > a
>>>> >>> >> > little confuse with where I can communicate with openrave.py. I
>>>> >>> >> > open
>>>> >>> >> > the
>>>> >>> >> > python commandline terminal, check my path, and then try to run
>>>> >>> >> > the
>>>> >>> >> > example:
>>>> >>> >> > Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32
>>>> >>> >> > bit
>>>> >>> >> > (Intel)]
>>>> >>> >> > on
>>>> >>> >> > win32
>>>> >>> >> > Type "help", "copyright", "credits" or "license" for more
>>>> >>> >> > information.
>>>> >>> >> >>>> import sys
>>>> >>> >> >>>> sys.path
>>>> >>> >> > ['', 'C:\\Program Files\\openRave\\share\\openrave',
>>>> >>> >> > 'C:\\WINDOWS\\system32\\pyt
>>>> >>> >> > hon26.zip', 'C:\\Program Files\\DLLs', 'C:\\Program
>>>> >>> >> > Files\\lib',
>>>> >>> >> > 'C:\\Program Fi
>>>> >>> >> > les\\lib\\plat-win', 'C:\\Program Files\\lib\\lib-tk',
>>>> >>> >> > 'C:\\Program
>>>> >>> >> > Files',
>>>> >>> >> > 'C:\
>>>> >>> >> > \Program Files\\lib\\site-packages', 'C:\\Program
>>>> >>> >> > Files\\lib\\site-packages\\PIL
>>>> >>> >> > ']
>>>> >>> >> >>>> openrave.py --example testphysicscontroller
>>>> >>> >> >   File "<stdin>", line 1
>>>> >>> >> >     openrave.py --example testphysicscontroller
>>>> >>> >> >                                               ^
>>>> >>> >> > SyntaxError: invalid syntax
>>>> >>> >> > What am I doing wrong?
>>>> >>> >> > Thank you in advanced.
>>>> >>> >> > -Sean Mason
>>>> >>> >> > P.S. I am creating tutorials that will document all the
>>>> >>> >> > necessary
>>>> >>> >> > steps
>>>> >>> >> > to
>>>> >>> >> > get started with openRave for beginners like myself. You can
>>>> >>> >> > see
>>>> >>> >> > this
>>>> >>> >> > at http://dasl.mem.drexel.edu/~seanMason/?cat=6 .
>>>> >>> >> > On Fri, Nov 12, 2010 at 6:29 PM, Rosen Diankov
>>>> >>> >> > <[hidden email]>
>>>> >>> >> > wrote:
>>>> >>> >> >>
>>>> >>> >> >> hi sean,
>>>> >>> >> >>
>>>> >>> >> >> If you are interested in velocity control within a physics
>>>> >>> >> >> engine,
>>>> >>> >> >> you
>>>> >>> >> >> can create the ODEVelocity controller and attach it to your
>>>> >>> >> >> robot.
>>>> >>> >> >> testphysicscontroller.py is a simple python script that shows
>>>> >>> >> >> this
>>>> >>> >> >> off
>>>> >>> >> >> for an arm.
>>>> >>> >> >>
>>>> >>> >> >> openrave.py --example testphysicscontroller
>>>> >>> >> >>
>>>> >>> >> >> If you are having trouble setting up your robot, we can create
>>>> >>> >> >> an
>>>> >>> >> >> example.
>>>> >>> >> >>
>>>> >>> >> >> rosen,
>>>> >>> >> >>
>>>> >>> >> >> 2010/11/11 seanmason337 <[hidden email]>:
>>>> >>> >> >> >
>>>> >>> >> >> > Hello All,
>>>> >>> >> >> >
>>>> >>> >> >> > I am very new to openRave and need help getting started with
>>>> >>> >> >> > commanding
>>>> >>> >> >> > my
>>>> >>> >> >> > differential drive robot. I took a look at the simple
>>>> >>> >> >> > navigation
>>>> >>> >> >> > example,
>>>> >>> >> >> > however it appears that it does not implement a differential
>>>> >>> >> >> > drive.
>>>> >>> >> >> > How
>>>> >>> >> >> > can
>>>> >>> >> >> > I control the velocity of my two wheel joints, and have the
>>>> >>> >> >> > robot
>>>> >>> >> >> > move
>>>> >>> >> >> > in
>>>> >>> >> >> > the simulation?
>>>> >>> >> >> >
>>>> >>> >> >> > -Sean Mason
>>>> >>> >> >> > --
>>>> >>> >> >> > View this message in context:
>>>> >>> >> >> >
>>>> >>> >> >> >
>>>> >>> >> >> >
>>>> >>> >> >> > http://openrave-users-list.185357.n3.nabble.com/Mobile-Ground-Robot-Velocity-Control-tp1882454p1882454.html
>>>> >>> >> >> > Sent from the OpenRAVE Users List mailing list archive at
>>>> >>> >> >> > Nabble.com.
>>>> >>> >> >> >
>>>> >>> >> >> >
>>>> >>> >> >> >
>>>> >>> >> >> >
>>>> >>> >> >> >
>>>> >>> >> >> > ------------------------------------------------------------------------------
>>>> >>> >> >> > Centralized Desktop Delivery: Dell and VMware Reference
>>>> >>> >> >> > Architecture
>>>> >>> >> >> > Simplifying enterprise desktop deployment and management
>>>> >>> >> >> > using
>>>> >>> >> >> > Dell EqualLogic storage and VMware View: A highly scalable,
>>>> >>> >> >> > end-to-end
>>>> >>> >> >> > client virtualization framework. Read more!
>>>> >>> >> >> > http://p.sf.net/sfu/dell-eql-dev2dev
>>>> >>> >> >> > _______________________________________________
>>>> >>> >> >> > Openrave-users mailing list
>>>> >>> >> >> > [hidden email]
>>>> >>> >> >> > https://lists.sourceforge.net/lists/listinfo/openrave-users
>>>> >>> >> >> >
>>>> >>> >> >
>>>> >>> >> >
>>>> >>> >
>>>> >>> >
>>>> >>
>>>> >
>>>> >
>>>
>>
>
>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|

Re: Mobile Ground Robot Velocity Control

Rosen Diankov
Administrator
Hi Sean,

Please lock the environment when issuing commands to openrave.

http://openrave.programmingvision.com/ordocs/en/html/architecture_concepts.html

Ie

with env:
    robot.GetController().SendCommand('setvelocity '+r +' ' + -l)

You should probably also lock it when iterating the cameras.

Some functions can be used without locking, these are have a
"multi-thread safe" comment in their documentation. For example, all
functions directly called from the environment.

rosen,

2010/11/18 Sean Mason <[hidden email]>:

> Thanks for the tip. I am currently working with the testcamera sensor and
> testphysics_diffdrive. I am trying to both command the velocity of my joints
> for steering and have camera feedback. The issue is that when I try to
> command the joint velocities, I either lose connection (frozen image) from
> the camera GUI or have the following error:
> error in background error handler:
> out of stack space (infinite loop?)
>     while executing
> "::tcl::Bgerror {out of stack space (infinite loop?)} {-code 1 -level 0
> -errorc
> de NONE -errorinfo {out of stack space (infinite loop?)
>     ("after" sc..."
> From the example code I couldn't gather how sensor data / robot movement are
> handled and why they would interfere. If you could point me in the right
> direction I would really appreciate it.
> -Sean
> P.S. I have attached my code for reference
>
>
> On Thu, Nov 18, 2010 at 10:03 AM, Rosen Diankov <[hidden email]>
> wrote:
>>
>> hi sean,
>>
>> please don't put your code in the openrave sources, you'll only make
>> life difficult for yourself when upgrading.
>> there is no difference in terms of getting access to the entire openrave
>> system.
>>
>> this also goes for your model files and plugins. put them in your own
>> directory and set OPENRAVE_DATA and OPENRAVE_PLUGINS correctly
>>
>> rosen,
>>
>> 2010/11/18 Sean Mason <[hidden email]>:
>> > Please disregard the previous question.
>> >
>> > On Thu, Nov 18, 2010 at 7:58 AM, Sean Mason <[hidden email]>
>> > wrote:
>> >>
>> >> I am now working in python and the camera is working fine. I wrote some
>> >> code and saved it in both:
>> >> C:\Program Files\openRave\share\openrave\openravepy\examples
>> >> and
>> >> C:\Program Files\openRave\python\examples
>> >> however when I try to find it by:
>> >> openrave.py --listexamples
>> >> it does not come up in the list.
>> >> Do I have to rebuild, use a different folder, or something else?
>> >> -Sean
>> >>
>> >> On Wed, Nov 17, 2010 at 8:24 PM, Rosen Diankov
>> >> <[hidden email]>
>> >> wrote:
>> >>>
>> >>> i think it is better to fix the bug rather than work around it. the
>> >>> code to send the image is in:
>> >>>
>> >>> plugins/textserver/textserver.h starting on line 1189
>> >>>
>> >>> the encoding is RLE
>> >>>
>> >>> if i get time, i'll take a look at it, but i cannot guarantee when it
>> >>> will be fixed
>> >>>
>> >>> i highly recommend python..
>> >>>
>> >>> rosen,
>> >>>
>> >>> 2010/11/17 Sean Mason <[hidden email]>:
>> >>> > Yes, the python example with my created scene seems to work just
>> >>> > fine.
>> >>> > I'd
>> >>> > agree that there is most likely some bug with matlab.I'm going to
>> >>> > continue
>> >>> > working with Matlab, and I will create multiple bodies to define the
>> >>> > line. Thank you for your help.
>> >>> > On Wed, Nov 17, 2010 at 7:29 PM, Rosen Diankov
>> >>> > <[hidden email]>
>> >>> > wrote:
>> >>> >>
>> >>> >> i'm not sure what the problem is, on my side everything is working
>> >>> >> fine (i am attaching a screenshot)
>> >>> >>
>> >>> >> can you test your scene with the python demo instead of the matlab
>> >>> >> demo:
>> >>> >>
>> >>> >> openrave.py --example testcamerasensor --scene=yourscene.xml
>> >>> >>
>> >>> >> perhaps there's a bug with the matlab image serialization...
>> >>> >>
>> >>> >> rosen,
>> >>> >>
>> >>> >> 2010/11/17 Sean Mason <[hidden email]>:
>> >>> >> >
>> >>> >> >
>> >>> >> > On Wed, Nov 17, 2010 at 5:53 PM, Rosen Diankov
>> >>> >> > <[hidden email]>
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >> hi sean,
>> >>> >> >>
>> >>> >> >> please send me your models/linefollowingbase3.wrl file
>> >>> >> >>
>> >>> >> >> rosen,
>> >>> >> >>
>> >>> >> >> 2010/11/17 Sean Mason <[hidden email]>:
>> >>> >> >> > No luck. The VRML renders, but adjusting the ambient color and
>> >>> >> >> > diffuse
>> >>> >> >> > color
>> >>> >> >> > seems to have no impact on the material.
>> >>> >> >> > Here is the xml cond I wrote to try and adjust the ambient
>> >>> >> >> > color:
>> >>> >> >> > <KinBody name="linefollowingbase">
>> >>> >> >> >   <Body type="static">
>> >>> >> >> >     <Geom type="trimesh">
>> >>> >> >> >  <Data>models/linefollowingbase3.wrl</Data>
>> >>> >> >> >  <diffuseColor>.5 .5 .5</diffuseColor>
>> >>> >> >> >       <ambientColor>.5 .5 .5</ambientColor>
>> >>> >> >> >       <Render>models/linefollowingbase3.wrl</Render>
>> >>> >> >> >     </Geom>
>> >>> >> >> >   </Body>
>> >>> >> >> > </KinBody>
>> >>> >> >> >
>> >>> >> >> > I've tried different combinations for the 3 numbers in ambient
>> >>> >> >> > color
>> >>> >> >> > and
>> >>> >> >> > diffuseColor, but the camera always sees the floor as white
>> >>> >> >> > (unless I
>> >>> >> >> > do
>> >>> >> >> > not
>> >>> >> >> > render the file).
>> >>> >> >> > I'm thinking I could export three vrmls (inner piece, desired
>> >>> >> >> > line
>> >>> >> >> > path,
>> >>> >> >> > and
>> >>> >> >> > outer piece) and color them all differently. It's a major hack
>> >>> >> >> > to
>> >>> >> >> > accomplish
>> >>> >> >> > what I want, but I can't think of anything else at the moment.
>> >>> >> >> > -Sean
>> >>> >> >> >
>> >>> >> >> > On Wed, Nov 17, 2010 at 4:58 PM, Rosen Diankov
>> >>> >> >> > <[hidden email]>
>> >>> >> >> > wrote:
>> >>> >> >> >>
>> >>> >> >> >> hi sean,
>> >>> >> >> >>
>> >>> >> >> >> the plotted lines are not displayed by the camera by
>> >>> >> >> >> design... i
>> >>> >> >> >> should have mentioned this.
>> >>> >> >> >>
>> >>> >> >> >> as for the VRML file, can you try adjusting the ambient
>> >>> >> >> >> properties
>> >>> >> >> >> of
>> >>> >> >> >> the material?
>> >>> >> >> >>
>> >>> >> >> >> rosen,
>> >>> >> >> >
>> >>> >> >> >
>> >>> >> >
>> >>> >> >
>> >>> >
>> >>> >
>> >>
>> >
>> >
>
>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users