AURobotServers  4
Public Member Functions | Public Attributes | Protected Attributes | List of all members
UPaintBase Class Reference

#include <unavview.h>

Inheritance diagram for UPaintBase:
Inheritance graph

Public Member Functions

void addBox (UPose *currentPose, pcl::visualization::PCLVisualizer *viewer, pcl::ModelCoefficients *params, double x, double y, double z, const char *id, const double color[3])
 
void addCircleCloud (UPose *currentPose, pcl::visualization::PCLVisualizer *viewer, pcl::PointCloud< pcl::PointXYZ >::Ptr *cloud, double x, double y, double h, double radius, const char *ID)
 
void addCylinder (UPose *currentPose, pcl::visualization::PCLVisualizer *viewer, pcl::ModelCoefficients *params, double x1, double y1, double z1, double x2, double y2, double z2, double radius, const char *id, const double color[3])
 
void addWheel (UPose *currentPose, pcl::visualization::PCLVisualizer *viewer, pcl::ModelCoefficients *params, double x, double y, double h, double radius, double width, const char *id)
 
const int getCooSysView ()
 
pcl::PointXYZ getInViewedCoordinates (UPose *local, int cooSysLocal, double z)
 
bool isA (const char *testName)
 
void makeCircleCloud (pcl::PointCloud< pcl::PointXYZ > *cloud, UMatrix4 *pose, double radius)
 
virtual const char * name ()
 
virtual void paint (UPose *currentPose, pcl::visualization::PCLVisualizer *viewer)
 
virtual void setViewCooSys (int refSystem, UPose origin)
 
virtual void unPaint (pcl::visualization::PCLVisualizer *viewer)
 
virtual void unPaint (pcl::visualization::PCLVisualizer *viewer, int viewMaxHist)
 
 UPaintBase ()
 

Public Attributes

bool bold
 
int maxHist
 

Protected Attributes

int cooSysSource
 
int cooSysView
 
UPose cooSysViewOrigin
 

Constructor & Destructor Documentation

UPaintBase::UPaintBase ( )
inline

References bold, cooSysSource, cooSysView, and maxHist.

Member Function Documentation

void UPaintBase::addBox ( UPose currentPose,
pcl::visualization::PCLVisualizer *  viewer,
pcl::ModelCoefficients *  params,
double  x,
double  y,
double  z,
const char *  id,
const double  color[3] 
)

add a solid box to the view

Parameters
currentPoseis robot pose
vieweris the viewer
paramspointer to static set of box parameters. NB! params.values[7..9] must be set with box length (x), width (y) and height (z).
x,y,zis the box-center in robot coordinates.
idis the viewer ID (unique)
color[3]is the RGB color of the box

References cooSysSource, cooSysView, cooSysViewOrigin, UPose::getPoseToMap(), UPose::h, UPosition::x, UPosition::y, and UPosition::z.

Referenced by URobotMmr::paint(), URobotIrobot::paint(), URobotHako::paint(), URobotGuidebot::paint(), URobotSmr::paint(), and setViewCooSys().

void UPaintBase::addCircleCloud ( UPose currentPose,
pcl::visualization::PCLVisualizer *  viewer,
pcl::PointCloud< pcl::PointXYZ >::Ptr *  cloud,
double  x,
double  y,
double  h,
double  radius,
const char *  ID 
)

View a vertical circle (a wheel) touching the ground (z=0).

Parameters
currentPoseis current robot pose, relative to wich the circle is to be generated
vieweris the viewer to receive the data
cloudis the cloud to modify
x,yis the (ground) position of the wheel on the robot (x=forward, y=left)
h= rotation of the wheel axis: pi/2 for a left wheel.
radiusis the wheel radius
idis then viewer ID of the cloud.

References UPaintPcp::cloud, cooSysSource, cooSysView, cooSysViewOrigin, UPose::getPoseToMapPose(), UPosRot::getRtoMMatrix(), UPose::h, makeCircleCloud(), UPosRot::setFromPose(), UPose::x, UPose::y, and UPosition::z.

Referenced by setViewCooSys().

void UPaintBase::addCylinder ( UPose currentPose,
pcl::visualization::PCLVisualizer *  viewer,
pcl::ModelCoefficients *  params,
double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double  radius,
const char *  id,
const double  color[3] 
)

Vertical cylinder

Parameters
currentPoseis pose of robot
vieweris PCLviewer to show this
paramsis cylinder paramas (may be uninitialized - size 7)
x1,y1,z1is center position on robot
x2,y2,z2is center position on robot of other end
radiusis radius of cylinder
idis unique id for this
coloris surface color

References cooSysSource, cooSysView, cooSysViewOrigin, UPose::getPoseToMapPose(), UPose::x, and UPose::y.

Referenced by URobotGuidebot::paint(), and setViewCooSys().

void UPaintBase::addWheel ( UPose currentPose,
pcl::visualization::PCLVisualizer *  viewer,
pcl::ModelCoefficients *  params,
double  x,
double  y,
double  h,
double  radius,
double  width,
const char *  id 
)

Add wheel, i.e a cylinder laying down, just touching the ground

Parameters
viewer- the viewer
paramsa permanent available set of parameters (set and resized by the function)
x,y,hthe position and orientation of the wheel, i.e. h=pi/2 is a left wheel
radiusis the wheel radius in meters
widthis the width of the wheel (in meters)
idis the unique id in the viewer of the wheel.

References cooSysSource, cooSysView, cooSysViewOrigin, UPose::getPoseToMapPose(), UPose::x, and UPose::y.

Referenced by URobotMmr::paint(), URobotIrobot::paint(), URobotHako::paint(), URobotGuidebot::paint(), URobotSmr::paint(), and setViewCooSys().

const int UPaintBase::getCooSysView ( )
inline

Get copy of coordinate system number

References cooSysView.

Referenced by UNavView::paintPointClouds(), and UNavView::paintScansNewest().

pcl::PointXYZ UPaintBase::getInViewedCoordinates ( UPose local,
int  cooSysLocal,
double  z 
)
inline

Get coordinates in viewed coordinate system

Parameters
[in]localis a pointer to the pose in local coordinates
[in]cooSysLocalis number of coordinate system (0=odo 1=utm, 2=map)
[in]zis the value to put in the Z position
Returns
a pcl::PointXYZ value in viewed coordinates

References cooSysView, cooSysViewOrigin, UPose::getPoseToMapPose(), UPose::x, and UPose::y.

Referenced by UPaintManoeuvre::makeManCloud().

bool UPaintBase::isA ( const char *  testName)
inline

is viewer this type

References name().

void UPaintBase::makeCircleCloud ( pcl::PointCloud< pcl::PointXYZ > *  cloud,
UMatrix4 pose,
double  radius 
)

Make circular cloud

Parameters
cloudThe cloud to modify, if empty, then resized to hold circle
posethe pose 6D of the center of the circle, if pose is a unit matrix, then circle rotation axis is around x-axis (on y-z plane) and center is in 0,0,0.
radiusis radius of circle.

References UPosition::x, UPosition::y, and UPosition::z.

Referenced by addCircleCloud(), and setViewCooSys().

virtual const char* UPaintBase::name ( )
inlinevirtual

get name (e.g. of robot)

Reimplemented in URobotSmr, URobotGuidebot, URobotHako, URobotIrobot, URobotMmr, and UPaintPcp.

Referenced by isA().

virtual void UPaintBase::paint ( UPose currentPose,
pcl::visualization::PCLVisualizer *  viewer 
)
inlinevirtual

Paint robot at this post to this viewer.

Reimplemented in URobotSmr, URobotGuidebot, URobotHako, URobotIrobot, URobotMmr, and UPaintPoseHist.

virtual void UPaintBase::setViewCooSys ( int  refSystem,
UPose  origin 
)
inlinevirtual

Set reference coordinate system

Parameters
refSystemconvert positions into this system [0 = odo, 1=utm, 2 = map]

References addBox(), addCircleCloud(), addCylinder(), addWheel(), cooSysView, cooSysViewOrigin, makeCircleCloud(), and viewer.

Referenced by UPaintManoeuvres::paintManData(), UNavView::paintScansNewest(), and UPaintPolygons::setPolygon().

virtual void UPaintBase::unPaint ( pcl::visualization::PCLVisualizer *  viewer)
inlinevirtual

remove all items from this viewer.

Reimplemented in URobotSmr, URobotGuidebot, URobotHako, URobotIrobot, URobotMmr, UPaintPolygon, UPaintManoeuvre, and UPaintPcp.

virtual void UPaintBase::unPaint ( pcl::visualization::PCLVisualizer *  viewer,
int  viewMaxHist 
)
inlinevirtual

remove items from this viewer, to limit history to maximum this number.

References maxHist.

Member Data Documentation

bool UPaintBase::bold
int UPaintBase::cooSysSource
protected

known coordinates (source) is in this sytem (-1 is relative to robot)

Referenced by addBox(), addCircleCloud(), addCylinder(), addWheel(), UPaintPoseHist::paint(), UPaintBase(), and UPaintPoseHist::UPaintPoseHist().

int UPaintBase::cooSysView
protected
UPose UPaintBase::cooSysViewOrigin
protected
int UPaintBase::maxHist

Maximum history shown for this item, 0=do not show

Referenced by UPaintPoseHist::paint(), unPaint(), UPaintBase(), and UPaintPoseHist::UPaintPoseHist().


The documentation for this class was generated from the following files: