Revision 7115c3a4

View differences:

examples/meka/src/mekajointinterface.cpp
23 23
        //store data:
24 24
        if (id != -1){
25 25
            //printf("> storing joint data for joint id %d\n", id);
26
            if (i >= msg.position.size()){
27
                printf("> msg is missing position data for joint %s. exiting! make sure you did start the publisher...\n", name.c_str());
28
                exit(EXIT_FAILURE);
29
            }
30
            if (i >= msg.velocity.size()){
31
                printf("> msg is missing velocity data for joint %s. exiting! make sure you did start the publisher...\n", name.c_str());
32
                exit(EXIT_FAILURE);
33
            }
34
            //ok, safe to access data
26 35
            JointInterface::store_incoming_position(id, msg.position[i], timestamp);
27 36
            JointInterface::store_incoming_speed(   id, msg.velocity[i], timestamp);
28 37
        }

Also available in: Unified diff