RevoluteJoint: set-torque bug?

Andrei Androsoff <[email protected]> Tue, 14 Jun 2005 23:37:15 -0400
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
Hi everybody,

First of all, a quick thanks to Jon for creating Breve - it is an  
astounding piece of work. I wish I were so clever and dedicated.

I'm a relative newbie, so, apologies if I've made an obvious error  
and am wasting everybody's time.

I'm trying to use the RevoluteJoint class's set-joint-torque method  
and it just flat-out doesn't work. The easiest way to demonstrate it  
is to use the Programming Examples:JointTypeDemo file and modify the  
definition for ExampleRevoluteJoint. Rather than include the whole  
source, here is just the relevant change:

RevoluteJoint : ExampleRevoluteJoint {
     + to iterate:
         # self set-joint-velocity to sin((controller get-time) /  
4) / 2.
         self set-joint-torque to 1.0.
}

The error message is:

Conversion Error
Error in file "Joint.tz" at line 387:
cannot convert vector expression to type "double"
...

So it would appear that there is a bug in the Breve source code. I  
took a look at the source for Joint.tz, and it appears that the  
private method in Joint.tz  is unnecessarily making a 3d vector out  
of the scalar torque value and passing that to another method,  
causing the error.

However, I don't really want to mess with the source, being totally  
unfamiliar with it, and I figure it would be better to notify the  
developer in case it has to be changed for everybody.

Thanks in advance for any help,

Andrei Androsoff




No matter how far you have gone on the wrong road, turn back. - 
Turkish proverb

_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve