Esempio n. 1
0
int main(int argc, char *argv[])
{
    Network yarp;

    if (!yarp.checkNetwork())
        return -1;

    YARP_REGISTER_DEVICES(icubmod)

//    Network::connect("/icubSim/left_arm/contact:o", "/icubSim/left_arm/contact:i");
//    Network::connect("/icubSim/skin/left_hand", "/icubSim/left_arm/contact:i");

    ResourceFinder rf;
    rf.setVerbose(true);
    rf.setDefaultContext("actionPrimitivesExample/conf");
    rf.setDefaultConfigFile("config.ini");
    rf.setDefault("part","left_arm");
    rf.setDefault("grasp_model_type","tactile");
    rf.setDefault("grasp_model_file","grasp_model.ini");
    rf.setDefault("hand_sequences_file","hand_sequences.ini");
    rf.setDefault("name","actionPrimitivesMod");
    rf.configure("ICUB_ROOT",argc,argv);

    ExampleModule mod;

    return mod.runModule(rf);
}
Esempio n. 2
0
/* demonstrates the use of libdetectionModule */
int main(int argc, char** argv) 
{
        std::cerr << "Got command line arguments: " << std::endl;
        for (int i = 0; i != argc; ++i) {
                std::cerr << "Argument " << i << ": " << argv[i] << std::endl;
        }

        if (argc == 2) {
                ExampleModule m(argv[1]);
                return m.exec();
        }

        ExampleModule m;
        return m.exec();

}
Esempio n. 3
0
/* demonstrates the use of libdetectionModule */
int main(int argc, char** argv) 
{
	msgStr.setName("First Examplemodule");
	msgStr.setLevel(MsgStream::INFO);
		
        msgStr.print(MsgStream::INFO, "Got command line arguments:");
        for (int i = 0; i != argc; ++i) {
                msgStr << MsgStream::INFO << "Argument " << i << ": " << argv[i] << MsgStream::endl;
        }

        if (argc == 2) {
                ExampleModule m(argv[1]);
                return m.exec();
        }

        ExampleModule m;
        return m.exec();

}
int main(int argc, char *argv[])
{
    Network yarp;
    if (!yarp.checkNetwork())
    {
        cout<<"YARP server not available!"<<endl;
        return 1;
    }

    ResourceFinder rf;
    rf.setVerbose(true);
    rf.setDefaultConfigFile("config.ini");
    rf.setDefault("grasp_model_type","tactile");
    rf.setDefault("grasp_model_file","grasp_model.ini");
    rf.setDefault("hand_sequences_file","hand_sequences.ini");
    rf.setDefault("name","actionPrimitivesMod");
    rf.configure(argc,argv);

    ExampleModule mod;
    return mod.runModule(rf);
}
Esempio n. 5
0
int main(int argc, char *argv[])
{
    Network yarp;
    if (!yarp.checkNetwork())
    {
        fprintf(stdout,"YARP server not available!\n");
        return -1;
    }

    ResourceFinder rf;
    rf.setVerbose(true);
    rf.setDefault("name","percex");
    rf.setDefault("robot","icub");
    rf.setDefault("hand","right");
    rf.setDefault("modelType","springy");
    rf.setDefault("finger","index");
    rf.configure(argc,argv);

    ExampleModule mod;
    return mod.runModule(rf);
}