##

LedPlugin.hh
Go to the documentation of this file.
/*
* Copyright (C) 2018 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_PLUGINS_LEDPLUGIN_HH_
#define GAZEBO_PLUGINS_LEDPLUGIN_HH_
#include <memory>
#include "gazebo/common/Plugin.hh"
#include "gazebo/physics/physics.hh"
#include "FlashLightPlugin.hh"
namespace gazebo
{
// forward declaration
class LedSettingPrivate;
class GAZEBO_VISIBLE LedSetting: public FlashLightSetting
{
public: LedSetting(
const sdf::ElementPtr &_sdf,
const physics::ModelPtr &_model,
const common::Time &_currentTime);
public: virtual ~LedSetting();
public: virtual void InitPubVisual(
const transport::PublisherPtr &_pubVisual) final;
// Documentation inherited.
protected: virtual void Flash();
// Documentation inherited.
protected: virtual void Dim();
private: std::unique_ptr<LedSettingPrivate> dataPtr;
};
// forward declaration
class LedPluginPrivate;
class GAZEBO_VISIBLE LedPlugin : public FlashLightPlugin
{
public: LedPlugin();
public: virtual ~LedPlugin();
// Documentation inherited.
protected: virtual std::shared_ptr<FlashLightSetting> CreateSetting(
const sdf::ElementPtr &_sdf,
const physics::ModelPtr &_model,
const common::Time &_currentTime);
// Documentation inherited.
protected: virtual void InitSettingBySpecificData(
std::shared_ptr<FlashLightSetting> &_setting);
private: std::unique_ptr<LedPluginPrivate> dataPtr;
};
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::LedSetting
Internal data class to hold individual LED light settings.
Definition: LedPlugin.hh:34
gazebo::common::Time
A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec.
Definition: Time.hh:47
gazebo::physics::ModelPtr
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
gazebo::transport::PublisherPtr
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
gazebo::FlashLightPlugin
A plugin that blinks a light component in the model.
Definition: FlashLightPlugin.hh:229
gazebo::FlashLightSetting
Internal data class to hold individual flash light settings.
Definition: FlashLightPlugin.hh:38
gazebo::LedPlugin
A plugin that blinks light and visual elements in a model.
Definition: LedPlugin.hh:101
FlashLightPlugin.hh
Plugin.hh
GAZEBO_VISIBLE
#define GAZEBO_VISIBLE
Definition: system.hh:59