Atlas Behavior Library
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 00026 00027 class AtlasSimInterface; 00028 00029 extern "C" { 00030 00043 AtlasSimInterface* create_atlas_sim_interface(); 00044 00049 void destroy_atlas_sim_interface(); 00050 00051 } 00052 00053 00060 class AtlasSimInterface 00061 { 00062 public: 00063 00099 AtlasErrorCode process_control_input(const AtlasControlInput& control_input, 00100 const AtlasRobotState& robot_state, 00101 AtlasControlOutput& control_output); 00102 00103 00123 AtlasErrorCode reset_control(); 00124 00125 00164 AtlasErrorCode set_desired_behavior(const std::string& behavior); 00165 00166 00187 AtlasErrorCode get_desired_behavior(std::string& desired_behavior); 00188 00189 00212 AtlasErrorCode get_current_behavior(std::string& current_behavior); 00213 00214 00232 AtlasErrorCode get_num_behaviors(int& num_behaviors); 00233 00234 00254 AtlasErrorCode get_behavior_at_index(int index, std::string& behavior); 00255 00256 00280 AtlasErrorCode get_behavior_joint_weights(const std::string& behavior, 00281 float joint_control_weights[NUM_JOINTS]); 00282 00283 00293 AtlasErrorCode get_current_behavior_joint_weights(float joint_control_weights[NUM_JOINTS]); 00294 00295 00300 std::string get_error_code_text(AtlasErrorCode ec); 00301 00323 bool get_estimated_position(AtlasPositionData & robot_pos_est, AtlasVec3f foot_pos_est[Atlas::NUM_FEET]); 00324 00325 private: 00326 00327 AtlasSimInterface(); 00328 ~AtlasSimInterface(); 00329 00330 friend AtlasSimInterface* create_atlas_sim_interface(); 00331 friend void destroy_atlas_sim_interface(); 00332 00333 }; 00334 00335 #if __GNUC__ >= 4 00336 #pragma GCC visibility pop 00337 #endif 00338 00339 #endif // __AtlasSimInterface_H 00340