Atlas Sim Interface
1.0
|
00001 00002 #ifndef __AtlasSimInterface_H 00003 #define __AtlasSimInterface_H 00004 00005 #include <string> 00006 00007 #include "AtlasSimInterfaceTypes.h" 00008 00009 #if __GNUC__ >= 4 00010 #pragma GCC visibility push(default) 00011 #endif 00012 00013 using namespace Atlas; 00014 using namespace AtlasSim; 00015 00016 00030 00031 class AtlasSimInterface; 00032 00033 extern "C" { 00034 00047 AtlasSimInterface* create_atlas_sim_interface(); 00048 00049 00054 void destroy_atlas_sim_interface(); 00055 00056 } // end extern "C" 00057 00058 00065 class AtlasSimInterface 00066 { 00067 public: 00068 00069 int get_version_major(); 00070 int get_version_minor(); 00071 int get_version_point(); 00072 00108 AtlasErrorCode process_control_input(const AtlasControlInput& control_input, 00109 const AtlasRobotState& robot_state, 00110 AtlasControlOutput& control_output); 00111 00112 00130 AtlasErrorCode reset_control(); 00131 00132 00171 AtlasErrorCode set_desired_behavior(const std::string& behavior); 00172 00173 00194 AtlasErrorCode get_desired_behavior(std::string& desired_behavior); 00195 00196 00219 AtlasErrorCode get_current_behavior(std::string& current_behavior); 00220 00221 00239 AtlasErrorCode get_num_behaviors(int& num_behaviors); 00240 00241 00261 AtlasErrorCode get_behavior_at_index(int index, std::string& behavior); 00262 00263 00287 AtlasErrorCode get_behavior_joint_weights(const std::string& behavior, 00288 float joint_control_weights[NUM_JOINTS]); 00289 00290 00300 AtlasErrorCode get_current_behavior_joint_weights(float joint_control_weights[NUM_JOINTS]); 00301 00302 00328 AtlasErrorCode get_estimated_position(AtlasPositionData& robot_pos_est, 00329 AtlasVec3f foot_pos_est[Atlas::NUM_FEET]); 00330 00331 00336 std::string get_error_code_text(AtlasErrorCode ec); 00337 00338 00339 private: 00340 00341 AtlasSimInterface(); 00342 ~AtlasSimInterface(); 00343 00344 friend AtlasSimInterface* create_atlas_sim_interface(); 00345 friend void destroy_atlas_sim_interface(); 00346 00347 }; 00348 00349 #if __GNUC__ >= 4 00350 #pragma GCC visibility pop 00351 #endif 00352 00353 #endif // __AtlasSimInterface_H 00354