Beispiel #1
0
InterfaceBasePtr CreateInterfaceValidated(InterfaceType type, const std::string& interfacename, std::istream& sinput, EnvironmentBasePtr penv)
{
    if( type == PT_InverseKinematicsSolver && interfacename == "generalik" ) {
        return InterfaceBasePtr(new GeneralIK(penv));
    }
    return InterfaceBasePtr();
}
Beispiel #2
0
InterfaceBasePtr CreateInterfaceValidated(InterfaceType type, const std::string& interfacename, std::istream& sinput, EnvironmentBasePtr penv)
{
    switch(type) {
    case PT_Viewer:
#if defined(HAVE_X11_XLIB_H) && defined(Q_WS_X11)
        // always check viewers since DISPLAY could change
        if ( XOpenDisplay( NULL ) == NULL ) {
            RAVELOG_WARN("no display detected, so cannot load viewer");
            return InterfaceBasePtr();
        }
#endif
        if( interfacename == "qtcoin" ) {
            // have to lock after initialized since call relies on SoDBP::globalmutex
            boost::mutex::scoped_lock lock(g_mutexsoqt);
            EnsureSoQtInit();
            //SoDBWriteLock dblock;
            return InterfaceBasePtr(new QtCoinViewer(penv, sinput));
        }
        else if( interfacename == "qtcameraviewer" ) {
            return InterfaceBasePtr(new QtCameraViewer(penv,sinput));
        }
        break;
    case PT_Module:
        if( interfacename == "ivmodelloader" ) {
            return CreateIvModelLoader(penv);
        }
        break;
    default:
        break;
    }
    return InterfaceBasePtr();
}
InterfaceBasePtr CreateInterfaceValidated(InterfaceType type, const std::string& interfacename, std::istream& sinput, EnvironmentBasePtr penv)
{
    if( !s_listRegisteredReaders ) {
        s_listRegisteredReaders = new list< boost::shared_ptr<void> >();
        //s_listRegisteredReaders.push_back(ROSMocapSystem::RegisterXMLReader(penv));
    }
    switch(type) {
    case PT_Controller:
        if( interfacename == "rosactionlib")
            return InterfaceBasePtr(new ROSActionLibController(penv,sinput));
        break;
    default:
        break;
    }
    return InterfaceBasePtr();
}
InterfaceBasePtr CreateInterfaceValidated(InterfaceType type, const std::string& interfacename, std::istream& sinput, EnvironmentBasePtr penv)
{
    switch(type) {
    case PT_Planner:
        if( interfacename == "rastar" || interfacename == "ra*" ) {
            return CreateRandomizedAStarPlanner(penv,sinput);
        }
        else if( interfacename == "birrt") {
            return InterfaceBasePtr(new BirrtPlanner(penv));
        }
        else if( interfacename == "rbirrt") {
            RAVELOG_WARN("rBiRRT is deprecated, use BiRRT\n");
            return InterfaceBasePtr(new BirrtPlanner(penv));
        }
        else if( interfacename == "basicrrt") {
            return InterfaceBasePtr(new BasicRrtPlanner(penv));
        }
        else if( interfacename == "explorationrrt" ) {
            return InterfaceBasePtr(new ExplorationPlanner(penv));
        }
        else if( interfacename == "graspgradient" ) {
            return CreateGraspGradientPlanner(penv,sinput);
        }
        else if( interfacename == "shortcut_linear" ) {
            return CreateShortcutLinearPlanner(penv,sinput);
        }
        else if( interfacename == "lineartrajectoryretimer" ) {
            return CreateLinearTrajectoryRetimer(penv,sinput);
        }
        else if( interfacename == "workspacetrajectorytracker" ) {
            return CreateWorkspaceTrajectoryTracker(penv,sinput);
        }
        else if( interfacename == "parabolicsmoother" ) {
            return CreateParabolicSmoother(penv,sinput);
        }
        break;
    default:
        break;
    }
    return InterfaceBasePtr();
}
Beispiel #5
0
InterfaceBasePtr CreateInterfaceValidated(InterfaceType type, const std::string& interfacename, std::istream& sinput, EnvironmentBasePtr penv)
{
    if( !s_listRegisteredReaders ) {
        s_listRegisteredReaders = new list< OpenRAVE::UserDataPtr >();
        s_listRegisteredReaders->push_back(RaveRegisterXMLReader(OpenRAVE::PT_PhysicsEngine,"bulletproperties",BulletPhysicsEngine::CreateXMLReader));
    }

    switch(type) {
    case OpenRAVE::PT_CollisionChecker:
        if( interfacename == "bullet") {
            return CreateBulletCollisionChecker(penv,sinput);
	     
        }
        break;
    case OpenRAVE::PT_PhysicsEngine:
        if( interfacename == "bullet") {
            return CreateBulletPhysicsEngine(penv,sinput);
        }
        break;
    default:
        break;
    }
    return InterfaceBasePtr();
}