00001 #include "ImpedanceControllerService_impl.h" 00002 #include "ImpedanceController.h" 00003 #include <hrpModel/Body.h> 00004 #include <hrpModel/Link.h> 00005 00006 ImpedanceControllerService_impl::ImpedanceControllerService_impl() : m_impedance(NULL) 00007 { 00008 } 00009 00010 ImpedanceControllerService_impl::~ImpedanceControllerService_impl() 00011 { 00012 } 00013 00014 CORBA::Boolean ImpedanceControllerService_impl::startImpedanceController(const char *i_name_) 00015 { 00016 return m_impedance->startImpedanceController(std::string(i_name_)); 00017 } 00018 00019 CORBA::Boolean ImpedanceControllerService_impl::startImpedanceControllerNoWait(const char *i_name_) 00020 { 00021 return m_impedance->startImpedanceControllerNoWait(std::string(i_name_)); 00022 } 00023 00024 CORBA::Boolean ImpedanceControllerService_impl::stopImpedanceController(const char *i_name_) 00025 { 00026 return m_impedance->stopImpedanceController(std::string(i_name_)); 00027 } 00028 00029 CORBA::Boolean ImpedanceControllerService_impl::stopImpedanceControllerNoWait(const char *i_name_) 00030 { 00031 return m_impedance->stopImpedanceControllerNoWait(std::string(i_name_)); 00032 } 00033 00034 CORBA::Boolean ImpedanceControllerService_impl::setImpedanceControllerParam(const char *i_name_, const OpenHRP::ImpedanceControllerService::impedanceParam &i_param_) 00035 { 00036 return m_impedance->setImpedanceControllerParam(std::string(i_name_), i_param_); 00037 } 00038 00039 CORBA::Boolean ImpedanceControllerService_impl::getImpedanceControllerParam(const char *i_name_, OpenHRP::ImpedanceControllerService::impedanceParam_out i_param_) 00040 { 00041 i_param_ = new OpenHRP::ImpedanceControllerService::impedanceParam(); 00042 i_param_->force_gain.length(3); 00043 i_param_->moment_gain.length(3); 00044 return m_impedance->getImpedanceControllerParam(std::string(i_name_), *i_param_); 00045 } 00046 00047 void ImpedanceControllerService_impl::waitImpedanceControllerTransition(const char *i_name_) 00048 { 00049 m_impedance->waitImpedanceControllerTransition(std::string(i_name_)); 00050 } 00051 00052 void ImpedanceControllerService_impl::impedance(ImpedanceController *i_impedance) 00053 { 00054 m_impedance = i_impedance; 00055 } 00056