RobWorkProject
24.8.23-
|
Simulates a Kinnect grabbing RGBD images. More...
#include <SimulatedKinect.hpp>
Inherits SimulatedSensor.
Public Types | |
typedef rw::core::Ptr< SimulatedKinect > | Ptr |
Public Types inherited from SimulatedSensor | |
typedef rw::core::Ptr< SimulatedSensor > | Ptr |
smart pointer type of this class | |
Public Types inherited from Stateless | |
typedef rw::core::Ptr< Stateless > | Ptr |
Smart pointer type for Stateless. | |
Public Member Functions | |
SimulatedKinect (const std::string &name, rw::core::Ptr< rw::kinematics::Frame > frame) | |
constructor More... | |
SimulatedKinect (const std::string &name, const std::string &desc, rw::core::Ptr< rw::kinematics::Frame > frame) | |
constructor More... | |
SimulatedKinect (rw::core::Ptr< rw::sensor::CameraModel > camModel, rw::core::Ptr< rw::sensor::Scanner25DModel > scannerModel) | |
constructor More... | |
virtual | ~SimulatedKinect () |
destructor | |
bool | init (rw::core::Ptr< rw::graphics::SceneViewer > drawer) |
Initialize sensor. More... | |
void | setFrameRate (double rate) |
set the framerate in frames per sec. More... | |
void | open () |
Opens connection to the scanner. More... | |
bool | isOpen () |
Returns whether the scanner has been opened. More... | |
void | close () |
Closes the connection to the scanner. More... | |
void | acquire () |
Acquires data. More... | |
bool | isDataReady () |
tests whether an image has been acquired More... | |
std::pair< double, double > | getRange () const |
Returns the min and max range of this Scanner. More... | |
double | getFrameRate () const |
returns the framerate that this camera is setup with More... | |
const rw::geometry::PointCloud & | getScan () |
Simulates a Kinnect grabbing RGBD images. More... | |
const rw::sensor::Image & | getImage () |
Get scanned image. More... | |
void | update (const rwlibs::simulation::Simulator::UpdateInfo &info, rw::kinematics::State &state) |
steps the the SimulatedSensor with time dt and saves any state changes in state. More... | |
void | reset (const rw::kinematics::State &state) |
Resets the state of the SimulatedSensor to that of state. More... | |
rw::core::Ptr< rw::sensor::Sensor > | getSensorHandle (rw::core::Ptr< rwlibs::simulation::Simulator > simulator) |
get a handle to controlling an instance of the simulated sensor in a specific simulator More... | |
void | setNoiseEnabled (bool enabled) |
set to true to enable realistic noise on the scan. More... | |
double | getVerticalFieldOfView () const |
returns the vertical field of view More... | |
int | getWidth () const |
returns the width of the image More... | |
int | getHeight () const |
returns the height of the image More... | |
rw::core::Ptr< rw::sensor::CameraModel > | getCameraModel () |
get the model of the camera of this kinect | |
rw::core::Ptr< rw::sensor::Scanner25DModel > | getScannerModel () |
get the model of the range scannger of this kinect | |
Public Member Functions inherited from SimulatedSensor | |
virtual | ~SimulatedSensor () |
destructor | |
const std::string & | getName () const |
get name of this simulated sensor | |
rw::kinematics::Frame * | getFrame () const |
get frame that this sensor is attached to. More... | |
rw::sensor::SensorModel::Ptr | getSensorModel () |
get the sensor model of this simulated sensor. | |
rw::sensor::Sensor::Ptr | getSensorHandle (rwlibs::simulation::Simulator::Ptr sim) |
get a handle to controlling an instance of the simulated sensor in a specific simulator More... | |
Public Member Functions inherited from Stateless | |
virtual | ~Stateless () |
destructor | |
virtual void | registerIn (State &state) |
initialize this stateless data to a specific state More... | |
virtual void | registerIn (StateStructure::Ptr state) |
register this stateless object in a statestructure. | |
virtual void | unregister () |
unregisters all state data of this stateless object | |
StateStructure::Ptr | getStateStructure () |
Get the state structure. More... | |
const StateStructure::Ptr | getStateStructure () const |
Get the state structure. More... | |
bool | isRegistered () |
Check if object has registered its state. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from SimulatedSensor | |
SimulatedSensor (rw::sensor::SensorModel::Ptr model) | |
constructor | |
Protected Member Functions inherited from Stateless | |
Stateless () | |
constructor | |
template<class T > | |
void | add (StatelessData< T > &data) |
implementations of sensor should add all their stateless data on initialization | |
void | add (StateData *data) |
Add data. More... | |
void | add (rw::core::Ptr< StateData > data) |
implementations of sensor should add all their state data on initialization | |
Protected Attributes inherited from Stateless | |
bool | _registered |
True if object has registered its state. | |
std::vector< rw::core::Ptr< StateData > > | _datas |
Data. | |
StateStructure::Ptr | _stateStruct |
The state structure. | |
Simulates a Kinnect grabbing RGBD images.
SimulatedKinect | ( | const std::string & | name, |
rw::core::Ptr< rw::kinematics::Frame > | frame | ||
) |
constructor
name | [in] name of this simulated scanner |
frame | [in] the frame the scanner is attached to. |
SimulatedKinect | ( | const std::string & | name, |
const std::string & | desc, | ||
rw::core::Ptr< rw::kinematics::Frame > | frame | ||
) |
constructor
name | [in] name of this simulated scanner |
desc | [in] description of this scanner |
frame | [in] the frame the scanner is attached to. |
SimulatedKinect | ( | rw::core::Ptr< rw::sensor::CameraModel > | camModel, |
rw::core::Ptr< rw::sensor::Scanner25DModel > | scannerModel | ||
) |
constructor
camModel | [in] the camera model to use |
scannerModel | [in] the scanner model to use |
void acquire | ( | ) |
Acquires data.
void close | ( | ) |
Closes the connection to the scanner.
double getFrameRate | ( | ) | const |
returns the framerate that this camera is setup with
|
inline |
returns the height of the image
const rw::sensor::Image& getImage | ( | ) |
Get scanned image.
std::pair<double, double> getRange | ( | ) | const |
Returns the min and max range of this Scanner.
const rw::geometry::PointCloud& getScan | ( | ) |
Simulates a Kinnect grabbing RGBD images.
rw::core::Ptr<rw::sensor::Sensor> getSensorHandle | ( | rw::core::Ptr< rwlibs::simulation::Simulator > | simulator | ) |
get a handle to controlling an instance of the simulated sensor in a specific simulator
simulator | [in] the simulator in which the handle is active |
|
inline |
returns the vertical field of view
|
inline |
returns the width of the image
bool init | ( | rw::core::Ptr< rw::graphics::SceneViewer > | drawer | ) |
Initialize sensor.
drawer | [in] the scene viewer. |
bool isDataReady | ( | ) |
tests whether an image has been acquired
bool isOpen | ( | ) |
Returns whether the scanner has been opened.
void open | ( | ) |
Opens connection to the scanner.
|
virtual |
Resets the state of the SimulatedSensor to that of state.
state | [in] the state that the sensor is reset too. |
Implements SimulatedSensor.
void setFrameRate | ( | double | rate | ) |
set the framerate in frames per sec.
rate | [in] frames per sec |
|
inline |
set to true to enable realistic noise on the scan.
enabled | [in] |
|
virtual |
steps the the SimulatedSensor with time dt and saves any state changes in state.
info | [in] update information related to the time step. |
state | [out] changes of the SimulatedSensor is saved in state. |
Implements SimulatedSensor.