Atlas Behavior Library  1.0
AtlasSimInterface.h
Go to the documentation of this file.
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 
00015 
00025 
00026 class AtlasSimInterface;
00027 
00028 extern "C" {
00029 
00042 AtlasSimInterface* create_atlas_sim_interface();
00043 
00048 void destroy_atlas_sim_interface();
00049 
00050 }
00051 
00052 
00059 class AtlasSimInterface
00060 {
00061 public:
00062 
00086     AtlasErrorCode process_control_input(const AtlasControlDataFromRobot& control_input,
00087         AtlasControlDataToRobot& control_output);
00088 
00089 
00109     AtlasErrorCode reset_control();
00110 
00111 
00147     AtlasErrorCode set_desired_behavior(const std::string& behavior);
00148 
00149 
00169     AtlasErrorCode get_desired_behavior(std::string& desired_behavior);
00170 
00171 
00194     AtlasErrorCode get_current_behavior(std::string& current_behavior);
00195 
00196 
00214     AtlasErrorCode get_num_behaviors(int& num_behaviors);
00215 
00216 
00235     AtlasErrorCode get_behavior_at_index(int index, std::string& behavior);
00236 
00237 
00260     AtlasErrorCode get_behavior_joint_weights(const std::string& behavior,
00261         float joint_control_weights[NUM_JOINTS]);
00262 
00263 
00273     AtlasErrorCode get_current_behavior_joint_weights(float joint_control_weights[NUM_JOINTS]);
00274 
00275 
00280     std::string get_error_code_text(AtlasErrorCode ec);
00281 
00282 
00290 
00291     AtlasErrorCode set_behavior_parameter_1f(AtlasBehaviorParameterId parameter_id,
00292         float v);
00293 
00294     AtlasErrorCode get_behavior_parameter_1f(AtlasBehaviorParameterId parameter_id,
00295         float& v);
00296 
00297     AtlasErrorCode set_behavior_parameter_2f(AtlasBehaviorParameterId parameter_id,
00298         float v0,
00299         float v1);
00300 
00301     AtlasErrorCode get_behavior_parameter_2f(AtlasBehaviorParameterId parameter_id,
00302         float& v0,
00303         float& v1);
00304 
00305     AtlasErrorCode set_behavior_parameter_3f(AtlasBehaviorParameterId parameter_id,
00306         float v0,
00307         float v1,
00308         float v2);
00309 
00310     AtlasErrorCode get_behavior_parameter_3f(AtlasBehaviorParameterId parameter_id,
00311         float& v0,
00312         float& v1,
00313         float& v2);
00314 
00315     AtlasErrorCode set_behavior_parameter_quat(AtlasBehaviorParameterId parameter_id,
00316         const AtlasQuaternion& v);
00317 
00318     AtlasErrorCode get_behavior_parameter_quat(AtlasBehaviorParameterId parameter_id,
00319         AtlasQuaternion& v);
00320 
00322 
00323 private:
00324 
00325     AtlasSimInterface();   
00326     ~AtlasSimInterface();  
00327 
00328     friend AtlasSimInterface* create_atlas_sim_interface();
00329     friend void destroy_atlas_sim_interface();
00330 
00331 };
00332 
00333 #if __GNUC__ >= 4
00334 #pragma GCC visibility pop
00335 #endif
00336 
00337 #endif  // __AtlasSimInterface_H
00338