eXperiment robotics framework

If plugins inherit from XmlHandler they can receive messages from other plugins to which they can reply.

Communication between plugins:

XmlHandler * xmlHandler_tmp = NULL;
Plugin * plugin_tmp = NULL;
plugin_tmp = MPlugins.getPluginById("manager_zones");
xmlHandler_tmp = dynamic_cast<XmlHandler*>(plugin_tmp);
if ( xmlHandler_tmp ) {
    if ( dynamic_cast <XmlHandler*> (plugin_tmp) ) {
        state = "GO";
    };
    std::auto_ptr<XE> get_center (new XE("getCenter"));
    const XE* x_t= x_in->FirstChildElement("word");
    x_t=x_t->NextSiblingElement("word");
    for (; x_t; x_t=x_t->NextSiblingElement("word")) {
        XE * tag = new XE("tag");
        XT * text = new XT(x_t->GetText());
        tag->LinkEndChild(text);
        get_center->LinkEndChild(tag);
    }
    XE * reply = new XE("vec3");
    int error = xmlHandler_tmp->event(get_center.get(),reply);
    if (error != 0) {
        cerr << MSG_WARN << "in pv3d_planner_and_position : xmlHandler_tmp->event(get_center.get(),reply); returned errror : "<< error << endl;
        state="STOP";
    };
    if (error==0) {
        Vec3 reply_vec((const XE*)reply);
        plannerProxy->SetEnable(1);
        position2dProxy->SetMotorEnable(1);
        plannerProxy->SetGoalPose(reply_vec.x,reply_vec.y,reply_vec.z);
    };
};

The miarn project - written by Joao Xavier