PDF
AuboStudio SDK  0.6.3
arcs::aubo_scope::RenderInterface Class Reference

RenderInterface Provides display option controls related to 3D rendering, including show/hide of ground, robot models, coordinate systems, trajectories and points. More...

#include <render_interface.h>

Public Types

enum  ShowOptions : uint16_t {
  None = 0 , Ground = 0x01 , TargetRobot = 0x02 , RealRobot = 0x04 ,
  Coordinate = 0x08 , Track = 0x10 , Point = 0x20 , View = 0x40 ,
  Obstacle = 0x80 , SafetyPlane = 0x0100 , ToolPosition = 0x0200 , PointCloud = 0x0400 ,
  All = 0xFFFF
}

Public Member Functions

 RenderInterface (RenderInterface &f)
 RenderInterface (RenderInterface &&f)
virtual ~RenderInterface ()
void setRenderEmbeded (bool is_embeded, QGridLayout *gly)
 Set the render window to be embedded/removed in the layout gly.
void setShowOptions (uint16_t options)
 Set the display mode to control the visibility of various elements.
void addPointCloud (const std::string &name, const std::vector< std::vector< double > > &points, const std::vector< double > &color)
 Add/modify point cloud.
void removePointCloud (const std::string &name)
 Remove the point cloud with the specified name.
bool hasPointCloud (const std::string &name)
 Check whether the point cloud with the specified name exists.
void clearPointCloud ()
 Remove all point clouds.
bool addWaypoint (void *wp, const std::vector< double > &pose, const std::vector< double > &color={ 0.0, 1.0, 0.0, 1.0 }, bool axis_visible=false)
 Add/modify waypoint.
void removeWaypoint (void *wp)
 Remove the specified waypoint.
bool hasWaypoint (void *wp)
 Check whether the specified waypoint exists.
void clearWaypoints ()
 Remove all waypoints.
void setMoveTrack (void *wp, const std::vector< std::vector< double > > &track)
 Add/modify the move track for the specified waypoint.
void setBlendTrack (void *wp, const std::vector< std::vector< double > > &track)
void setMoveTrack (void *wp, const std::vector< std::vector< double > > &track, const std::vector< double > &color)
void setBlendTrack (void *wp, const std::vector< std::vector< double > > &track, const std::vector< double > &color)
void addCoordinate (const std::string &name, const std::vector< double > &pose)
 Add/modify coordinate axis.
void removeCoordinate (const std::string &name)
 Remove the specified coordinate axis.
bool hasCoordinate (const std::string &name)
 Check whether the specified coordinate axis exists.
void addLine (const std::string &name, const std::vector< std::vector< double > > &points, const std::vector< double > &color)
 Add/modify line.
void addLine (const std::string &name, int link_num, const std::vector< double > &pose, const std::vector< std::vector< double > > &points, const std::vector< double > &color)
void removeLine (const std::string &name)
 Remove the specified line.
void clearLines ()
 Remove all lines.
void addPlane (const std::string &name, const std::vector< double > &pose, const std::vector< double > &size, const std::vector< double > &color)
 Add/modify plane.
void addPlane (const std::string &name, int link_num, const std::vector< double > &pose, const std::vector< double > &size, const std::vector< double > &color)
void removePlane (const std::string &name)
 Remove the specified plane.
void clearPlanes ()
 Remove all planes.
void addCube (const std::string &name, const std::vector< double > &pose, const std::vector< double > &size, const std::vector< double > &color, int type=0)
 Add/modify cube.
void addCube (const std::string &name, int link_num, const std::vector< double > &pose, const std::vector< double > &size, const std::vector< double > &color, int type=0)
void addCube (const std::string &name, const std::vector< double > &pose, float length_min, float length_max, float width_min, float width_max, float height_min, float height_max, const std::vector< double > &color, int type=0)
 Add/modify cube with size ranges.
void addCube (const std::string &name, int link_num, const std::vector< double > &pose, float length_min, float length_max, float width_min, float width_max, float height_min, float height_max, const std::vector< double > &color, int type=0)
void removeCube (const std::string &name)
 Remove the specified cube.
void clearCubes ()
 Remove all cubes.
int addMesh (const std::string &name, int link_num, const std::string &model_path, const std::vector< double > &pose)
 addMesh 添加任意模型文件
std::vector< std::string > getMeshes (int link_num)
 getMeshes 获取关节 link_num 的外设模型名字
int removeMesh (const std::string &name)
 removeMesh
int clearMeshes (int link_num)
 clearMeshes

Private Member Functions

 RenderInterface ()

Private Attributes

void * d_ { nullptr }

Friends

class DataSwitch

Detailed Description

RenderInterface Provides display option controls related to 3D rendering, including show/hide of ground, robot models, coordinate systems, trajectories and points.

Definition at line 28 of file render_interface.h.

Member Enumeration Documentation

◆ ShowOptions

Enumerator
None 
Ground 
TargetRobot 
RealRobot 
Coordinate 
Track 
Point 
View 
Obstacle 
SafetyPlane 
ToolPosition 
PointCloud 
All 

Definition at line 31 of file render_interface.h.

Constructor & Destructor Documentation

◆ RenderInterface() [1/3]

arcs::aubo_scope::RenderInterface::RenderInterface ( RenderInterface & f)

References RenderInterface().

Referenced by RenderInterface(), and RenderInterface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RenderInterface() [2/3]

arcs::aubo_scope::RenderInterface::RenderInterface ( RenderInterface && f)

References RenderInterface().

Here is the call graph for this function:

◆ ~RenderInterface()

virtual arcs::aubo_scope::RenderInterface::~RenderInterface ( )
virtual

◆ RenderInterface() [3/3]

arcs::aubo_scope::RenderInterface::RenderInterface ( )
private

Member Function Documentation

◆ addCoordinate()

void arcs::aubo_scope::RenderInterface::addCoordinate ( const std::string & name,
const std::vector< double > & pose )

Add/modify coordinate axis.

Parameters
namecoordinate name
posepose x,y,z,rx,ry,rz

◆ addCube() [1/4]

void arcs::aubo_scope::RenderInterface::addCube ( const std::string & name,
const std::vector< double > & pose,
const std::vector< double > & size,
const std::vector< double > & color,
int type = 0 )

Add/modify cube.

Parameters
namecube name
link_num-1: TCP; 0: base; 1~6: joints;
poseposition
sizecube size (length, width, height)
colorcube color {r, g, b, a}, range 0.0~1.0
typecube rendering type: 0 for 6 planes, 1 for wireframe

◆ addCube() [2/4]

void arcs::aubo_scope::RenderInterface::addCube ( const std::string & name,
const std::vector< double > & pose,
float length_min,
float length_max,
float width_min,
float width_max,
float height_min,
float height_max,
const std::vector< double > & color,
int type = 0 )

Add/modify cube with size ranges.

Parameters
namecube name
poseposition
length_min
length_max
width_min
width_max
height_min
height_max
colorcube color {r, g, b, a}, range 0.0~1.0
typecube rendering type: 0 for 6 planes, 1 for wireframe

◆ addCube() [3/4]

void arcs::aubo_scope::RenderInterface::addCube ( const std::string & name,
int link_num,
const std::vector< double > & pose,
const std::vector< double > & size,
const std::vector< double > & color,
int type = 0 )

addCube

Parameters
name
link_num
pose
size
color
type

◆ addCube() [4/4]

void arcs::aubo_scope::RenderInterface::addCube ( const std::string & name,
int link_num,
const std::vector< double > & pose,
float length_min,
float length_max,
float width_min,
float width_max,
float height_min,
float height_max,
const std::vector< double > & color,
int type = 0 )

addCube

Parameters
name
link_num
pose
length_min
length_max
width_min
width_max
height_min
height_max
color
type

◆ addLine() [1/2]

void arcs::aubo_scope::RenderInterface::addLine ( const std::string & name,
const std::vector< std::vector< double > > & points,
const std::vector< double > & color )

Add/modify line.

Parameters
nameline name
link_num-1: TCP; 0: base; 1~6: joints;
posereference coordinate system for points, default 6 zeros
pointspoint collection
colorline color {r, g, b, a}, range 0.0~1.0

◆ addLine() [2/2]

void arcs::aubo_scope::RenderInterface::addLine ( const std::string & name,
int link_num,
const std::vector< double > & pose,
const std::vector< std::vector< double > > & points,
const std::vector< double > & color )

addLine

Parameters
name
link_num
pose
points
color

◆ addMesh()

int arcs::aubo_scope::RenderInterface::addMesh ( const std::string & name,
int link_num,
const std::string & model_path,
const std::vector< double > & pose )

addMesh 添加任意模型文件

Parameters
name唯一标识
link_num-1: TCP; 0: 底座; 1~6: 关节;
model_path3ds 文件绝对路径
pose模型文件安装位置 {x, y, z, rx, ry, rz}
Returns
0: 成功; 其他失败

◆ addPlane() [1/2]

void arcs::aubo_scope::RenderInterface::addPlane ( const std::string & name,
const std::vector< double > & pose,
const std::vector< double > & size,
const std::vector< double > & color )

Add/modify plane.

Parameters
nameplane name
link_num-1: TCP; 0: base; 1~6: joints;
poseposition
sizeplane size (length, width)
colorcolor {r, g, b, a}, range 0.0~1.0

◆ addPlane() [2/2]

void arcs::aubo_scope::RenderInterface::addPlane ( const std::string & name,
int link_num,
const std::vector< double > & pose,
const std::vector< double > & size,
const std::vector< double > & color )

addPlane

Parameters
name
link_num
pose
size
color

◆ addPointCloud()

void arcs::aubo_scope::RenderInterface::addPointCloud ( const std::string & name,
const std::vector< std::vector< double > > & points,
const std::vector< double > & color )

Add/modify point cloud.

Parameters
namepoint cloud name
pointspoint collection
colorpoint cloud color rgba

◆ addWaypoint()

bool arcs::aubo_scope::RenderInterface::addWaypoint ( void * wp,
const std::vector< double > & pose,
const std::vector< double > & color = { 0.0, 1.0, 0.0, 1.0 },
bool axis_visible = false )

Add/modify waypoint.

Parameters
wpthe unique object representing the waypoint
posewaypoint pose x,y,z,rx,ry,rz
colorwaypoint color {r, g, b, a}, range 0.0~1.0
axis_visiblewhether to show pose direction arrows on the waypoint
Return values
truesuccess
falsefailure

◆ clearCubes()

void arcs::aubo_scope::RenderInterface::clearCubes ( )

Remove all cubes.

◆ clearLines()

void arcs::aubo_scope::RenderInterface::clearLines ( )

Remove all lines.

◆ clearMeshes()

int arcs::aubo_scope::RenderInterface::clearMeshes ( int link_num)

clearMeshes

Parameters
link_num
Returns

◆ clearPlanes()

void arcs::aubo_scope::RenderInterface::clearPlanes ( )

Remove all planes.

◆ clearPointCloud()

void arcs::aubo_scope::RenderInterface::clearPointCloud ( )

Remove all point clouds.

◆ clearWaypoints()

void arcs::aubo_scope::RenderInterface::clearWaypoints ( )

Remove all waypoints.

◆ getMeshes()

std::vector< std::string > arcs::aubo_scope::RenderInterface::getMeshes ( int link_num)

getMeshes 获取关节 link_num 的外设模型名字

Parameters
link_num-1: TCP; 0: 底座; 1~6: 关节;
Returns
名字列表

◆ hasCoordinate()

bool arcs::aubo_scope::RenderInterface::hasCoordinate ( const std::string & name)

Check whether the specified coordinate axis exists.

Parameters
namecoordinate name
Return values
trueexists
falsedoes not exist

◆ hasPointCloud()

bool arcs::aubo_scope::RenderInterface::hasPointCloud ( const std::string & name)

Check whether the point cloud with the specified name exists.

Parameters
namepoint cloud name
Return values
trueexists
falsedoes not exist

◆ hasWaypoint()

bool arcs::aubo_scope::RenderInterface::hasWaypoint ( void * wp)

Check whether the specified waypoint exists.

Parameters
wpthe unique object representing the waypoint
Return values
trueexists
falsedoes not exist

◆ removeCoordinate()

void arcs::aubo_scope::RenderInterface::removeCoordinate ( const std::string & name)

Remove the specified coordinate axis.

Parameters
namecoordinate name

◆ removeCube()

void arcs::aubo_scope::RenderInterface::removeCube ( const std::string & name)

Remove the specified cube.

Parameters
namecube name

◆ removeLine()

void arcs::aubo_scope::RenderInterface::removeLine ( const std::string & name)

Remove the specified line.

Parameters
nameline name

◆ removeMesh()

int arcs::aubo_scope::RenderInterface::removeMesh ( const std::string & name)

removeMesh

Parameters
name
Returns

◆ removePlane()

void arcs::aubo_scope::RenderInterface::removePlane ( const std::string & name)

Remove the specified plane.

Parameters
nameplane name

◆ removePointCloud()

void arcs::aubo_scope::RenderInterface::removePointCloud ( const std::string & name)

Remove the point cloud with the specified name.

Parameters
namepoint cloud name

◆ removeWaypoint()

void arcs::aubo_scope::RenderInterface::removeWaypoint ( void * wp)

Remove the specified waypoint.

Parameters
wpthe unique object representing the waypoint

◆ setBlendTrack() [1/2]

void arcs::aubo_scope::RenderInterface::setBlendTrack ( void * wp,
const std::vector< std::vector< double > > & track )

setBlendTrack

Parameters
wp
track

◆ setBlendTrack() [2/2]

void arcs::aubo_scope::RenderInterface::setBlendTrack ( void * wp,
const std::vector< std::vector< double > > & track,
const std::vector< double > & color )

setBlendTrack

Parameters
wp
track
color

◆ setMoveTrack() [1/2]

void arcs::aubo_scope::RenderInterface::setMoveTrack ( void * wp,
const std::vector< std::vector< double > > & track )

Add/modify the move track for the specified waypoint.

Parameters
wpthe unique object representing the waypoint
trackwaypoint pose collection x,y,z,rx,ry,rz

◆ setMoveTrack() [2/2]

void arcs::aubo_scope::RenderInterface::setMoveTrack ( void * wp,
const std::vector< std::vector< double > > & track,
const std::vector< double > & color )

setMoveTrack

Parameters
wp
track
color

◆ setRenderEmbeded()

void arcs::aubo_scope::RenderInterface::setRenderEmbeded ( bool is_embeded,
QGridLayout * gly )

Set the render window to be embedded/removed in the layout gly.

Parameters
is_embededwhether to embed
glythe layout

◆ setShowOptions()

void arcs::aubo_scope::RenderInterface::setShowOptions ( uint16_t options)

Set the display mode to control the visibility of various elements.

Parameters
optionsoption value, see ShowOptions enum for details

◆ DataSwitch

friend class DataSwitch
friend

Definition at line 682 of file render_interface.h.

References DataSwitch.

Referenced by DataSwitch.

Member Data Documentation

◆ d_

void* arcs::aubo_scope::RenderInterface::d_ { nullptr }
private

Definition at line 684 of file render_interface.h.


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