2 #include <pr2_mechanism_controllers/base_controller.h> 3 #include <hardware_interface/hardware_interface.h> 5 #include <urdf/parser.h> 13 printf(
"Usage: %s <robot_xml> <controller_xml>\n",argv[0]);
16 printf(
"robot file:: %s, controller file:: %s\n",argv[1],argv[2]);
20 pr2_mechanism::Robot *robot_model =
new pr2_mechanism::Robot;
21 controller::BaseControllerNode bc;
22 HardwareInterface hw(0);
23 robot_model->hw_ = &hw;
30 char *xml_robot_file = argv[1];
31 TiXmlDocument xml(xml_robot_file);
33 TiXmlElement *root = xml.FirstChildElement(
"robot");
34 urdf::normalizeXml(root);
35 robot_model->initXml(root);
40 #error Broken because the base controller does not have initXml anymore 41 char *xml_control_file = argv[2];
42 TiXmlDocument xml_control(xml_control_file);
43 xml_control.LoadFile();
44 TiXmlElement *root_control = xml_control.FirstChildElement(
"controllers");
45 TiXmlElement *root_controller = root_control->FirstChildElement(
"controller");
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char **argv)