Revision 6168b08c 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]); |
|
25 |
if (argc != 5){ |
|
26 |
printf("> ERROR: invalid number of parameters passed to server!\n\n"); |
|
27 |
printf("usage : %s <humotion base topic> <jointstates topic> <controlstates topic> <control output topic>\n\n",argv[0]); |
|
28 |
printf("example : %s /meka /joint_states /meka_roscontrol_state_manager/state /meka_roscontrol/head_position_trajectory_controller/command)\n\n",argv[0]); |
|
27 | 29 |
exit(EXIT_FAILURE); |
28 | 30 |
} |
29 | 31 |
|
30 | 32 |
//create humotion interface |
31 |
string humotion_scope = argv[1]; |
|
32 |
string jointstates_scope = argv[2]; |
|
33 |
string control_scope = argv[3]; |
|
33 |
string humotion_scope = argv[1]; |
|
34 |
string jointstates_scope = argv[2]; |
|
35 |
string controlstates_scope = argv[3]; |
|
36 |
string control_scope = argv[4]; |
|
34 | 37 |
|
35 | 38 |
|
36 |
MekaJointInterface *jointinterface = new MekaJointInterface(jointstates_scope, control_scope); |
|
39 |
MekaJointInterface *jointinterface = new MekaJointInterface(jointstates_scope, controlstates_scope, control_scope);
|
|
37 | 40 |
humotion::server::Server *humotion_server = new humotion::server::Server(humotion_scope, "ROS", jointinterface); |
38 | 41 |
|
39 | 42 |
//finally run it |
Also available in: Unified diff