找回密码
 注册
Simdroid-非首页
查看: 109|回复: 4

[PCL] PCL建立Point

[复制链接]
发表于 2011-11-6 13:42:55 | 显示全部楼层 |阅读模式 来自 陕西宝鸡
在PCL文件中,用如下程序建立点
Real Pnt_X,Pnt_Y,Pnt_Z1
中间添加计算Pnt_X,Pnt_Y,Pnt_Z1的程序

asm_const_grid_xyz( "#",  "[`Pnt_X` `Pnt_Y` `Pnt_Z1`]",@
               "Coord 0", asm_create_grid_xyz_created_ids )

但是每次运行的时候,总是提示
"[`Pnt_X` `Pnt_Y` `Pnt_Z1`]"有错误
已经弄了两天了,一直修改不过来,还请高手指教
PS:这段程序在SES文件中,没有任何问题,可以建立Point


发表于 2011-11-6 17:45:15 | 显示全部楼层 来自 上海
Simdroid开发平台
本帖最后由 kalaok 于 2011-11-6 17:45 编辑

"[`Pnt_X` `Pnt_Y` `Pnt_Z1`]"这一段试试换以下方式
定义一个real 数组
real coordinate(3)
coordinate(1)=Pnt_X
coordinate(2)=Pnt_Y
coordinate(3)=Pnt_Z
然后
asm_const_grid_xyz( "#", coordinate,@               "Coord 0", asm_create_grid_xyz_created_ids )
PS:数组输入到函数中最好不要在函数里用""来组合,很容易就出错误
回复 不支持

使用道具 举报

 楼主| 发表于 2011-11-6 22:02:55 | 显示全部楼层 来自 陕西宝鸡
kalaok 发表于 2011-11-6 17:45
"[`Pnt_X` `Pnt_Y` `Pnt_Z1`]"这一段试试换以下方式
定义一个real 数组
real coordinate(3)

代码改为REAL R_Pnt1(3)
asm_const_grid_xyz( "#", R_Pnt1,"Coord 0",  @
      asm_create_grid_xyz_created_ids )
错误类型为
$# (PCL) Invalid datatype to built-in function. Arg#: 2
还请指教
回复 不支持

使用道具 举报

发表于 2011-11-9 22:13:39 | 显示全部楼层 来自 上海
asm_const_grid_xyz  (output_ids, coordinates_list, coord_frame, created_ids)
STRING  coordinates_list[]  This value specifies the reference coordinate frame coordinates of a point
应该定义 string而不是real
string R_Pnt1[256]
R_Pnt1="[0 0 0] "
可以去查pcl_example对应函数



回复 不支持

使用道具 举报

 楼主| 发表于 2011-11-12 10:21:35 | 显示全部楼层 来自 陕西宝鸡
kalaok 发表于 2011-11-9 22:13
asm_const_grid_xyz  (output_ids, coordinates_list, coord_frame, created_ids)
STRING  coordinates_li ...

谢谢,已经解决
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-26 10:58 , Processed in 0.029563 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表