Revision 4b075581
server/src/main.cpp | ||
---|---|---|
45 | 45 |
using namespace boost; |
46 | 46 |
|
47 | 47 |
int main(int argc, char *argv[]) { |
48 |
if ((argc != 3) && (argc != 4)){
|
|
49 |
printf("> ERROR: no base scope passed to server!\n\nusage: %s <mw> <base scopename> [<audio output>] (example: %s RSB /flobi1/ pulse )\n",argv[0],argv[0]);
|
|
48 |
if ((argc != 4) && (argc != 5)){
|
|
49 |
printf("> ERROR: invalid number of parameters passed to server!\n\nusage: %s <mw_hlrc> <mw_humotion> <base scopename> [<audio output>] (example: %s RSB RSB /flobi1/ pulse )\n",argv[0],argv[0]);
|
|
50 | 50 |
printf(" audio output is optional and can be {pulse,oss,alsa,null,sndio,..}\n\n"); |
51 | 51 |
exit(EXIT_FAILURE); |
52 | 52 |
} |
... | ... | |
54 | 54 |
printf("> hlrc_server starting\n"); |
55 | 55 |
|
56 | 56 |
//fetch scope from cmd line |
57 |
std::string scope = argv[2];
|
|
57 |
std::string scope = argv[3];
|
|
58 | 58 |
|
59 | 59 |
//fetch middleware from cmd line |
60 | 60 |
std::string mw = argv[1]; |
61 | 61 |
to_upper(mw); //convert to uppercase |
62 | 62 |
|
63 |
//fetch mw for humotion |
|
64 |
std::string mw_humotion = argv[2]; |
|
65 |
|
|
63 | 66 |
//arbiter |
64 | 67 |
std::string sound_output = "pulse"; |
65 |
if (argc == 4){
|
|
66 |
sound_output = argv[3];
|
|
68 |
if (argc == 5){
|
|
69 |
sound_output = argv[4];
|
|
67 | 70 |
} |
68 | 71 |
arbiter = new Arbiter(sound_output); |
69 | 72 |
|
... | ... | |
77 | 80 |
|
78 | 81 |
//human motion connection: |
79 | 82 |
printf("> initializing humotion client\n"); |
80 |
humotion::client::Client *client = new humotion::client::Client(scope, "ROS");
|
|
83 |
humotion::client::Client *client = new humotion::client::Client(scope, mw_humotion);
|
|
81 | 84 |
|
82 | 85 |
printf("> all done. hlrc server ready\n"); |
83 | 86 |
|
Also available in: Unified diff