diff --git a/src/robotis_mtn/robotis_mtn.cpp b/src/robotis_mtn/robotis_mtn.cpp index dc98a0c2aeb23663733bbd84a73af2e9bf624800..5ac64fa65f2cad3b4a387489e7d192b3af8d70fb 100644 --- a/src/robotis_mtn/robotis_mtn.cpp +++ b/src/robotis_mtn/robotis_mtn.cpp @@ -307,7 +307,7 @@ std::vector<std::string> CRobotisMtn::get_motor_models(void) const return models; } -TServoInfo CRobotisMtn::get_motor_info(unsigned int servo) const +TServoData CRobotisMtn::get_motor_info(unsigned int servo) const { if(servo>this->get_num_servos()) { @@ -318,7 +318,7 @@ TServoInfo CRobotisMtn::get_motor_info(unsigned int servo) const return this->info[servo]; } -std::vector<TServoInfo> CRobotisMtn::get_motor_infos(void) const +std::vector<TServoData> CRobotisMtn::get_motor_infos(void) const { return this->info; } diff --git a/src/robotis_mtn/robotis_mtn.h b/src/robotis_mtn/robotis_mtn.h index 41c8aead034e6ee04b18279f4b5ab78b1bf7d01c..787a52a34ac47e6a5e2ad226c23fde67d053ac53 100644 --- a/src/robotis_mtn/robotis_mtn.h +++ b/src/robotis_mtn/robotis_mtn.h @@ -23,7 +23,7 @@ typedef struct double max_angle; double center_angle; double max_speed; -}TServoInfo; +}TServoData; class CRobotisMtn { @@ -33,7 +33,7 @@ class CRobotisMtn int num_servos; std::vector<bool> enable; std::vector<CRobotisPage> pages; - std::vector<TServoInfo> info; + std::vector<TServoData> info; public: CRobotisMtn(); CRobotisMtn(CRobotisMtn &mtn); @@ -56,8 +56,8 @@ class CRobotisMtn std::string get_motor_model(unsigned int servo) const; std::vector<int> get_motor_types(void) const; std::vector<std::string> get_motor_models(void) const; - TServoInfo get_motor_info(unsigned int servo) const; - std::vector<TServoInfo> get_motor_infos(void) const; + TServoData get_motor_info(unsigned int servo) const; + std::vector<TServoData> get_motor_infos(void) const; unsigned int get_num_pages(void) const; CRobotisPage get_page(unsigned int page) const; void clear(void); diff --git a/src/robotis_mtn_file/mtn_file_parser.cpp b/src/robotis_mtn_file/mtn_file_parser.cpp index 2d01bf0f12f2c72e05eba4e3a06a2e09cdc52ed8..b6add27e0bd128d652c582b62c0d247a89fe008d 100644 --- a/src/robotis_mtn_file/mtn_file_parser.cpp +++ b/src/robotis_mtn_file/mtn_file_parser.cpp @@ -30,7 +30,10 @@ void MTN::CMtnFileParser::parse(const char *filename) { std::ifstream in_file(filename); if(!in_file.good()) + { + std::cerr << "Failed to open the file!!\n"; _exit( -1 ); + } if(this->scanner!=NULL) delete this->scanner; try