Mankeysocks / bikinect

Automatically exported from code.google.com/p/bikinect
0 stars 0 forks source link

Processor faulty triggered at start #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
 Run mappinect with these setting:

<mappings>

    <mappingset id="abbassaBraccia">    
        <mapping id="start">
            <processor type="action" action="nextSet" filter="less_than" label="ManoDxSottoTorso">
                <element type="joint" target="right_hand" property="position" axis="y" />
                <element type="joint" target="right_shoulder" property="position" axis="y" />
            </processor>    
            <output>
            </output>
        </mapping>
    </mappingset>

    <mappingset id="parlaalmicrofono">  
        <mapping label="manodestra_sopra_spalladestra"> 
            <processor type="boolean" filter="greater_than" label="Parla">
                <element type="joint" target="right_hand" property="position" axis="y" />
                <element type="joint" target="right_shoulder" property="position" axis="y" />
            </processor>        
            <output>
                <midi type="note" device="0" channel="1" channelMap="1" velocityMap="0" minChannel="4" maxChannel="5" minVelocity="0" maxVelocity="127" distinctNotes="true" />
            </output>
        </mapping>

    </mappingset>

What is the expected output? What do you see instead?

I wish the second mapping doesn't run when i put myself in the position that 
allow the kinect to recognize me. I wish it's loaded just when i put my right 
hand below my shoulder.

Look at http://www.youtube.com/watch?v=ZbHuXuySOYo to see that instead the 
second mapping starts immedialtely (see "current set" info label changes)

Sometimes instead, the setting works as should.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by michele....@gmail.com on 10 Nov 2011 at 11:23

GoogleCodeExporter commented 8 years ago
Solved, modifying first mapping as:

    <mappingset id="abbassaBraccia">    
        <mapping id="start">
            <processor type="action" action="nextSet" filter="less_than" label="ManoDxSottoTorso">
                <processor type="boolean" filter="less_than" label="ManoDxSottoTorso">
                    <element type="joint" target="right_hand" property="position" axis="y" />
                    <element type="joint" target="right_shoulder" property="position" axis="y" />
                </processor>
            </processor>    
            <output>
            </output>
        </mapping>
    </mappingset>

Was the way i wrote it uncorrect? What's its meaning? What's the expected 
behaviour?

Original comment by michele....@gmail.com on 10 Nov 2011 at 11:33

GoogleCodeExporter commented 8 years ago
That's the difference between mapping and mappingSet.
The manager load mappings by sets. That means that every mapping inside this 
set is loaded and running at the same time.
If you want a sequential behaviour, you have indeed to separate your sequenced 
mappings into separate sets and change set with an action processor.
Don't forget you can have permanent sets that are running no matter which set 
is loaded.

A trick if you have mappings that are the same between a bunch of sets but not 
all, you can split your mappings into different files and juggle between them 
with a "changeFile" action processor.

Original comment by bkuperb...@gmail.com on 10 Nov 2011 at 11:59

GoogleCodeExporter commented 8 years ago

Original comment by bkuperb...@gmail.com on 10 Nov 2011 at 12:01