![]() |
RobWorkProject
23.9.11-
|
Simulated scanner in 2D. More...
#include <SimulatedScanner2D.hpp>
Inherits SimulatedSensor.
Public Types | |
| typedef rw::core::Ptr< SimulatedScanner2D > | Ptr |
| smart pointer of this class | |
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 | |
| SimulatedScanner2D (const std::string &name, rw::core::Ptr< rw::kinematics::Frame > frame, rw::core::Ptr< rwlibs::simulation::FrameGrabber25D > framegrabber) | |
| constructor More... | |
| SimulatedScanner2D (const std::string &name, const std::string &desc, rw::core::Ptr< rw::kinematics::Frame > frame, rw::core::Ptr< rwlibs::simulation::FrameGrabber25D > framegrabber) | |
| constructor More... | |
| virtual | ~SimulatedScanner2D () |
| destructor | |
| 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 | isScanReady () |
| tests whether an image has been acquired More... | |
| std::pair< double, double > | getRange () |
| Returns the min and max range of this Scanner. More... | |
| double | getFrameRate () |
| returns the framerate that this camera is setup with More... | |
| const rw::geometry::PointCloud & | getScan () const |
| Simulates a Kinnect grabbing RGBD images. 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::Scanner2D > | getScanner2DSensor (rwlibs::simulation::Simulator *instance) |
| returns a handle to what represents a statefull interface. The handle will be locked to the simulator More... | |
| rw::core::Ptr< rw::sensor::Scanner2DModel > | getSensorModel () |
| Get a model of the sensor. More... | |
| virtual double | getAngularRange () |
| Returns the min and max angular range of the scanner, where the angles represent the beginning and end of scanning in the z-x plane. Hence, angles represent rotation of z-axis around the y-axis. Normally range would be something like -170 to 170 degree for a Hokyo or Sick scanner. More... | |
| virtual size_t | getMeasurementCount () const |
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. | |
Simulated scanner in 2D.
| SimulatedScanner2D | ( | const std::string & | name, |
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| rw::core::Ptr< rwlibs::simulation::FrameGrabber25D > | framegrabber | ||
| ) |
constructor
| name | [in] name of this simulated scanner |
| frame | [in] the sensor frame. |
| framegrabber | [in] the framegrabber used for grabbing 2.5D images |
| SimulatedScanner2D | ( | const std::string & | name, |
| const std::string & | desc, | ||
| rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
| rw::core::Ptr< rwlibs::simulation::FrameGrabber25D > | framegrabber | ||
| ) |
constructor
| name | [in] name of this simulated scanner |
| desc | [in] description of this scanner |
| frame | [in] the sensor frame. |
| framegrabber | [in] the framegrabber used for grabbing 2.5D images |
| void acquire | ( | ) |
Acquires data.
| void close | ( | ) |
Closes the connection to the scanner.
|
virtual |
Returns the min and max angular range of the scanner, where the angles represent the beginning and end of scanning in the z-x plane. Hence, angles represent rotation of z-axis around the y-axis. Normally range would be something like -170 to 170 degree for a Hokyo or Sick scanner.
| double getFrameRate | ( | ) |
returns the framerate that this camera is setup with
| std::pair<double, double> getRange | ( | ) |
Returns the min and max range of this Scanner.
| const rw::geometry::PointCloud& getScan | ( | ) | const |
Simulates a Kinnect grabbing RGBD images.
| rw::core::Ptr<rw::sensor::Scanner2D> getScanner2DSensor | ( | rwlibs::simulation::Simulator * | instance | ) |
returns a handle to what represents a statefull interface. The handle will be locked to the simulator
| rw::core::Ptr<rw::sensor::Scanner2DModel> getSensorModel | ( | ) |
Get a model of the sensor.
| bool isOpen | ( | ) |
Returns whether the scanner has been opened.
| bool isScanReady | ( | ) |
tests whether an image has been acquired
| 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 |
|
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.