SimulatedIAUV.h
Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2013 University of Jaume-I.
00003  * All rights reserved. This program and the accompanying materials
00004  * are made available under the terms of the GNU Public License v3.0
00005  * which accompanies this distribution, and is available at
00006  * http://www.gnu.org/licenses/gpl.html
00007  * 
00008  * Contributors:
00009  *     Mario Prats
00010  *     Javier Perez
00011  */
00012 
00013 #ifndef SIMULATEDIAUV_H_
00014 #define SIMULATEDIAUV_H_
00015 
00016 #include "osgOceanScene.h"
00017 #include "URDFRobot.h"
00018 #include "VirtualCamera.h"
00019 #include "ConfigXMLParser.h"
00020 #include "VirtualRangeSensor.h"
00021 #include "VirtualSLSProjector.h"
00022 #include "ObjectPicker.h"
00023 #include "InertialMeasurementUnit.h"
00024 #include "PressureSensor.h"
00025 #include "GPSSensor.h"
00026 #include "DVLSensor.h"
00027 #include "MultibeamSensor.h"
00028 
00029 class SceneBuilder;
00030 
00031 /* An I-AUV */
00032 class SimulatedIAUV
00033 {
00034 public:
00035   std::vector<VirtualCamera> camview;
00036   std::vector<VirtualCamera> camrange;
00037   std::vector<VirtualRangeSensor> range_sensors;
00038   std::vector<VirtualSLSProjector> sls_projectors;
00039   std::vector<ObjectPicker> object_pickers;
00040   std::vector<InertialMeasurementUnit> imus;
00041   std::vector<PressureSensor> pressure_sensors;
00042   std::vector<GPSSensor> gps_sensors;
00043   std::vector<DVLSensor> dvl_sensors;
00044   std::vector<MultibeamSensor> multibeam_sensors;
00045   boost::shared_ptr<SimulatedDevices> devices;
00046 
00047   typedef enum
00048   {
00049     ARM5, PA10
00050   } arm_t;
00051 
00052   std::string name; 
00053   boost::shared_ptr<URDFRobot> urdf; 
00054   //osg::LightSource* lightSource;      ///< vehicle lamp
00055   osg::ref_ptr<osg::MatrixTransform> baseTransform;
00056 
00057   SimulatedIAUV(SceneBuilder *oscene, Vehicle vehicle);
00058 
00059   //void setVirtualCamera(std::string name, osg::Transform* transform, osg::Vec3d eye, osg::Vec3d orientation, osg::Vec3d upVector, int width, int height);
00060 
00061   //setPosition
00062   void setVehiclePosition(double x, double y, double z, double yaw)
00063   {
00064     setVehiclePosition(x, y, z, 0, 0, yaw);
00065   }
00066   void setVehiclePosition(double x, double y, double z, double roll, double pitch, double yaw);
00067   void setVehiclePosition(double p[6])
00068   {
00069     setVehiclePosition(p[0], p[1], p[2], p[3], p[4], p[5]);
00070   }
00071   void setVehiclePosition(osg::Matrixd m);
00072 
00073   unsigned int getNumCams()
00074   {
00075     return camview.size();
00076   }
00077   unsigned int getNumRangeSensors()
00078   {
00079     return range_sensors.size();
00080   }
00081   unsigned int getNumObjectPickers()
00082   {
00083     return object_pickers.size();
00084   }
00085 
00086   ~SimulatedIAUV()
00087   {
00088     OSG_DEBUG << "Simulated IAUV destructor" << std::endl;
00089   }
00090 };
00091 
00092 #endif /* SIMULATEDIAUV_H_ */


uwsim
Author(s): Mario Prats
autogenerated on Mon Oct 6 2014 08:24:07