AURobotServers
4
|
#include <unavview.h>
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 |
|
inline |
References bold, cooSysSource, cooSysView, and maxHist.
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
currentPose | is robot pose |
viewer | is the viewer |
params | pointer 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,z | is the box-center in robot coordinates. |
id | is 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).
currentPose | is current robot pose, relative to wich the circle is to be generated |
viewer | is the viewer to receive the data |
cloud | is the cloud to modify |
x,y | is 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. |
radius | is the wheel radius |
id | is 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
currentPose | is pose of robot |
viewer | is PCLviewer to show this |
params | is cylinder paramas (may be uninitialized - size 7) |
x1,y1,z1 | is center position on robot |
x2,y2,z2 | is center position on robot of other end |
radius | is radius of cylinder |
id | is unique id for this |
color | is 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
viewer | - the viewer |
params | a permanent available set of parameters (set and resized by the function) |
x,y,h | the position and orientation of the wheel, i.e. h=pi/2 is a left wheel |
radius | is the wheel radius in meters |
width | is the width of the wheel (in meters) |
id | is 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().
|
inline |
Get copy of coordinate system number
References cooSysView.
Referenced by UNavView::paintPointClouds(), and UNavView::paintScansNewest().
|
inline |
Get coordinates in viewed coordinate system
[in] | local | is a pointer to the pose in local coordinates |
[in] | cooSysLocal | is number of coordinate system (0=odo 1=utm, 2=map) |
[in] | z | is the value to put in the Z position |
References cooSysView, cooSysViewOrigin, UPose::getPoseToMapPose(), UPose::x, and UPose::y.
Referenced by UPaintManoeuvre::makeManCloud().
|
inline |
is viewer this type
References name().
void UPaintBase::makeCircleCloud | ( | pcl::PointCloud< pcl::PointXYZ > * | cloud, |
UMatrix4 * | pose, | ||
double | radius | ||
) |
Make circular cloud
cloud | The cloud to modify, if empty, then resized to hold circle |
pose | the 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. |
radius | is radius of circle. |
References UPosition::x, UPosition::y, and UPosition::z.
Referenced by addCircleCloud(), and setViewCooSys().
|
inlinevirtual |
get name (e.g. of robot)
Reimplemented in URobotSmr, URobotGuidebot, URobotHako, URobotIrobot, URobotMmr, and UPaintPcp.
Referenced by isA().
|
inlinevirtual |
Paint robot at this post to this viewer.
Reimplemented in URobotSmr, URobotGuidebot, URobotHako, URobotIrobot, URobotMmr, and UPaintPoseHist.
|
inlinevirtual |
Set reference coordinate system
refSystem | convert 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().
|
inlinevirtual |
remove all items from this viewer.
Reimplemented in URobotSmr, URobotGuidebot, URobotHako, URobotIrobot, URobotMmr, UPaintPolygon, UPaintManoeuvre, and UPaintPcp.
|
inlinevirtual |
remove items from this viewer, to limit history to maximum this number.
References maxHist.
bool UPaintBase::bold |
|
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().
|
protected |
coordinate system used in viewer [0=odo, 1=UTM, 2=map]
Referenced by addBox(), addCircleCloud(), addCylinder(), UPaintPolygon::addPolyToViewer(), addWheel(), getCooSysView(), getInViewedCoordinates(), UPaintPolygon::makePolyCloud(), UPaintPoseHist::paint(), setViewCooSys(), UPaintBase(), and UPaintPoseHist::UPaintPoseHist().
|
protected |
Origin of current system in view coordinate system
Referenced by addBox(), addCircleCloud(), addCylinder(), UPaintPolygon::addPolyToViewer(), addWheel(), getInViewedCoordinates(), UPaintPolygon::makePolyCloud(), UPaintPoseHist::paint(), and setViewCooSys().
int UPaintBase::maxHist |
Maximum history shown for this item, 0=do not show
Referenced by UPaintPoseHist::paint(), unPaint(), UPaintBase(), and UPaintPoseHist::UPaintPoseHist().