Skip to content

Commit

Permalink
Developed Double laser plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
valegagge committed Mar 29, 2019
1 parent df1424a commit 753288d
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 419 deletions.
7 changes: 2 additions & 5 deletions plugins/doublelaser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ message("sono nel doublelaser!!")

include(AddGazeboYarpPluginTarget)

set(doubleLaser_source src/DoubleLaser.cc
src/DoubleLaserDriver.cpp
)
set(doubleLaser_source src/DoubleLaser.cc )

set(doubleLaser_headers include/gazebo/DoubleLaser.hh
include/yarp/dev/DoubleLaserDriver.h )
set(doubleLaser_headers include/gazebo/DoubleLaser.hh )


set(LIB_COMMON_NAME gazebo_yarp_lib_common)
Expand Down
40 changes: 21 additions & 19 deletions plugins/doublelaser/include/gazebo/DoubleLaser.hh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
* CopyPolicy: Released under the terms of the LGPLv2.1 or any later version, see LGPL.TXT or LGPL3.TXT
*/

/**
* @file DoubleLaser.h
* @authors: Valentina Gaggero <[email protected]>
*/

#ifndef GAZEBOYARP_DOUBLELASER_HH
#define GAZEBOYARP_DOUBLELASER_HH

Expand All @@ -22,20 +27,15 @@ namespace yarp {
namespace gazebo
{
/// \class GazeboYarpDoubleLaser
/// Gazebo Plugin emulating the yarp controlBoard device in Gazebo.
/// Gazebo Plugin emulating the yarp double laser device in Gazebo.
///.
/// It can be configurated using the yarpConfigurationFile sdf tag,
/// that contains a Gazebo URI pointing at a yarp .ini configuration file
/// containt the configuration parameters of the controlBoard
///
/// The gazebo plugin is the "main" of the yarp device,
/// so what it should is to initialize the device, copy the
/// gazebo pointer, and return
/// containing the configuration parameters of the doublelaser
///
/// The device will receive the gazebo pointer, parse the model,
/// and wait for yarp connections and the gazebo wait event.
///
class GazeboYarpDoubleLaser : public SensorPlugin


class GazeboYarpDoubleLaser : public ModelPlugin
{
public:
GazeboYarpDoubleLaser();
Expand All @@ -44,23 +44,25 @@ public:
/**
* Saves the gazebo pointer, creates the device driver
*/
void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf);
void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf);

private:

bool readConfigurationFromFile(physics::ModelPtr _parent, sdf::ElementPtr _sdf); //Getting .ini configuration file from sdf
yarp::dev::PolyDriver m_wrapper_rangeFinder;
yarp::dev::IMultipleWrapper* m_iWrap_rangeFinder;


//yarp::dev::PolyDriverList m_doublelaser; //in this list there is only the doublelaser device
yarp::dev::PolyDriver m_driver_doublelaser;
yarp::dev::IMultipleWrapper* m_iWrap_doublelaser; //the wrapper interface of doublelaser


yarp::dev::PolyDriverList m_lasers;// the contains the pointer two laser (front and back)

yarp::dev::PolyDriver m_driver_doublelaser;
yarp::dev::IMultipleWrapper* m_iWrap_doublelaser;

yarp::dev::PolyDriverList m_lasers; //contains pointers of front and back laser

yarp::os::Property m_parameters;

std::string m_sensorName;

yarp::dev::PolyDriver * m_driver_laserFront;
yarp::dev::PolyDriver * m_driver_laserBack;
};

}
Expand Down
132 changes: 0 additions & 132 deletions plugins/doublelaser/include/yarp/dev/DoubleLaserDriver.h

This file was deleted.

Loading

0 comments on commit 753288d

Please sign in to comment.