src/oru_walk.cpp
// Initialisation of ALmemory fast access, DCM commands, Alias, stiffness, ...
/**
 * @brief 
 */
Initialisation of ALmemory fast access, DCM commands, Alias, stiffness,
@brief
Initialisation of ALmemory fast access DCM commands Alias stiffness @brief
void oru_walk::init()
{
    bool isDCMRunning;
    try
    {
        isDCMRunning = getParentBroker()->getProxy("ALLauncher")->call<bool>("isModulePresent", std::string("DCM"));
    }
    catch (ALError& e)
    {
        ORUW_THROW_ERROR("Error when connecting to DCM: ", e);
    }
    if (!isDCMRunning)
    {
        ORUW_THROW("Error no DCM running");
    }
    try
    {
        dcm_proxy = getParentBroker()->getDcmProxy();
    }
    catch (ALError& e)
    {
        ORUW_THROW_ERROR("Impossible to create DCM Proxy: ", e);
    }
    try
    {
        memory_proxy = getParentBroker()->getMemoryProxy();
    }
    catch (ALError& e)
    {
        ORUW_THROW_ERROR("Impossible to create memory proxy: ", e);
    }
    vector <string> joint_names(JOINTS_NUM, "Device/SubDeviceList/");
    joint_names[HEAD_PITCH]       += "HeadPitch";
    joint_names[HEAD_YAW]         += "HeadYaw";
    joint_names[L_ANKLE_PITCH]    += "LAnklePitch";
    joint_names[L_ANKLE_ROLL]     += "LAnkleRoll";
    joint_names[L_ELBOW_ROLL]     += "LElbowRoll";
    joint_names[L_ELBOW_YAW]      += "LElbowYaw";
    joint_names[L_HIP_PITCH]      += "LHipPitch";
    joint_names[L_HIP_ROLL]       += "LHipRoll";
    joint_names[L_HIP_YAW_PITCH]  += "LHipYawPitch";
    joint_names[L_KNEE_PITCH]     += "LKneePitch";
    joint_names[L_SHOULDER_PITCH] += "LShoulderPitch";
    joint_names[L_SHOULDER_ROLL]  += "LShoulderRoll";
    joint_names[L_WRIST_YAW]      += "LWristYaw";
    joint_names[R_ANKLE_PITCH]    += "RAnklePitch";
    joint_names[R_ANKLE_ROLL]     += "RAnkleRoll";
    joint_names[R_ELBOW_ROLL]     += "RElbowRoll";
    joint_names[R_ELBOW_YAW]      += "RElbowYaw";
    joint_names[R_HIP_PITCH]      += "RHipPitch";
    joint_names[R_HIP_ROLL]       += "RHipRoll";
    joint_names[R_HIP_YAW_PITCH]  += "RHipYawPitch";
    joint_names[R_KNEE_PITCH]     += "RKneePitch";
    joint_names[R_SHOULDER_PITCH] += "RShoulderPitch";
    joint_names[R_SHOULDER_ROLL]  += "RShoulderRoll";
    joint_names[R_WRIST_YAW]      += "RWristYaw";
    initFastRead(joint_names);
    initFastWrite(joint_names);
    initWalkCommands();
}
void oru_walk :: init ( ) { bool isDCMRunning ; try { isDCMRunning = getParentBroker ( ) -> getProxy ( " " ) -> call < bool > ( " " , std :: string ( " " ) ) ; } catch ( ALError & e ) { ORUW_THROW_ERROR ( " " , e ) ; } if ( ! isDCMRunning ) { ORUW_THROW ( " " ) ; } try { dcm_proxy = getParentBroker ( ) -> getDcmProxy ( ) ; } catch ( ALError & e ) { ORUW_THROW_ERROR ( " " , e ) ; } try { memory_proxy = getParentBroker ( ) -> getMemoryProxy ( ) ; } catch ( ALError & e ) { ORUW_THROW_ERROR ( " " , e ) ; } vector < string > joint_names ( JOINTS_NUM , " " ) ; joint_names [ HEAD_PITCH ] += " " ; joint_names [ HEAD_YAW ] += " " ; joint_names [ L_ANKLE_PITCH ] += " " ; joint_names [ L_ANKLE_ROLL ] += " " ; joint_names [ L_ELBOW_ROLL ] += " " ; joint_names [ L_ELBOW_YAW ] += " " ; joint_names [ L_HIP_PITCH ] += " " ; joint_names [ L_HIP_ROLL ] += " " ; joint_names [ L_HIP_YAW_PITCH ] += " " ; joint_names [ L_KNEE_PITCH ] += " " ; joint_names [ L_SHOULDER_PITCH ] += " " ; joint_names [ L_SHOULDER_ROLL ] += " " ; joint_names [ L_WRIST_YAW ] += " " ; joint_names [ R_ANKLE_PITCH ] += " " ; joint_names [ R_ANKLE_ROLL ] += " " ; joint_names [ R_ELBOW_ROLL ] += " " ; joint_names [ R_ELBOW_YAW ] += " " ; joint_names [ R_HIP_PITCH ] += " " ; joint_names [ R_HIP_ROLL ] += " " ; joint_names [ R_HIP_YAW_PITCH ] += " " ; joint_names [ R_KNEE_PITCH ] += " " ; joint_names [ R_SHOULDER_PITCH ] += " " ; joint_names [ R_SHOULDER_ROLL ] += " " ; joint_names [ R_WRIST_YAW ] += " " ; initFastRead ( joint_names ) ; initFastWrite ( joint_names ) ; initWalkCommands ( ) ; }
Initialisation of ALmemory fast access, DCM commands, Alias, stiffness, ...
 @brief
Initialisation of ALmemory fast access DCM commands Alias stiffness ... @brief
// Is the DCM running ? // Get the DCM proxy // Get the memory proxy // Initialisation of ALmemory fast access, DCM commands, Alias, stiffness, ...