Changeset 107 in flair-src


Ignore:
Timestamp:
Nov 3, 2016, 11:11:54 AM (8 years ago)
Author:
Sanahuja Guillaume
Message:

m

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/ReleaseNotes

    r87 r107  
    11* Actual Version:
    22
     3-----------------------------------------------------------
     4* Tag 0.0.2:
     5
     6- src/SensorActuator: quaternion support for 3dmgx3
    37- tool/FlairGCS: added rx rate display
    48- demos/SimpleFleet: new demo, 2 UAVs coordination
    5 - srs/FlairSimulator: added fixed camera
     9- src/FlairSimulator: added fixed camera
    610
    711-----------------------------------------------------------
  • trunk/lib/FlairMeta/src/HdsX8.cpp

    r101 r107  
    6262          }
    6363  */
    64   //SetVerticalCamera(new Ps3Eye(parent, "camv", 0, 50));
     64  SetVerticalCamera(new Ps3Eye(parent, "camv", 0, 50));
    6565}
    6666
     
    7070  ((Gx3_25_ahrs *)GetAhrs())->Start();
    7171  ((Srf08 *)GetUsRangeFinder())->Start();
    72   //((Ps3Eye *)GetVerticalCamera())->Start();
     72  ((Ps3Eye *)GetVerticalCamera())->Start();
    7373  Uav::StartSensors();
    7474}
  • trunk/lib/FlairSimulator/src/FixedCamera.cpp

    r87 r107  
    4343  camera->setPosition(vector3df(ToIrrlichtCoordinates(position)));
    4444  camera->setTarget(vector3df(ToIrrlichtCoordinates(lookat)));
     45  target=vector3df(ToIrrlichtCoordinates(lookat));
    4546  init=false;
    4647  rotation=camera->getRotation();
     
    6263  ICameraSceneNode *camera = static_cast<ICameraSceneNode *>(node);
    6364  vector3df newRotation=rotation;
     65  vector3df newTarget=target;
    6466
    6567if(init==false) {
     
    7678      Rotating = true;
    7779      //nRotY = rotation.Y;
    78       nRotZ = rotation.Z;
     80      //nRotZ =0;// rotation.Z;
    7981    } else {
    8082      nRotY = (RotateStart.Y - MousePos.Y) * rotateSpeed;
    81       nRotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
     83      nRotZ = (RotateStart.X - MousePos.X) * rotateSpeed;
    8284      newRotation.rotateXZBy(-nRotY);
    8385      //nRotY = sat(nRotY);
     86
     87      //newTarget.rotateXZBy(-nRotY,camera->getPosition());
     88      newTarget.rotateXYBy( nRotZ,camera->getPosition());
     89      camera->setTarget(newTarget);
    8490    }
    8591  } else if (Rotating) {
     
    8894    //rotation.Y = sat(rotation.Y);
    8995    //nRotY = rotation.Y;
    90     nRotZ = rotation.Z;
     96    //nRotZ = rotation.Z;
    9197    Rotating = false;
     98    target=camera->getTarget();
     99    rotation=camera->getRotation();
     100  printf("%f %f %f\n",rotation.X,rotation.Y,rotation.Z);
    92101  }
    93102
     
    102111  }
    103112
    104 
     113//newTarget.rotateXZBy(-nRotY,camera->getPosition());
     114//  newTarget.rotateXYBy( nRotZ,camera->getPosition());
    105115
    106116  //camera->setRotation(vector3df(rotation.X,-180-nRotY,nRotZ));
    107117  //camera->setRotation(vector3df(rotation.X,nRotY,0));
    108118  //camera->bindTargetAndRotation(true);
    109   camera->setRotation(rotation);
    110   //camera->setTarget(vector3df(ToIrrlichtCoordinates(core::Vector3D(0,0,-2))));
     119 // camera->setRotation(rotation);
     120 // camera->setTarget(newTarget);
    111121  //rotation=camera->getRotation();
    112122  //printf("%f %f %f\n",rotation.X,rotation.Y,rotation.Z);
  • trunk/lib/FlairSimulator/src/FixedCamera.h

    r87 r107  
    3434  float sat(float value);
    3535  irr::core::position2df RotateStart;
    36   irr::core::vector3df rotation;
     36  irr::core::vector3df rotation,target;
    3737  bool Rotating;
    3838  float rotateSpeed;
  • trunk/tools/Controller/DualShock3/CMakeLists.txt

    r39 r107  
    11PROJECT(dualshock3)
    22cmake_minimum_required(VERSION 2.8)
     3include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
     4
     5if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i686" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i586" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
    36
    47SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    5 
    6 include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
    78include(${FLAIR_USE_FILE})
    89
     
    3132
    3233SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
     34
     35else()
     36warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
     37endif()
  • trunk/tools/Controller/Mavlink/CMakeLists.txt

    r88 r107  
    11PROJECT(MavPlanner)
    22cmake_minimum_required(VERSION 2.8)
     3include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
    34
    4 include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
     5if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i686" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i586" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
     6
    57include(${FLAIR_USE_FILE})
    68
     
    2729
    2830SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
     31
     32else()
     33warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
     34endif()
  • trunk/tools/Dbt2csv/CMakeLists.txt

    r45 r107  
    22cmake_minimum_required(VERSION 2.8)
    33include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
     4
     5if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i686" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i586" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
    46
    57SET(PROJECT_SOURCE_FILES
     
    4749
    4850SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
     51
     52else()
     53warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
     54endif()
  • trunk/tools/FlairGCS/CMakeLists.txt

    r88 r107  
    22cmake_minimum_required(VERSION 2.8)
    33include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
     4
     5if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i686" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i586" OR "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64")
    46
    57execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
     
    8587
    8688SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
     89
     90else()
     91warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
     92endif()
Note: See TracChangeset for help on using the changeset viewer.