Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ign common plugin loader with ign-plugin #38

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/ignition/sensors/AirPressureSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#include <ignition/sensors/config.hh>
Expand Down Expand Up @@ -77,9 +78,11 @@ namespace ignition
/// \return Verical reference position in meters
public: double ReferenceAltitude() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<AirPressureSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/AltimeterSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#include <ignition/sensors/config.hh>
Expand Down Expand Up @@ -94,9 +95,11 @@ namespace ignition
/// \return Vertical velocity in meters per second
public: double VerticalVelocity() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<AltimeterSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
12 changes: 11 additions & 1 deletion include/ignition/sensors/CameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@

#include <sdf/sdf.hh>

#include <ignition/common/PluginMacros.hh>
#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4005)
#endif
#include <ignition/msgs.hh>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

#include <ignition/rendering/Camera.hh>

#include "ignition/sensors/camera/Export.hh"
Expand Down Expand Up @@ -149,9 +157,11 @@ namespace ignition
/// \param[in] _scene Pointer to the new scene.
private: void OnSceneChange(ignition::rendering::ScenePtr /*_scene*/);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<CameraSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
13 changes: 11 additions & 2 deletions include/ignition/sensors/DepthCameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
#include <sdf/sdf.hh>

#include <ignition/common/Event.hh>

#include <ignition/common/PluginMacros.hh>
#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4005)
#endif
#include <ignition/msgs.hh>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

#include <ignition/rendering/DepthCamera.hh>

Expand Down Expand Up @@ -151,9 +157,12 @@ namespace ignition
private: void OnSceneChange(ignition::rendering::ScenePtr /*_scene*/)
{ }


IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<DepthCameraSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
4 changes: 4 additions & 0 deletions include/ignition/sensors/GpuLidarSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>

#include <ignition/rendering/GpuRays.hh>

#include "ignition/sensors/gpu_lidar/Export.hh"
Expand Down Expand Up @@ -116,9 +118,11 @@ namespace ignition
unsigned int _heighti, unsigned int _channels,
const std::string &/*_format*/)> _subscriber) override;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<GpuLidarSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/ImuSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>
#include <ignition/math/Pose3.hh>

Expand Down Expand Up @@ -121,9 +122,11 @@ namespace ignition
/// \return Gravity vectory in meters per second squared.
public: math::Vector3d Gravity() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<ImuSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
5 changes: 5 additions & 0 deletions include/ignition/sensors/Lidar.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <string>
#include <vector>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Event.hh>

#include "ignition/sensors/lidar/Export.hh"
Expand Down Expand Up @@ -228,8 +229,10 @@ namespace ignition
// Documentation inherited
public: virtual bool IsActive() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Just a mutex for thread safety
public: mutable std::mutex lidarMutex;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING

/// \brief Raw buffer of laser data.
public: float *laserBuffer = nullptr;
Expand All @@ -249,9 +252,11 @@ namespace ignition
unsigned int _heighti, unsigned int _channels,
const std::string &/*_format*/)> _subscriber);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<LidarPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
12 changes: 11 additions & 1 deletion include/ignition/sensors/LogicalCameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@

#include <sdf/sdf.hh>

#include <ignition/common/PluginMacros.hh>
#include <ignition/plugin/RegisterMore.hh>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No other plugins have RegisterMore on their headers, can it be removed here?

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#include <ignition/math/Angle.hh>

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4005)
#endif
#include <ignition/msgs.hh>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

#include "ignition/sensors/config.hh"
#include "ignition/sensors/Export.hh"
Expand Down Expand Up @@ -103,9 +111,11 @@ namespace ignition
/// \return List of detected models.
public: msgs::LogicalCameraImage Image() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<LogicalCameraSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/MagnetometerSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>
#include <ignition/math/Pose3.hh>

Expand Down Expand Up @@ -90,9 +91,11 @@ namespace ignition
/// \return Magnetic field vector in body frame
public: math::Vector3d MagneticField() const;

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<MagnetometerSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
11 changes: 11 additions & 0 deletions include/ignition/sensors/Manager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <type_traits>
#include <vector>
#include <sdf/sdf.hh>
#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>
#include <ignition/common/Console.hh>
#include <ignition/sensors/config.hh>
Expand Down Expand Up @@ -153,6 +154,14 @@ namespace ignition
/// is returned on erro.
public: ignition::sensors::SensorId CreateSensor(sdf::ElementPtr _sdf);

/// \brief Add a sensor from a sensor instance.
/// \sa Sensor()
/// \param[in] _sensor pointer to the sensor
/// \return A sensor id that refers to the created sensor. NO_SENSOR
/// is returned on error.
public: ignition::sensors::SensorId AddSensor(
std::unique_ptr<sensors::Sensor> _sensor);

/// \brief Create a sensor from SDF without a known sensor type.
///
/// This creates sensors by looking at the given sdf element.
Expand Down Expand Up @@ -200,8 +209,10 @@ namespace ignition
private: ignition::sensors::SensorId LoadSensorPlugin(
const std::string &_filename, sdf::ElementPtr _sdf);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief private data pointer
private: std::unique_ptr<ManagerPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions include/ignition/sensors/RenderingEvents.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define IGNITION_SENSORS_RENDERINGEVENTS_HH_

#include <ignition/common/Event.hh>
#include <ignition/common/SuppressWarning.hh>
#include <ignition/rendering/Scene.hh>
#include <ignition/sensors/config.hh>
#include <ignition/sensors/rendering/Export.hh>
Expand All @@ -43,10 +44,12 @@ namespace ignition
std::function<void(const ignition::rendering::ScenePtr &)>
_callback);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Event that is used to trigger callbacks when the scene
/// is changed
public: static ignition::common::EventT<
void(const ignition::rendering::ScenePtr &)> sceneEvent;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
4 changes: 4 additions & 0 deletions include/ignition/sensors/RenderingSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include <memory>

#include <ignition/common/SuppressWarning.hh>

#include <ignition/rendering/Scene.hh>
#include <ignition/rendering/Sensor.hh>

Expand Down Expand Up @@ -76,9 +78,11 @@ namespace ignition
/// \param[in] _sensor Sensor to add.
protected: void AddSensor(rendering::SensorPtr _sensor);

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \internal
/// \brief Data pointer for private data
private: std::unique_ptr<RenderingSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
8 changes: 8 additions & 0 deletions include/ignition/sensors/RgbdCameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <sdf/sdf.hh>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>

#include "ignition/sensors/CameraSensor.hh"
Expand Down Expand Up @@ -62,6 +63,11 @@ namespace ignition
/// \return true if loading was successful
public: virtual bool Load(const sdf::Sensor &_sdf) override;

/// \brief Load the sensor with SDF parameters.
/// \param[in] _sdf SDF Sensor parameters.
/// \return true if loading was successful
public: virtual bool Load(sdf::ElementPtr _sdf) override;

/// \brief Initialize values in the sensor
/// \return True on success
public: virtual bool Init() override;
Expand All @@ -88,9 +94,11 @@ namespace ignition
/// \return True on success.
private: bool CreateCameras();

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<RgbdCameraSensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
10 changes: 10 additions & 0 deletions include/ignition/sensors/Sensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@
#ifndef IGNITION_SENSORS_SENSOR_HH_
#define IGNITION_SENSORS_SENSOR_HH_

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4005)
#endif
#include <ignition/msgs/header.pb.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

#include <memory>
#include <string>

#include <ignition/common/SuppressWarning.hh>
#include <ignition/common/Time.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/sensors/config.hh>
Expand Down Expand Up @@ -171,9 +179,11 @@ namespace ignition
public: void AddSequence(ignition::msgs::Header *_msg,
const std::string &_seqKey = "default");

IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \internal
/// \brief Data pointer for private data
private: std::unique_ptr<SensorPrivate> dataPtr;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
Loading