From: MML <Mor...@ho...> - 2008-10-06 14:39:21
|
Hi all Hope you can help me with this one. how is it possible to control the torque, in a joint, from a c++ program? I have created a world and a model file. now i would like to build my own controller for the joints in the model, using a c++ program, but i can not figure out how the syntax should be? It looks like i have to include the joint.hh and the header for the type of joint i am using but i am sort of stuck when it comes to loading the joint into the c++ program. I checked the ODE and it looks like there is an interface to the joints here too, which supports torque control, but i am kind of stuck when it comes to the (XMLconfig *node) which, as i see it should be used to tell the c++ program what and where the joint is... So whether I go "directly" through gazebos joint.hh header or through ode.h i am stuck at the XMLconfig thing. If it is possible an example would be greatly appreciated, since I am no code expert. Kindly Morten ----- Morten -- View this message in context: http://www.nabble.com/direct-Torque-control-from-c%2B%2B---tp19838798p19838798.html Sent from the playerstage-gazebo mailing list archive at Nabble.com. |
From: Nate K. <nk...@us...> - 2008-10-07 22:53:47
|
Hello, In order to control a custom model, you need to write a controller class. There are examples in gazebo/server/controllers. I would recommend looking at gazebo/server/controllers/actarray/bandit. This controller implements joint control of a humanoid robot. Then take a look at worlds/models/banit.model to see how the controller is specified in the model. -nate On Mon, Oct 6, 2008 at 7:14 AM, MML <Mor...@ho...> wrote: > > Hi all > > Hope you can help me with this one. > how is it possible to control the torque, in a joint, from a c++ program? > > I have created a world and a model file. now i would like to build my own > controller for the joints in the model, using a c++ program, but i can not > figure out how the syntax should be? > It looks like i have to include the joint.hh and the header for the type of > joint i am using but i am sort of stuck when it comes to loading the joint > into the c++ program. I checked the ODE and it looks like there is an > interface to the joints here too, which supports torque control, but i am > kind of stuck when it comes to the (XMLconfig *node) which, as i see it > should be used to tell the c++ program what and where the joint is... So > whether I go "directly" through gazebos joint.hh header or through ode.h i > am stuck at the XMLconfig thing. > If it is possible an example would be greatly appreciated, since I am no > code expert. > > Kindly Morten > > ----- > Morten > -- > View this message in context: http://www.nabble.com/direct-Torque-control-from-c%2B%2B---tp19838798p19838798.html > Sent from the playerstage-gazebo mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Playerstage-gazebo mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > |
From: MML <Mor...@ho...> - 2008-10-08 19:56:40
|
Hi Nate Great!!! just was I was looking for. Nate Koenig-4 wrote: > > Hello, > > In order to control a custom model, you need to write a controller > class. There are examples in gazebo/server/controllers. I would > recommend looking at gazebo/server/controllers/actarray/bandit. This > controller implements joint control of a humanoid robot. > > Then take a look at worlds/models/banit.model to see how the > controller is specified in the model. > > > -nate > > On Mon, Oct 6, 2008 at 7:14 AM, MML <Mor...@ho...> wrote: >> >> Hi all >> >> Hope you can help me with this one. >> how is it possible to control the torque, in a joint, from a c++ program? >> >> I have created a world and a model file. now i would like to build my own >> controller for the joints in the model, using a c++ program, but i can >> not >> figure out how the syntax should be? >> It looks like i have to include the joint.hh and the header for the type >> of >> joint i am using but i am sort of stuck when it comes to loading the >> joint >> into the c++ program. I checked the ODE and it looks like there is an >> interface to the joints here too, which supports torque control, but i am >> kind of stuck when it comes to the (XMLconfig *node) which, as i see it >> should be used to tell the c++ program what and where the joint is... So >> whether I go "directly" through gazebos joint.hh header or through ode.h >> i >> am stuck at the XMLconfig thing. >> If it is possible an example would be greatly appreciated, since I am no >> code expert. >> >> Kindly Morten >> >> ----- >> Morten >> -- >> View this message in context: >> http://www.nabble.com/direct-Torque-control-from-c%2B%2B---tp19838798p19838798.html >> Sent from the playerstage-gazebo mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Playerstage-gazebo mailing list >> Pla...@li... >> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo >> > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Playerstage-gazebo mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > > ----- Morten -- View this message in context: http://www.nabble.com/direct-Torque-control-from-c%2B%2B---tp19838798p19886366.html Sent from the playerstage-gazebo mailing list archive at Nabble.com. |
From: MML <Mor...@ho...> - 2008-10-17 22:47:29
|
Hello again Nate I have looked into the examples you told me about, but I still have a problem... I cant figure out the call from my c++ program to load any controller... let me elaberate. I undestand that a controller has to be made in the model file and that this controller can be accessed from the c++ program... when I looked at the Bandit_Actarray.hh the constructor - Bandit_Actarray(Entity *parent ); - takes an input and i cant figure out what I should put here.. I imagine I have to specify the name of the controller or model that I want my c program to control... (I have tried a lot of crazy ideas...) If you (or anybody else) have an example of calling any function that requires the (Entity *parent) as input, and the corresponding model/controller name in the model or world file I would be very thankfull. - it doesnt have to be to the bandit_actarray, as the same input is required for all controllers if I am not mistaken. I am using eclipse as my environment... please dont tell me i should just leave the input as "(Entity *parent)", and i have made an error in the setup of my compiler.. Kindly Morten MML wrote: > > Hi Nate > > Great!!! > > just was I was looking for. > > > Nate Koenig-4 wrote: >> >> Hello, >> >> In order to control a custom model, you need to write a controller >> class. There are examples in gazebo/server/controllers. I would >> recommend looking at gazebo/server/controllers/actarray/bandit. This >> controller implements joint control of a humanoid robot. >> >> Then take a look at worlds/models/banit.model to see how the >> controller is specified in the model. >> >> >> -nate >> > > ----- Morten -- View this message in context: http://www.nabble.com/direct-Torque-control-from-c%2B%2B---tp19838798p20042194.html Sent from the playerstage-gazebo mailing list archive at Nabble.com. |
From: Nate K. <nat...@gm...> - 2008-10-23 18:08:00
|
Hello, I'm not really following what you are asking. By "c++ program", I'm assuming you mean you own control code that is external to gazebo. A controller is only accessible via libgazebo or player interfaces. You're external control code should not try to directly access a controller. All that a controller does is act as a middleman between sensors and actuators, and libgazebo. Controllers basically filter data to fit interfaces and sensors/actuators. So, if you have some program that should access an actarray, it should communicate with the libgazebo actarray interface. Hope that helps. -nate On Fri, Oct 17, 2008 at 3:47 PM, MML <Mor...@ho...> wrote: > > Hello again Nate > > I have looked into the examples you told me about, but I still have a > problem... I cant figure out the call from my c++ program to load any > controller... let me elaberate. > I undestand that a controller has to be made in the model file and that this > controller can be accessed from the c++ program... when I looked at the > Bandit_Actarray.hh the constructor - Bandit_Actarray(Entity *parent ); - > takes an input and i cant figure out what I should put here.. I imagine I > have to specify the name of the controller or model that I want my c program > to control... (I have tried a lot of crazy ideas...) > If you (or anybody else) have an example of calling any function that > requires the (Entity *parent) as input, and the corresponding > model/controller name in the model or world file I would be very thankfull. > - it doesnt have to be to the bandit_actarray, as the same input is required > for all controllers if I am not mistaken. > > I am using eclipse as my environment... please dont tell me i should just > leave the input as "(Entity *parent)", and i have made an error in the setup > of my compiler.. > > Kindly > Morten > > > MML wrote: >> >> Hi Nate >> >> Great!!! >> >> just was I was looking for. >> >> >> Nate Koenig-4 wrote: >>> >>> Hello, >>> >>> In order to control a custom model, you need to write a controller >>> class. There are examples in gazebo/server/controllers. I would >>> recommend looking at gazebo/server/controllers/actarray/bandit. This >>> controller implements joint control of a humanoid robot. >>> >>> Then take a look at worlds/models/banit.model to see how the >>> controller is specified in the model. >>> >>> >>> -nate >>> >> >> > > > ----- > Morten > -- > View this message in context: http://www.nabble.com/direct-Torque-control-from-c%2B%2B---tp19838798p20042194.html > Sent from the playerstage-gazebo mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Playerstage-gazebo mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > |