Changeset 431 in flair-src
- Timestamp:
- Jul 12, 2021, 8:37:29 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
r342 r431 40 40 Uav* uav=GetUav(); 41 41 42 VrpnClient* vrpnclient=new VrpnClient("vrpn", uav->GetDefaultVrpnAddress(),80 );42 VrpnClient* vrpnclient=new VrpnClient("vrpn", uav->GetDefaultVrpnAddress(),80,uav->GetDefaultVrpnConnectionType()); 43 43 44 44 if(vrpnclient->ConnectionType()==VrpnClient::Xbee) { … … 49 49 targetVrpn=new MetaVrpnObject("target"); 50 50 } else if (vrpnclient->ConnectionType()==VrpnClient::VrpnLite) { 51 uavVrpn = new MetaVrpnObject(uav->ObjectName() ,(uint8_t)0);52 targetVrpn=new MetaVrpnObject("target" ,1);51 uavVrpn = new MetaVrpnObject(uav->ObjectName()); 52 targetVrpn=new MetaVrpnObject("target"); 53 53 } 54 54 -
trunk/demos/MixedReality/real/uav/src/CircleFollower.cpp
r318 r431 41 41 Uav* uav=GetUav(); 42 42 43 VrpnClient* realVrpnClient=new VrpnClient("real_vrpn", uav->GetDefaultVrpnAddress(),80); 44 uavVrpn = new MetaVrpnObject(uav->ObjectName()); 43 VrpnClient* realVrpnClient=new VrpnClient("real_vrpn", uav->GetDefaultVrpnAddress(),80,uav->GetDefaultVrpnConnectionType()); 44 if(realVrpnClient->ConnectionType()==VrpnClient::Xbee) { 45 uavVrpn = new MetaVrpnObject(uav->ObjectName(),(uint8_t)0); 46 } else if (realVrpnClient->ConnectionType()==VrpnClient::Vrpn) { 47 uavVrpn = new MetaVrpnObject(uav->ObjectName()); 48 } else if (realVrpnClient->ConnectionType()==VrpnClient::VrpnLite) { 49 uavVrpn = new MetaVrpnObject(uav->ObjectName()); 50 } 45 51 getFrameworkManager()->AddDeviceToLog(uavVrpn); 46 52 uav->GetAhrs()->YawPlot()->AddCurve(uavVrpn->State()->Element(2),DataPlot::Green); … … 52 58 VrpnClient* simuVrpnClient=new VrpnClient("simu_vrpn", vrpn,80);//simu_simu vrpn server 53 59 targetVrpn=new MetaVrpnObject("Drone_1",simuVrpnClient); 54 55 60 simuVrpnClient->Start(); 61 realVrpnClient->Start(); 56 62 57 63 getFrameworkManager()->AddDeviceToLog(targetVrpn); -
trunk/demos/SimpleFleet/uav/src/SimpleFleet.cpp
r318 r431 53 53 Uav* uav=GetUav(); 54 54 55 VrpnClient* vrpnclient=new VrpnClient("vrpn", uav->GetDefaultVrpnAddress(),80); 56 uavVrpn = new MetaVrpnObject(uav->ObjectName()); 55 VrpnClient* vrpnclient=new VrpnClient("vrpn", uav->GetDefaultVrpnAddress(),80,uav->GetDefaultVrpnConnectionType()); 56 if(vrpnclient->ConnectionType()==VrpnClient::Xbee) { 57 uavVrpn = new MetaVrpnObject(uav->ObjectName(),(uint8_t)0); 58 } else if (vrpnclient->ConnectionType()==VrpnClient::Vrpn) { 59 uavVrpn = new MetaVrpnObject(uav->ObjectName()); 60 } else if (vrpnclient->ConnectionType()==VrpnClient::VrpnLite) { 61 uavVrpn = new MetaVrpnObject(uav->ObjectName()); 62 } 57 63 getFrameworkManager()->AddDeviceToLog(uavVrpn); 58 64 uav->GetAhrs()->YawPlot()->AddCurve(uavVrpn->State()->Element(2),DataPlot::Green); -
trunk/lib/FlairMeta/src/Uav.h
r377 r431 15 15 16 16 #include <Object.h> 17 #include <VrpnClient.h> 17 18 18 19 namespace flair { … … 66 67 sensor::PressureSensor *GetPressureSensor(void) const; 67 68 virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";} 69 virtual sensor::VrpnClient::ConnectionType_t GetDefaultVrpnConnectionType(void) const{return sensor::VrpnClient::ConnectionType_t::Vrpn;} 68 70 virtual bool isReadyToFly(void) const { return true;} 69 71 virtual std::string GetType(void) const=0;
Note:
See TracChangeset
for help on using the changeset viewer.