##

LogicalCameraSensor.hh
Go to the documentation of this file.
/*
* Copyright (C) 2015 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_LOGICAL_CAMERASENSOR_HH_
#define _GAZEBO_LOGICAL_CAMERASENSOR_HH_
#include <memory>
#include <string>
#include <sdf/sdf.hh>
#include "gazebo/sensors/Sensor.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace sensors
{
// Forward declare private data class
class LogicalCameraSensorPrivate;
class GZ_SENSORS_VISIBLE LogicalCameraSensor : public Sensor
{
public: LogicalCameraSensor();
public: virtual ~LogicalCameraSensor();
// Documentation inherited
public: virtual void Load(const std::string &_worldName,
sdf::ElementPtr _sdf);
// Documentation inherited
public: virtual void Load(const std::string &_worldName);
// Documentation inherited
public: virtual void Init();
// Documentation inherited.
public: virtual std::string Topic() const;
public: double Near() const;
public: double Far() const;
public: ignition::math::Angle HorizontalFOV() const;
public: double AspectRatio() const;
public: msgs::LogicalCameraImage Image() const;
// Documentation inherited
public: virtual bool IsActive() const;
// Documentation inherited
protected: virtual bool UpdateImpl(const bool _force);
// \brief Finalize the logical camera
protected: virtual void Fini();
// \internal
// \brief Private data pointer
private: std::unique_ptr<LogicalCameraSensorPrivate> dataPtr;
};
}
}
#endif
gazebo::sensors::LogicalCameraSensor::Load
virtual void Load(const std::string &_worldName, sdf::ElementPtr _sdf)
Load the sensor with SDF parameters.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::sensors::LogicalCameraSensor::HorizontalFOV
ignition::math::Angle HorizontalFOV() const
Get the horizontal field of view.
sensors
sensors
Definition: SensorManager.hh:35
system.hh
gazebo::sensors::LogicalCameraSensor::LogicalCameraSensor
LogicalCameraSensor()
Constructor.
gazebo::sensors::LogicalCameraSensor::Far
double Far() const
Get the far distance.
gazebo::sensors::LogicalCameraSensor::Topic
virtual std::string Topic() const
Returns the topic name as set in SDF.
gazebo::sensors::LogicalCameraSensor::AspectRatio
double AspectRatio() const
Get the aspect ratio, which is the width divided by height of the near or far planes.
Sensor.hh
gazebo::sensors::LogicalCameraSensor::IsActive
virtual bool IsActive() const
Returns true if sensor generation is active.
gazebo::sensors::LogicalCameraSensor::~LogicalCameraSensor
virtual ~LogicalCameraSensor()
Destructor.
gazebo::sensors::LogicalCameraSensor::Init
virtual void Init()
Initialize the sensor.
gazebo::sensors::LogicalCameraSensor::Near
double Near() const
Get the near distance.
gazebo::sensors::LogicalCameraSensor::Fini
virtual void Fini()
Finalize the sensor.
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::sensors::Sensor
Base class for sensors.
Definition: Sensor.hh:51
gazebo::sensors::LogicalCameraSensor::UpdateImpl
virtual bool UpdateImpl(const bool _force)
This gets overwritten by derived sensor types.
gazebo::sensors::LogicalCameraSensor
A camera sensor that reports locations of objects instead of rendering a scene. This camera finds mod...
Definition: LogicalCameraSensor.hh:42
gazebo::sensors::LogicalCameraSensor::Image
msgs::LogicalCameraImage Image() const
Get the latest image.