18 #ifndef GAZEBO_PLUGINS_FLASHLIGHTPLUGIN_HH_ 19 #define GAZEBO_PLUGINS_FLASHLIGHTPLUGIN_HH_ 24 #include <ignition/math/Color.hh> 27 #include "gazebo/physics/physics.hh" 32 class FlashLightSettingPrivate;
46 const sdf::ElementPtr &_sdf,
55 public:
virtual void InitPubLight(
62 virtual void UpdateLightInEnv(
const common::Time &_currentTime)
final;
66 public:
virtual const std::string Name()
const final;
73 public:
virtual void SwitchOn()
final;
76 public:
virtual void SwitchOff()
final;
81 public:
virtual void SetDuration(
82 const double _duration,
const int _index)
final;
86 public:
virtual void SetDuration(
const double _duration)
final;
91 public:
virtual void SetInterval(
92 const double _interval,
const int _index)
final;
96 public:
virtual void SetInterval(
const double _interval)
final;
101 public:
virtual void SetColor(
102 const ignition::math::Color &_color,
const int _index)
final;
106 public:
virtual void SetColor(
const ignition::math::Color &_color)
final;
110 public:
virtual unsigned int BlockCount()
final;
115 public:
virtual bool RemoveBlock(
const int _index)
final;
124 public:
virtual void InsertBlock(
125 const double _duration,
const double _interval,
126 const ignition::math::Color &_color,
const int _index)
final;
131 protected:
virtual void Flash();
136 protected:
virtual void Dim();
142 protected:
virtual ignition::math::Color CurrentColor()
final;
145 private: std::unique_ptr<FlashLightSettingPrivate> dataPtr;
150 class FlashLightPluginPrivate;
241 protected:
virtual void OnUpdate();
248 protected:
virtual bool TurnOn(
const std::string &_lightName)
final;
254 protected:
virtual bool TurnOn(
255 const std::string &_lightName,
const std::string &_linkName)
final;
259 protected:
virtual bool TurnOnAll()
final;
266 protected:
virtual bool TurnOff(
const std::string &_lightName)
final;
272 protected:
virtual bool TurnOff(
273 const std::string &_lightName,
const std::string &_linkName)
final;
277 protected:
virtual bool TurnOffAll()
final;
286 protected:
virtual bool ChangeDuration(
287 const std::string &_lightName,
const std::string &_linkName,
288 const double _duration,
const int _index)
final;
295 protected:
virtual bool ChangeDuration(
296 const std::string &_lightName,
const std::string &_linkName,
297 const double _duration)
final;
306 protected:
virtual bool ChangeInterval(
307 const std::string &_lightName,
const std::string &_linkName,
308 const double _interval,
const int _index)
final;
315 protected:
virtual bool ChangeInterval(
316 const std::string &_lightName,
const std::string &_linkName,
317 const double _interval)
final;
326 protected:
virtual bool ChangeColor(
327 const std::string &_lightName,
const std::string &_linkName,
328 const ignition::math::Color &_color,
const int _index)
final;
335 protected:
virtual bool ChangeColor(
336 const std::string &_lightName,
const std::string &_linkName,
337 const ignition::math::Color &_color)
final;
350 protected:
virtual std::shared_ptr<FlashLightSetting> CreateSetting(
351 const sdf::ElementPtr &_sdf,
365 virtual void InitSettingBySpecificData(
366 std::shared_ptr<FlashLightSetting> &_setting);
369 private: std::unique_ptr<FlashLightPluginPrivate> dataPtr;
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
Forward declarations for the common classes.
Definition: Animation.hh:26
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Internal data class to hold individual flash light settings.
Definition: FlashLightPlugin.hh:38
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
A plugin that blinks a light component in the model.
Definition: FlashLightPlugin.hh:229
A plugin with access to physics::Model.
Definition: Plugin.hh:305
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:44