Provides an interface for camera usage. More...
#include <Sensor.h>
Public Member Functions | |
virtual Reading * | ApplySelfFilter (Reading *read) |
virtual bool | CanSee (RelPose &pose) const |
virtual bool | DeleteReading () |
removes entries of the reading buffer, this function will not release still references functions ( | |
virtual std::string | GetName () const |
virtual Reading * | GetReading (const long &frame=-1)=0 |
RelPose * | GetRelPose () |
std::string | GetSensorID () const |
virtual void | GetShowLock () |
virtual std::pair< std::string, std::vector< double > > | GetUnformatedCalibrationValues () const |
virtual bool | IsCamera () const |
virtual void | ProjectPoint3DToSensor (const double &x, const double &y, const double &z, double &row, double &column) const |
void | Publish3DData (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z) |
virtual void | PushBackAsync () |
virtual void | ReleaseShowLock () |
virtual bool | RequiresSensorList () |
Stereo works as a composition of names sensors. | |
virtual XMLTag * | Save ()=0 |
virtual void | SaveTo (XMLTag *tag) |
Sensor () | |
Sensor (RelPose *pose) | |
virtual void | SetSensorList (std::vector< Sensor * >) |
Stereo works as a composition of names sensors. | |
virtual void | Show (const long frame=-1) |
should display the sensors currenbt reading, if wanted | |
virtual bool | Start ()=0 |
overwrite to start up the data reading, is called at least once after creation | |
virtual bool | Stop () |
overwrite to stop call this in the destructor if necessary, will be used to shut down cameras | |
virtual void | WaitForNewData () |
Wait the condition variable m_mutexImageList. | |
virtual | ~Sensor () |
Static Public Member Functions | |
static Sensor * | SensorFactory (XMLTag *tag) |
Load sensor parameter from xml Only derivatives of Camera can use this constructor to initialize values. | |
Protected Types | |
typedef boost::mutex::scoped_lock | lock |
Protected Member Functions | |
Reading * | GetReading_Lock (size_t index) |
virtual void | PushBack (Reading *img) |
virtual void | SetData (XMLTag *tag) |
Protected Attributes | |
long | m_deletedOffset |
long | m_FrameCount |
std::vector< Reading * > | m_images |
unsigned long | m_max_cameraImages |
boost::mutex | m_mutexImageList |
boost::mutex | m_mutexShow |
boost::condition | m_newDataArrived |
RelPose * | m_relPose |
std::string | m_stSensorName |
std::vector< Reading * > | m_temp_images |
typedef boost::mutex::scoped_lock cop::Sensor::lock [protected] |
cop::Sensor::Sensor | ( | ) | [inline] |
cop::Sensor::Sensor | ( | RelPose * | pose | ) | [inline] |
Sensor::~Sensor | ( | ) | [virtual] |
The destructor is virtual
Definition at line 42 of file Sensor.cpp.
virtual Reading* cop::Sensor::ApplySelfFilter | ( | Reading * | read | ) | [inline, virtual] |
virtual bool cop::Sensor::CanSee | ( | RelPose & | pose | ) | const [inline, virtual] |
bool Sensor::DeleteReading | ( | ) | [virtual] |
removes entries of the reading buffer, this function will not release still references functions (
DeleteReading
Definition at line 93 of file Sensor.cpp.
virtual std::string cop::Sensor::GetName | ( | ) | const [inline, virtual] |
virtual Reading* cop::Sensor::GetReading | ( | const long & | frame = -1 | ) | [pure virtual] |
GetReading
frame | frame number, to specify an offset or a specific file |
char* | with an error message in case of failure |
Reading * Sensor::GetReading_Lock | ( | size_t | index | ) | [protected] |
Definition at line 160 of file Sensor.cpp.
RelPose* cop::Sensor::GetRelPose | ( | ) | [inline] |
std::string cop::Sensor::GetSensorID | ( | ) | const [inline] |
virtual void cop::Sensor::GetShowLock | ( | ) | [inline, virtual] |
virtual std::pair<std::string, std::vector<double> > cop::Sensor::GetUnformatedCalibrationValues | ( | ) | const [inline, virtual] |
virtual bool cop::Sensor::IsCamera | ( | ) | const [inline, virtual] |
void Sensor::ProjectPoint3DToSensor | ( | const double & | x, |
const double & | y, | ||
const double & | z, | ||
double & | row, | ||
double & | column | ||
) | const [virtual] |
Helper function for projecting 3D data to the images
Definition at line 189 of file Sensor.cpp.
void Sensor::Publish3DData | ( | const std::vector< double > & | x, |
const std::vector< double > & | y, | ||
const std::vector< double > & | z | ||
) |
Helper function for sending 3D display data to rviz
Definition at line 201 of file Sensor.cpp.
void Sensor::PushBack | ( | Reading * | img | ) | [protected, virtual] |
Definition at line 227 of file Sensor.cpp.
virtual void cop::Sensor::PushBackAsync | ( | ) | [inline, virtual] |
virtual void cop::Sensor::ReleaseShowLock | ( | ) | [inline, virtual] |
virtual bool cop::Sensor::RequiresSensorList | ( | ) | [inline, virtual] |
virtual XMLTag* cop::Sensor::Save | ( | ) | [pure virtual] |
void Sensor::SaveTo | ( | XMLTag * | tag | ) | [virtual] |
Definition at line 154 of file Sensor.cpp.
Sensor * Sensor::SensorFactory | ( | XMLTag * | tag | ) | [static] |
Load sensor parameter from xml Only derivatives of Camera can use this constructor to initialize values.
Definition at line 53 of file Sensor.cpp.
void Sensor::SetData | ( | XMLTag * | tag | ) | [protected, virtual] |
Definition at line 131 of file Sensor.cpp.
virtual void cop::Sensor::SetSensorList | ( | std::vector< Sensor * > | ) | [inline, virtual] |
virtual void cop::Sensor::Show | ( | const long | frame = -1 | ) | [inline, virtual] |
virtual bool cop::Sensor::Start | ( | ) | [pure virtual] |
overwrite to start up the data reading, is called at least once after creation
Start
virtual bool cop::Sensor::Stop | ( | ) | [inline, virtual] |
void Sensor::WaitForNewData | ( | ) | [virtual] |
Wait the condition variable m_mutexImageList.
Definition at line 84 of file Sensor.cpp.
long cop::Sensor::m_deletedOffset [protected] |
long cop::Sensor::m_FrameCount [protected] |
std::vector<Reading*> cop::Sensor::m_images [protected] |
unsigned long cop::Sensor::m_max_cameraImages [protected] |
boost::mutex cop::Sensor::m_mutexImageList [protected] |
boost::mutex cop::Sensor::m_mutexShow [protected] |
boost::condition cop::Sensor::m_newDataArrived [protected] |
RelPose* cop::Sensor::m_relPose [protected] |
std::string cop::Sensor::m_stSensorName [protected] |
std::vector<Reading*> cop::Sensor::m_temp_images [protected] |