Hmm, so you said you don't want to mess with the thumb and fingers. I wanted it to be able to do a thumbs up so I made a thumbs up model and we coud just hide the hand with the wand, both the wands on the other hand and show the thumbs up but it didn't seem to be worth the troubles, form the ICAO annex 2, you can just put the right wand up over your head to signal that everything's ok.
So, other than the hands, what joints are you talking about? I understood 3 axes on the wrist = 1joint. Do you need anymore axes on the other joints (shoulder ane elbow)? I think the elbow is fine because humans can only flex their elbow in 1 axis. For the shoulder, we could put a y-axis too.
And what are your your thoughts on using xml to store the marshaller's signals and sequence? I think it would limit some options but might some people find that easier to use? For example, in an xml file, we can have positions and sequences. A position tree would have something like -
- Code: Select all
<pos n="0">
<name>hands-out-fwd</name>
<left>
<shoulder>
<x-deg>0</x-deg>
<y-deg>-90</y-deg>
<z-deg>0</z-deg>
</shoulder>
<elbow>
<x-deg>0</x-deg>
</elbow>
<hand>
<x-deg>0</x-deg>
<y-deg>0</y-deg>
<z-deg>0</z-deg>
</hand>
</left>
<right>
<shoulder>
<x-deg>0</x-deg>
<y-deg>90</y-deg>
<z-deg>0</z-deg>
</shoulder>
<elbow>
<x-deg>0</x-deg>
</elbow>
<hand>
<x-deg>0</x-deg>
<y-deg>0</y-deg>
<z-deg>0</z-deg>
</hand>
</right>
</pos>
And define a fixed system to parse sequences. Again like I said, this won't give us the freedom nasal does to define sequences. For example, this would be something like - bring hands to rest, lift to hands-out-fwd position, wait for 2 seconds and bring it back down.
- Code: Select all
<signal n="0">
<name>do_something</name>
<sequence>
<position>
<name>rest</name>
<wait>0</wait> <!-- or use wait-prop and wait-value to wait for a property to reach a value -->
</position>
<position>
<name>hands-out-fwd</name>
<wait>2</wait>
</position>
<position>
<name>rest</name>
<wait>0</wait>
</position>
</sequence>
</signal>
I mean, for now, you have to do the following for each step in nasal, but if we did this in xml, I think a lot of others would find it easier to work with when creating signals.
- Code: Select all
if(me.phase == 0) {
if(!check_pos(ramp_tree, pos.hands_out_front)) {
full_animate(ramp_tree, pos.hands_out_front, 100);
} else {
me.phase = 1;
}
}
The good thing about using xml is that we can make many signals and they're all simplifed.
So I added an axis to the shoulder join and 3 axes to the hand joint so far.
- Code: Select all
var rmPos = {
lA_x: 0,
lA_y: 0,
lA_z: 0,
lAO_x: 0,
lH_x: 0,
lH_y: 0,
lH_z: 0,
rA_x: 0,
lA_y: 0,
rA_z: 0,
rAO_x: 0,
rH_x: 0,
rH_y: 0,
rH_z: 0,
new: func(lA_x, lA_y, lA_z, lAO_x, lH_x, lH_y, lH_z, rA_x, rA_y, rA_z, rAO_x, rH_x, rH_y, rH_z) {
var m = { parents: [rmPos] };
m.lA_x = lA_x;
m.lA_y = lA_y;
m.lA_z = lA_z;
m.lAO_x = lAO_x;
m.lH_x = lH_x;
m.lH_y = lH_y;
m.lH_z = lH_z;
m.rA_x = rA_x;
m.rA_y = rA_y;
m.rA_z = rA_z;
m.rAO_x = rAO_x;
m.rH_x = rH_x;
m.rH_y = rH_y;
m.rH_z = rH_z;
return m;
}
};
- Code: Select all
var pos = {
# TEMPLATE: rmPos.new( lA_x, lA_y, lA_z, lAO_x, lH_x, lH_y, lH_z, rA_x, rA_y, rA_z, rAO_x, rH_x, rH_y, rH_z);
rest: rmPos.new( 80, 0, 0, 0, 0, 0, 0, -80, 0, 0, 0, 0, 0, 0),
stop: rmPos.new( -55, 0, 0, -70, 0, 0, 0, 55, 0, 0, 70, 0, 0, 0),
fwd_out: rmPos.new( 0, 0, -50, -30, 0, 0, 0, 0, 0, 50, 30, 0, 0, 0),
fwd_in: rmPos.new( 0, 0, -50, -120, 0, 0, 0, 0, 0, 50, 120, 0, 0, 0),
left_in: rmPos.new( 0, 0, 0, -120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
left_out: rmPos.new( 0, 0, 0, -30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
right_in: rmPos.new( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0),
right_out: rmPos.new( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0)
};
Btw, I was wondering if we can compare 2 hashes with same data instead of comparing each of the variables in them.