Revision 89374d69 examples/meka/src/main.cpp
examples/meka/src/main.cpp | ||
---|---|---|
22 | 22 |
|
23 | 23 |
*/ |
24 | 24 |
|
25 |
if (argc != 4){ |
|
26 |
printf("> ERROR: invalid number of parameters passed to server!\n\nusage: %s <humotion base topic> <jointstates topic> <control topic> (example: %s /meka /joint_states /meka_roscontrol/head_position_trajectory_controller/command)\n\n",argv[0],argv[0]); |
|
27 |
exit(EXIT_FAILURE); |
|
28 |
} |
|
29 |
|
|
25 | 30 |
//create humotion interface |
26 |
string scope = "/"; |
|
27 |
MekaJointInterface *jointinterface = new MekaJointInterface(scope); |
|
28 |
humotion::server::Server *humotion_server = new humotion::server::Server("/flobi", "ROS", jointinterface); |
|
31 |
string humotion_scope = argv[1]; |
|
32 |
string jointstates_scope = argv[2]; |
|
33 |
string control_scope = argv[3]; |
|
34 |
|
|
35 |
|
|
36 |
MekaJointInterface *jointinterface = new MekaJointInterface(jointstates_scope, control_scope); |
|
37 |
humotion::server::Server *humotion_server = new humotion::server::Server(humotion_scope, "ROS", jointinterface); |
|
29 | 38 |
|
30 | 39 |
//finally run it |
31 | 40 |
jointinterface->run(); |
Also available in: Unified diff