prismatic joints
Mithila Patwardhan <[email protected]> Wed, 20 Apr 2005 07:56:34 -0400
| Newsgroups | gmane.comp.breve |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Thanks for that extremely detailed answer to my query, Marc. I wanted to
know exactly that.
I have another question - this one is about prismatic joints in breve. I
have used prismatic joints in my gripper design. When I run the
simulation, the links sort of fall to ground. I thought I should use
set-joint-limits but I get a compiler error when I try to do that. There
is a get-joint-position method but no set-joint-position method. How can
one control the joint?
Regards,
Mithila
Marc Szymanski wrote:
>Hi,
>
>you could write a method in the controller class that returns the pointer to
>the body.
>
>Control : myController {
> + variables:
> body, gripper (object).
> ...
> + to get-gripper:
> return gripper.
>
> + to get-body:
> return body.
>}
>
>You could now access the body and the gripper in every other class with
>"(controller get-body) method-of-body." or "(controller get-gripper)
>method-of-gripper.".
>
>An ohter way would be, if you want to have several bodies with grippers that
>belong to each other, to initialize the gripper with the body.
>
>Real : Gripper {
> + variables:
> myBody (object).
>
> + to init-with body theBody (object):
> myBody = theBody.
> # the following line is very important.
> return self.
>}
>
>I think this would be the most elegant way. Cause you have a typical
>OO-connection like a "gripper has a body". You could create the gripper in
>the init method of the body. I think this is much cleaner than statics or
>friends even C++ because it defines their connection. Did you read the stuff
>about the Multibody? Because you need to link the gripper with the body if
>you want to move the gripper when moving the body.
>
>I hope I understood your question.
>
>\Marc
>
>
>On Wednesday, 20. April 2005 04:38, Mithila Patwardhan wrote:
>
>
>>Hi,
>>
>>I have a question about accessing items outside a class. I am trying to
>>build a vehicular robot with a gripper. I have a class for the body of
>>the robot and another for the gripper. I want to use an object which
>>belongs to the class for the body inside the iterate procedure in the
>>gripper class.
>>
>>I have read through the breve documentation and was unable to come up
>>with a way of doing this. In fact, what is a clean way of referring to
>>objects from other classes without instantiating the class (something
>>along the lines of static members or friend functions?)
>>
>>Thanks,
>>Mithila
>>_______________________________________________
>>breve mailing list
>>[email protected]
>>http://lists.spiderland.org/mailman/listinfo/breve
>>
>>
>
>
>
_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve