Statistics
| Branch: | Tag: | Revision:

humotion / examples / meka / src / main.cpp @ a4795834

History | View | Annotate | Download (942 Bytes)

1 2be6243f Sebastian Meyer zu Borgsen
#include <stdio.h>
2
#include <humotion/server/server.h>
3
#include <string>
4
#include <iostream>
5
//#include "meka_data_receiver.h"
6
#include "mekajointinterface.h"
7
8
using namespace std;
9
10
int main(int argc, char *argv[]){
11
    /*Property params;
12
    params.fromCommand(argc, argv);
13

14
    if (!params.check("robot")){
15
        fprintf(stderr, "Please specify the name of the robot\n");
16
        fprintf(stderr, "--robot name (e.g. icub or icubSim)\n");
17
        return -1;
18
    }
19

20
    string robotName=params.find("robot").asString().c_str();
21
    string scope="/"+robotName;
22

23
*/
24
25
    //create humotion interface
26 a4795834 Simon Schulz
    string scope = "/xsc3/";
27 2be6243f Sebastian Meyer zu Borgsen
    MekaJointInterface *jointinterface = new MekaJointInterface(scope);
28 a4795834 Simon Schulz
    humotion::server::Server *humotion_server = new humotion::server::Server("/flobi", "ROS", jointinterface);
29 2be6243f Sebastian Meyer zu Borgsen
30 a4795834 Simon Schulz
    //finally run it
31 2be6243f Sebastian Meyer zu Borgsen
    jointinterface->run();
32
33
    while(humotion_server->ok()){
34
        usleep(100000);
35
    }
36
37
    return 0;
38
}