Joint position controller in Gazebo

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

Joint position controller in Gazebo

Ugo Cupcic-2
Dear all,

I'm currently building a gazebo model for our robot (a robotic hand).

I have a simple question: I want to add controllers to control the positions
of my joints. The joints are hinges, so the position controllers should take
one angle as input and set the corresponding joint in my model to this
received angle.

I checked on the internet and found some tutorials but didn't manage to make
any of them work in my case... Any help is most welcome !

By the way, just in case it makes a difference, I have gazebo 0.10.0 and player
3.0.0 installed.

Cheers,

Ugo

PS: I can send the whole model if it is easier

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Joint position controller in Gazebo

Ugo Cupcic-2
Hi,

A little more precisions on my previous question. I'm trying to use actarray,
so I define a controller like this at the end of my .model :

 <controller:hand_actarray name="hand_controller">
    <joint name="wrj2">
      <force>1</force>
      <gain>1</gain>
    </joint>
    <interface:actarray name="hand_actarray_iface"/>
  </controller:hand_actarray>


But I get those errors when trying to run gazebo. I guess my controller is not
defined properly?
models/shadow_hand.model:755: namespace error : Namespace prefix controller on
actarray is not defined
  <controller:actarray name="hand_controller">
                                             ^
models/shadow_hand.model:760: namespace error : Namespace prefix interface on
actarray is not defined
    <interface:actarray name="hand_actarray_iface"/>

I also don't know how to access my actarray controller in the player .cfg file.
I tried to put this in the .cfg file (but it is not working):
driver
(
  name "gazebo"
  provides ["simulation:0"]
  plugin "libgazeboplugin"
  server_id "default"
)

driver
(
  name "actarray"
  provides ["actarray:0"]
  gz_id "hand_actarray_iface"
)

Cheers,

Ugo


On Monday 08 Feb 2010 16:11:01 Ugo Cupcic wrote:

> Dear all,
>
> I'm currently building a gazebo model for our robot (a robotic hand).
>
> I have a simple question: I want to add controllers to control the
> positions of my joints. The joints are hinges, so the position controllers
> should take one angle as input and set the corresponding joint in my model
> to this received angle.
>
> I checked on the internet and found some tutorials but didn't manage to
> make any of them work in my case... Any help is most welcome !
>
> By the way, just in case it makes a difference, I have gazebo 0.10.0 and
> player 3.0.0 installed.
>
> Cheers,
>
> Ugo
>
> PS: I can send the whole model if it is easier
>
> ---------------------------------------------------------------------------
> --- The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business Choose flexible plans and management services without long-term
> contracts Personal 24x7 support from experience hosting pros just a phone
> call away. http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Playerstage-gazebo mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Joint position controller in Gazebo

John Hsu-2
Hi Ugo,
do you have a line declaring the namespace for actarray in the root
element?  For example,
<gazebo:world
    ...
    xmlns:controller="
http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
    ...
    xmlns:physics="
http://playerstage.sourceforge.net/gazebo/xmlschema/#physics" >
John


On Mon, Feb 8, 2010 at 9:47 AM, Ugo Cupcic <[hidden email]> wrote:

> Hi,
>
> A little more precisions on my previous question. I'm trying to use
> actarray,
> so I define a controller like this at the end of my .model :
>
>  <controller:hand_actarray name="hand_controller">
>    <joint name="wrj2">
>      <force>1</force>
>      <gain>1</gain>
>    </joint>
>    <interface:actarray name="hand_actarray_iface"/>
>  </controller:hand_actarray>
>
>
> But I get those errors when trying to run gazebo. I guess my controller is
> not
> defined properly?
> models/shadow_hand.model:755: namespace error : Namespace prefix controller
> on
> actarray is not defined
>  <controller:actarray name="hand_controller">
>                                             ^
> models/shadow_hand.model:760: namespace error : Namespace prefix interface
> on
> actarray is not defined
>    <interface:actarray name="hand_actarray_iface"/>
>
> I also don't know how to access my actarray controller in the player .cfg
> file.
> I tried to put this in the .cfg file (but it is not working):
> driver
> (
>  name "gazebo"
>  provides ["simulation:0"]
>  plugin "libgazeboplugin"
>  server_id "default"
> )
>
> driver
> (
>  name "actarray"
>  provides ["actarray:0"]
>  gz_id "hand_actarray_iface"
> )
>
> Cheers,
>
> Ugo
>
>
> On Monday 08 Feb 2010 16:11:01 Ugo Cupcic wrote:
> > Dear all,
> >
> > I'm currently building a gazebo model for our robot (a robotic hand).
> >
> > I have a simple question: I want to add controllers to control the
> > positions of my joints. The joints are hinges, so the position
> controllers
> > should take one angle as input and set the corresponding joint in my
> model
> > to this received angle.
> >
> > I checked on the internet and found some tutorials but didn't manage to
> > make any of them work in my case... Any help is most welcome !
> >
> > By the way, just in case it makes a difference, I have gazebo 0.10.0 and
> > player 3.0.0 installed.
> >
> > Cheers,
> >
> > Ugo
> >
> > PS: I can send the whole model if it is easier
> >
> >
> ---------------------------------------------------------------------------
> > --- The Planet: dedicated and managed hosting, cloud storage, colocation
> > Stay online with enterprise data centers and the best network in the
> > business Choose flexible plans and management services without long-term
> > contracts Personal 24x7 support from experience hosting pros just a phone
> > call away. http://p.sf.net/sfu/theplanet-com
> > _______________________________________________
> > Playerstage-gazebo mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Playerstage-gazebo mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Joint position controller in Gazebo

Ugo Cupcic-2
Hi,

Thanks for your answer John. I didn't have those lines indeed.

Now my gazebo model is more or less running but I had to use this code for it
to run. I had to define the same number of joints as in the bandit model...:
<controller:bandit_actarray name="hand_controller">
    <joint name="ffj1">
      <force>1</force>
      <gain>1</gain>
    </joint>
....
    <interface:actarray name="hand_actarray_iface"/>
</controller:bandit_actarray>

How can I use an actarray with a different number of joints ?

I also can't access the actarray information with playerv. I'm not sure of my
.cfg file. Is my file correct (especially the gz_id)?

  driver
(
  name "gazebo"
  provides ["simulation:0"]
  plugin "libgazeboplugin"
  server_id "default"
)

driver
(
  name "gazebo"
  provides ["actarray:0"]
  gz_id "hand_actarray_iface"
)


Cheers,

Ugo



On Monday 08 Feb 2010 18:13:04 John Hsu wrote:
> xmlns:physics="
> http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Re: Joint position controller in Gazebo

Ugo Cupcic-2
I find the correct syntax for my .cfg file (I can see the actarray in playerv).

Now I just need to understand how to set a given number of joints and then how
to send specific angles to those joints.

Cheers,

Ugo

On Tuesday 09 Feb 2010 09:18:48 Ugo Cupcic wrote:

> Hi,
>
> Thanks for your answer John. I didn't have those lines indeed.
>
> Now my gazebo model is more or less running but I had to use this code for
> it to run. I had to define the same number of joints as in the bandit
> model...: <controller:bandit_actarray name="hand_controller">
>     <joint name="ffj1">
>       <force>1</force>
>       <gain>1</gain>
>     </joint>
> ....
>     <interface:actarray name="hand_actarray_iface"/>
> </controller:bandit_actarray>
>
> How can I use an actarray with a different number of joints ?
>
> I also can't access the actarray information with playerv. I'm not sure of
> my .cfg file. Is my file correct (especially the gz_id)?
>
>   driver
> (
>   name "gazebo"
>   provides ["simulation:0"]
>   plugin "libgazeboplugin"
>   server_id "default"
> )
>
> driver
> (
>   name "gazebo"
>   provides ["actarray:0"]
>   gz_id "hand_actarray_iface"
> )
>
>
> Cheers,
>
> Ugo
>
> On Monday 08 Feb 2010 18:13:04 John Hsu wrote:
> > xmlns:physics="
> > http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
>
> ---------------------------------------------------------------------------
> --- The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business Choose flexible plans and management services without long-term
> contracts Personal 24x7 support from experience hosting pros just a phone
> call away. http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Playerstage-gazebo mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
Reply | Threaded
Open this post in threaded view
|

Generic_Actarray.cc, problem with lowstop, highstop, axis, set speed ?

Ugo Cupcic-2
In reply to this post by Ugo Cupcic-2
Hi,

I'm still having lots of difficulties to use the Generic_Actarray with a table
of hingeJoints controller.

Here is how I set it up in my .model :

....

<joint:hinge name="ffj1">
  <body1>ffmiddle</body1>
  <body2>ffdistal</body2>
  <anchor>ffmiddle</anchor>
    <anchorOffset>0 0 0.025</anchorOffset>
  <axis>1 0 0</axis>
  <lowStop>0</lowStop>
  <highStop>90</highStop>
  <erp>0.8</erp>
  <cfm>10e-5</cfm>
</joint:hinge>

.....


<controller:generic_actarray name="hand_controller" n_actors="1">
    <joint name="ffj1">
      <force>100.0</force>
      <gain>1.0</gain>
      <tolerance>0.01</tolerance>
  <axis>1 0 0</axis>
            <lowStop>0</lowStop>
            <highStop>90</highStop>
    </joint>
...
    <interface:actarray name="hand_actarray_iface"/>
</controller:generic_actarray>


At first I didn't put the axis / lowStop /  highStop parameters in my
controller as I thought they would be taken from the joint definition. It
appeared they weren't, so I added some line to the Generic_Actarray.cc file to
be able to use those parameters in the controller too. Now they are set up
properly. Am I doing something wrong ?

Now the problem I'm facing is that the SetSpeed command in the
Generic_Actarray::UpdateChild() function doesn't seem to do anything. I added
debug line to the Generic_Actarray.cc to check that.
The GetVelocity return something around 0, though the SetVelocity sets it to
1.57.  Any ideas ?

Cheers,

Ugo



On Monday 08 Feb 2010 16:11:01 Ugo Cupcic wrote:

> Dear all,
>
> I'm currently building a gazebo model for our robot (a robotic hand).
>
> I have a simple question: I want to add controllers to control the
> positions of my joints. The joints are hinges, so the position controllers
> should take one angle as input and set the corresponding joint in my model
> to this received angle.
>
> I checked on the internet and found some tutorials but didn't manage to
> make any of them work in my case... Any help is most welcome !
>
> By the way, just in case it makes a difference, I have gazebo 0.10.0 and
> player 3.0.0 installed.
>
> Cheers,
>
> Ugo
>
> PS: I can send the whole model if it is easier
>
> ---------------------------------------------------------------------------
> --- The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business Choose flexible plans and management services without long-term
> contracts Personal 24x7 support from experience hosting pros just a phone
> call away. http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Playerstage-gazebo mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Playerstage-gazebo mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo