AuboStudio SDK  0.6.3
arcs::aubo_scope::RenderInterface类 参考

\chinese 渲染接口 提供 3D 渲染相关的显示选项控制,包括地面、机器人模型、坐标系、轨迹和点等元素的 显示/隐藏。 \endchinese \english RenderInterface Provides display option controls related to 3D rendering, including show/hide of ground, robot models, coordinate systems, trajectories and points. 更多...

#include <render_interface.h>

Public 类型

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 成员函数

 RenderInterface (RenderInterface &f)
 RenderInterface (RenderInterface &&f)
virtual ~RenderInterface ()
void setRenderEmbeded (bool is_embeded, QGridLayout *gly)
 \chinese 设置 Render 窗口嵌入/移除(isEmbeded) 布局 gly 中
void setShowOptions (uint16_t options)
 \chinese 设置显示模式,控制各种元素的显隐
void addPointCloud (const std::string &name, const std::vector< std::vector< double > > &points, const std::vector< double > &color)
 \chinese 添加/修改点云
void removePointCloud (const std::string &name)
 \chinese 移除指定名称的点云
bool hasPointCloud (const std::string &name)
 \chinese 查找指定名称的点云是否存在
void clearPointCloud ()
 \chinese 移除所有的点云 \endchinese \english 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)
 \chinese 添加/修改路点
void removeWaypoint (void *wp)
 \chinese 移除指定路点
bool hasWaypoint (void *wp)
 \chinese 查找指定路点是否存在
void clearWaypoints ()
 \chinese 移除所有的路点 \endchinese \english Remove all waypoints.
void setMoveTrack (void *wp, const std::vector< std::vector< double > > &track)
 \chinese 添加/修改指定路点的交融轨迹
void setBlendTrack (void *wp, const std::vector< std::vector< double > > &track)
 \chinese
void setMoveTrack (void *wp, const std::vector< std::vector< double > > &track, const std::vector< double > &color)
 \chinese
void setBlendTrack (void *wp, const std::vector< std::vector< double > > &track, const std::vector< double > &color)
 \chinese
void addCoordinate (const std::string &name, const std::vector< double > &pose)
 \chinese 添加/修改坐标轴
void removeCoordinate (const std::string &name)
 \chinese 移除指定坐标轴
bool hasCoordinate (const std::string &name)
 \chinese 查找指定坐标轴是否存在
void addLine (const std::string &name, const std::vector< std::vector< double > > &points, const std::vector< double > &color)
 \chinese 添加/修改线
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)
 \chinese
void removeLine (const std::string &name)
 \chinese 移除指定线
void clearLines ()
 \chinese 移除所有的线 \endchinese \english Remove all lines.
void addPlane (const std::string &name, const std::vector< double > &pose, const std::vector< double > &size, const std::vector< double > &color)
 \chinese 添加/修改平面
void addPlane (const std::string &name, int link_num, const std::vector< double > &pose, const std::vector< double > &size, const std::vector< double > &color)
 \chinese
void removePlane (const std::string &name)
 \chinese 移除指定平面
void clearPlanes ()
 \chinese 移除所有的平面 \endchinese \english 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)
 \chinese 添加/修改立方体
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)
 \chinese
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)
 \chinese 添加/修改立方体(带尺寸范围)
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)
 \chinese
void removeCube (const std::string &name)
 \chinese 移除指定立方体
void clearCubes ()
 \chinese 移除所有的立方体 \endchinese \english 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 成员函数

 RenderInterface ()

Private 属性

void * d_ { nullptr }

友元

class DataSwitch

详细描述

\chinese 渲染接口 提供 3D 渲染相关的显示选项控制,包括地面、机器人模型、坐标系、轨迹和点等元素的 显示/隐藏。 \endchinese \english RenderInterface Provides display option controls related to 3D rendering, including show/hide of ground, robot models, coordinate systems, trajectories and points.

\endenglish

在文件 render_interface.h28 行定义.

成员枚举类型说明

◆ ShowOptions

枚举值
None 
Ground 
TargetRobot 
RealRobot 
Coordinate 
Track 
Point 
View 
Obstacle 
SafetyPlane 
ToolPosition 
PointCloud 
All 

在文件 render_interface.h31 行定义.

构造及析构函数说明

◆ RenderInterface() [1/3]

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

引用了 RenderInterface().

被这些函数引用 RenderInterface() , 以及 RenderInterface().

函数调用图:
这是这个函数的调用关系图:

◆ RenderInterface() [2/3]

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

引用了 RenderInterface().

函数调用图:

◆ ~RenderInterface()

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

◆ RenderInterface() [3/3]

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

成员函数说明

◆ addCoordinate()

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

\chinese 添加/修改坐标轴

参数
name坐标轴名称
pose位姿 x,y,z,rx,ry,rz \endchinese \english Add/modify coordinate axis.
namecoordinate name
posepose x,y,z,rx,ry,rz \endenglish

◆ 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 )

\chinese 添加/修改立方体

参数
name立方体名称
link_num-1: TCP; 0: 底座; 1~6: 关节;
pose位置
size立方体大小(长,宽,高)
color立方体颜色 {r, g, b, a}, 范围是 0.0~1.0
type立方体绘制类型 0 代表画 6 个平面,1 代表只画边框线 \endchinese \english Add/modify cube.
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 \endenglish

◆ 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 )

\chinese 添加/修改立方体(带尺寸范围)

参数
name立方体名称
pose位置
length_min最小长度
length_max最大长度
width_min最小宽度
width_max最大宽度
height_min最小高度
height_max最大高度
color立方体颜色 {r, g, b, a}, 范围是 0.0~1.0
type立方体绘制类型 0 代表画 6 个平面,1 代表只画边框线 \endchinese \english Add/modify cube with size ranges.
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 \endenglish

◆ 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 )

\chinese

addCube 添加立方体

参数
name立方体名称
link_num关节编号
pose位姿
size大小
color颜色
type类型 \endchinese \english

addCube

参数
name
link_num
pose
size
color
type\endenglish

◆ 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 )

\chinese

addCube 添加立方体

参数
name立方体名称
link_num关节编号
pose位姿
length_min最小长度
length_max最大长度
width_min最小宽度
width_max最大宽度
height_min最小高度
height_max最大高度
color颜色
type类型 \endchinese \english

addCube

参数
name
link_num
pose
length_min
length_max
width_min
width_max
height_min
height_max
color
type\endenglish

◆ 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 )

\chinese 添加/修改线

参数
name线名称
link_num-1: TCP; 0: 底座; 1~6: 关节;
pose点的参考坐标系, 默认 6 个 0
points点集合
color线颜色 {r, g, b, a}, 范围是 0.0~1.0 \endchinese \english Add/modify line.
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 \endenglish

◆ 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 )

\chinese

addLine 添加线

参数
name线名称
link_num关节编号
pose位姿
points点集合
color颜色 \endchinese \english

addLine

参数
name
link_num
pose
points
color\endenglish

◆ 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 添加任意模型文件

参数
name唯一标识
link_num-1: TCP; 0: 底座; 1~6: 关节;
model_path3ds 文件绝对路径
pose模型文件安装位置 {x, y, z, rx, ry, rz}
返回
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 )

\chinese 添加/修改平面

参数
name平面名称
link_num-1: TCP; 0: 底座; 1~6: 关节;
pose位置
size平面大小(长,宽)
color线颜色 {r, g, b, a}, 范围是 0.0~1.0 \endchinese \english Add/modify plane.
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 \endenglish

◆ 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 )

\chinese

addPlane 添加平面

参数
name平面名称
link_num关节编号
pose位姿
size大小
color颜色 \endchinese \english

addPlane

参数
name
link_num
pose
size
color\endenglish

◆ addPointCloud()

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

\chinese 添加/修改点云

参数
name点云名称
points点集合
color点云颜色 rgba \endchinese \english Add/modify point cloud.
namepoint cloud name
pointspoint collection
colorpoint cloud color rgba \endenglish

◆ 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 )

\chinese 添加/修改路点

参数
wp代表路点的唯一对象
pose路点位姿 x,y,z,rx,ry,rz
color路点颜色 {r, g, b, a}, 范围是 0.0~1.0
axis_visible路点上是否显示位姿方向箭头
返回值
true成功
false失败 \endchinese \english Add/modify waypoint.
参数
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
返回值
truesuccess
falsefailure \endenglish

◆ clearCubes()

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

\chinese 移除所有的立方体 \endchinese \english Remove all cubes.

\endenglish

◆ clearLines()

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

\chinese 移除所有的线 \endchinese \english Remove all lines.

\endenglish

◆ clearMeshes()

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

clearMeshes

参数
link_num
返回

◆ clearPlanes()

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

\chinese 移除所有的平面 \endchinese \english Remove all planes.

\endenglish

◆ clearPointCloud()

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

\chinese 移除所有的点云 \endchinese \english Remove all point clouds.

\endenglish

◆ clearWaypoints()

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

\chinese 移除所有的路点 \endchinese \english Remove all waypoints.

\endenglish

◆ getMeshes()

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

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

参数
link_num-1: TCP; 0: 底座; 1~6: 关节;
返回
名字列表

◆ hasCoordinate()

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

\chinese 查找指定坐标轴是否存在

参数
name坐标轴名称
返回值
true存在
false不存在 \endchinese \english Check whether the specified coordinate axis exists.
参数
namecoordinate name
返回值
trueexists
falsedoes not exist \endenglish

◆ hasPointCloud()

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

\chinese 查找指定名称的点云是否存在

参数
name点云名称
返回值
true存在
false不存在 \endchinese \english Check whether the point cloud with the specified name exists.
参数
namepoint cloud name
返回值
trueexists
falsedoes not exist \endenglish

◆ hasWaypoint()

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

\chinese 查找指定路点是否存在

参数
wp代表路点的唯一对象
返回值
true存在
false不存在 \endchinese \english Check whether the specified waypoint exists.
参数
wpthe unique object representing the waypoint
返回值
trueexists
falsedoes not exist \endenglish

◆ removeCoordinate()

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

\chinese 移除指定坐标轴

参数
name坐标轴名称 \endchinese \english Remove the specified coordinate axis.
namecoordinate name \endenglish

◆ removeCube()

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

\chinese 移除指定立方体

参数
name立方体名称 \endchinese \english Remove the specified cube.
namecube name \endenglish

◆ removeLine()

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

\chinese 移除指定线

参数
name线名称 \endchinese \english Remove the specified line.
nameline name \endenglish

◆ removeMesh()

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

removeMesh

参数
name
返回

◆ removePlane()

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

\chinese 移除指定平面

参数
name名称 \endchinese \english Remove the specified plane.
nameplane name \endenglish

◆ removePointCloud()

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

\chinese 移除指定名称的点云

参数
name点云名称 \endchinese \english Remove the point cloud with the specified name.
namepoint cloud name \endenglish

◆ removeWaypoint()

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

\chinese 移除指定路点

参数
wp代表路点的唯一对象 \endchinese \english Remove the specified waypoint.
wpthe unique object representing the waypoint \endenglish

◆ setBlendTrack() [1/2]

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

\chinese

setBlendTrack 设置混合轨迹

参数
wp路点对象
track轨迹集合 \endchinese \english

setBlendTrack

参数
wp
track\endenglish

◆ setBlendTrack() [2/2]

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

\chinese

setBlendTrack 设置混合轨迹

参数
wp路点对象
track轨迹集合
color颜色 \endchinese \english

setBlendTrack

参数
wp
track
color\endenglish

◆ setMoveTrack() [1/2]

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

\chinese 添加/修改指定路点的交融轨迹

参数
wp代表路点的唯一对象
track路点位姿 x,y,z,rx,ry,rz 集合 \endchinese \english Add/modify the move track for the specified waypoint.
wpthe unique object representing the waypoint
trackwaypoint pose collection x,y,z,rx,ry,rz \endenglish

◆ setMoveTrack() [2/2]

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

\chinese

setMoveTrack 设置移动轨迹

参数
wp路点对象
track轨迹集合
color颜色 \endchinese \english

setMoveTrack

参数
wp
track
color\endenglish

◆ setRenderEmbeded()

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

\chinese 设置 Render 窗口嵌入/移除(isEmbeded) 布局 gly 中

参数
is_embeded是否嵌入
gly布局 \endchinese \english Set the render window to be embedded/removed in the layout gly.
is_embededwhether to embed
glythe layout \endenglish

◆ setShowOptions()

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

\chinese 设置显示模式,控制各种元素的显隐

参数
options选项值,详情查看 ShowOptions 枚举 \endchinese \english Set the display mode to control the visibility of various elements.
optionsoption value, see ShowOptions enum for details \endenglish

◆ DataSwitch

friend class DataSwitch
friend

在文件 render_interface.h682 行定义.

引用了 DataSwitch.

被这些函数引用 DataSwitch.

类成员变量说明

◆ d_

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

在文件 render_interface.h684 行定义.


该类的文档由以下文件生成: