Visual Servoing Platform  version 3.6.1 under development (2024-11-15)
ClassUsingPclViewer Class Reference

#include </home/soft/visp/visp-web-script/visp/tutorial/gui/pcl-visualizer/ClassUsingPclViewer.h>

Public Member Functions

 ClassUsingPclViewer (std::pair< double, double > xlimits={ -2.5, 2.5 }, std::pair< double, double > ylimits={ -2.5, 2.5 }, std::pair< unsigned int, unsigned int > nbPoints={ 50, 50 })
 
 ~ClassUsingPclViewer ()
 
void blockingMode (const double &addedNoise, const unsigned int &order)
 
void threadedMode (const double &addedNoise, const unsigned int &order)
 

Detailed Description

Examples
ClassUsingPclViewer.h, and tutorial-pcl-viewer.cpp.

Definition at line 12 of file ClassUsingPclViewer.h.

Constructor & Destructor Documentation

◆ ClassUsingPclViewer()

ClassUsingPclViewer::ClassUsingPclViewer ( std::pair< double, double >  xlimits = { -2.5,2.5 },
std::pair< double, double >  ylimits = { -2.5,2.5 },
std::pair< unsigned int, unsigned int >  nbPoints = { 50,50 } 
)

Construct a new object.

[Z coordinates computation]

Parameters
xlimitsA pair defining the <min, max> values of X-coordinates of the generated surface.
ylimitsA pair defining the <min, max> values of Y-coordinates of the generated surface.
nbPointsThe number of points along the <X-axis, Y-axis> that will be generated.

[Constructor]

Examples
ClassUsingPclViewer.cpp, and ClassUsingPclViewer.h.

Definition at line 41 of file ClassUsingPclViewer.cpp.

◆ ~ClassUsingPclViewer()

ClassUsingPclViewer::~ClassUsingPclViewer ( )

[Constructor]

Examples
ClassUsingPclViewer.cpp, and ClassUsingPclViewer.h.

Definition at line 58 of file ClassUsingPclViewer.cpp.

Member Function Documentation

◆ blockingMode()

void ClassUsingPclViewer::blockingMode ( const double &  addedNoise,
const unsigned int &  order 
)

Demonstration on how to use a vpPclViewer in blocking mode, i.e. we expect an input from the user after call to vpPclViewer::display to go forward in the code.

[Surface generator]

Parameters
addedNoiseStandard deviation of the noise added to the moved surface.
orderThe order of the polynomial surface that is generated.

[Generating point clouds]

[Generating point clouds]

[Adding point clouds color not chosen]

[Adding point clouds color not chosen]

[Adding point clouds color chosen]

[Adding point clouds color chosen]

[Displaying point clouds blocking mode]

[Displaying point clouds blocking mode]

Examples
ClassUsingPclViewer.cpp, and ClassUsingPclViewer.h.

Definition at line 131 of file ClassUsingPclViewer.cpp.

References vpPclViewer::addSurface(), vpPclViewer::display(), vpColorBlindFriendlyPalette::Purple, and vpColorBlindFriendlyPalette::to_RGB().

◆ threadedMode()

void ClassUsingPclViewer::threadedMode ( const double &  addedNoise,
const unsigned int &  order 
)

Demonstration on how to use a vpPclViewer in threaded mode.

Parameters
addedNoiseStandard deviation of the noise added to the moved surface.
orderThe order of the polynomial surface that is generated.

[Starting display thread]

[Starting display thread]

[Updating point clouds used by display thread]

[Updating point clouds used by display thread]

Examples
ClassUsingPclViewer.cpp, and ClassUsingPclViewer.h.

Definition at line 160 of file ClassUsingPclViewer.cpp.

References vpPclViewer::addSurface(), vpKeyboard::kbhit(), vpPclViewer::launchThread(), vpTime::measureTimeMs(), vpColorBlindFriendlyPalette::Purple, vpColorBlindFriendlyPalette::to_RGB(), vpPclViewer::updateSurface(), and vpTime::wait().