simulator-sdk  1.14.5
alnaosim/alnaosim/alnaosim.h
00001 
00006 #ifndef ALNAOSIM_H
00007 #define ALNAOSIM_H
00008 #include <qi/macro.hpp>
00009 
00010 #ifdef alnaosim_EXPORTS
00011 # define ALNAOSIM_API QI_EXPORT_API
00012 #elif defined(alnaosim_IMPORTS)
00013 # define ALNAOSIM_API QI_IMPORT_API
00014 #else
00015 # define ALNAOSIM_API
00016 #endif
00017 
00018 #include <string>
00019 #include <vector>
00020 
00021 namespace Sim
00022 {
00023 
00024   class AngleActuator;
00025   class AngleSensor;
00026   class AngleSpeedActuator;
00027   class AngleSpeedSensor;
00028   class BumperSensor;
00029   class TactileSensor;
00030   class CameraSensor;
00031   class CoupledActuator;
00032   class CoupledSensor;
00033   class DepthInfraredSensor;
00034   class FSRSensor;
00035   class InertialSensor;
00036   class SonarSensor;
00037   class Model;
00038   class TorqueActuator;
00039   class TorqueSensor;
00040   class WheelTorqueActuator;
00041   class WheelVelocityActuator;
00042   class WheelVelocitySensor;
00043   class LEDActuator;
00044 
00054 class ALNAOSIM_API HALInterface
00055 {
00056   public:
00058     HALInterface(const Model* model, int NAOqiId = 9559);
00060     ~HALInterface();
00061 
00067     float fetchAngleActuatorValue(const AngleActuator* angleActuator);
00073     float fetchCoupledActuatorValue(const CoupledActuator* coupledActuator);
00079     float fetchTorqueActuatorValue(const TorqueActuator* torqueActuator);
00085     float fetchAngleSpeedActuatorValue(
00086       const AngleSpeedActuator* angleSpeedActuator);
00092     float fetchWheelTorqueActuatorValue(
00093       const WheelTorqueActuator* wheelTorqueActuator);
00099     float fetchWheelVelocityActuatorValue(
00100       const WheelVelocityActuator* wheelVelocityActuator);
00105     float fetchLEDActuatorValue(const LEDActuator* ledActuator);
00106 
00112     float fetchAngleActuatorStiffness(const AngleActuator* angleActuator);
00118     float fetchCoupledActuatorStiffness(const CoupledActuator* coupledActuator);
00124     float fetchTorqueActuatorStiffness(const TorqueActuator* torqueActuator);
00130     float fetchAngleSpeedActuatorStiffness(
00131       const AngleSpeedActuator* angleSpeedActuator);
00137     float fetchWheelTorqueActuatorStiffness(
00138       const WheelTorqueActuator* wheelTorqueActuator);
00144     float fetchWheelVelocityActuatorStiffness(
00145       const WheelVelocityActuator* wheelVelocityActuator);
00146 
00148     bool sendAngleSensorValue(
00149       const AngleSensor* angleSensor, float value);
00152     bool sendCoupledSensorValue(
00153       const CoupledSensor* coupledSensor, float value);
00155     bool sendTorqueSensorValue(
00156       const TorqueSensor* torqueSensor, float value);
00158     bool sendAngleSpeedSensorValue(
00159       const AngleSpeedSensor* angleSpeedSensor, float value);
00162     bool sendWheelVelocitySensorValue(
00163       const WheelVelocitySensor* wheelVelocitySensor, float value);
00164 
00168     bool sendCameraSensorValue(
00169       const CameraSensor* cameraSensor, const unsigned char* img);
00171     bool sendFSRSensorValue(
00172       const FSRSensor* fsrSensor, float value);
00174     bool sendBumperSensorValue(
00175       const BumperSensor* bumperSensor, float value);
00178     bool sendTactileSensorValue(
00179       const TactileSensor* tactileSensor, float value);
00182     bool sendDepthInfraredSensorValue(
00183       const DepthInfraredSensor* depthInfraredSensor, float value);
00184 
00185 
00188     bool sendInertialSensorValues(
00189       const InertialSensor* inertialSensor, std::vector<const float*> values);
00192     bool sendSonarSensorValues(
00193       const SonarSensor* sonarSensor, std::vector<const float*> values);
00201     bool sendInertialSensorValues(
00202       const InertialSensor* inertialSensor, std::vector<float> values);
00214     bool sendSonarSensorValues(
00215       const SonarSensor* sonarSensor, std::vector<float> values);
00219     bool sendSonarSensorValue(const SonarSensor* sonarSensor, float value);
00220 
00223     std::string activeCamera();
00229     int cameraBufferSize();
00233     void cameraBufferSize(
00234       const CameraSensor* camera,
00235       int* cameraBufferSize,
00236       int* width,
00237       int* height);
00242     int cameraBufferSize(const CameraSensor* camera);
00244     class HALInterfaceImpl* a_impl;
00245 };
00246 
00247 }
00248 #endif // ALNAOSIM_H
 All Classes Namespaces Functions Variables Enumerations Enumerator