﻿ VRML技术结合全方位运动轮椅的应用实践探索
 计算机系统应用  2019, Vol. 28 Issue (4): 231-235 PDF
VRML技术结合全方位运动轮椅的应用实践探索

Exploration of VRML Technology Combined with Omni-Directional Wheelchair Application
ZHOU Wei-Hua, ZHANG De-Fa
Taizhou Vocational & Technical College, Taizhou 318000, China
Foundation item: Science and Technology Program of Taizhou City (1701gy25); General Scientific Research Program of Education Bureau, Zhejiang Province (Y201636417)
Abstract: Collaborative Virtual Reality (VR) technology has a wide application background. An omni-directional wheelchair was used as an application object to discuss the technology of VR and so on. The kinematic relationship of the wheelchair was analyzed with combining the motion principle and arrangement of Mecanum wheel, alternate wheel, and conical wheel. The Virtual Reality Modeling Language (VRML) was used to make real-time customization and motion simulation based on the wheelchair 3D Pre/E model. The change of part color and the replacement of wheelchair components can be realized through the operation custom console. By using this method, the omni-directional movements such as longitudinal, lateral, and rotary motion can be emulated via the simulation panel. In this way, clients can participate in the design and get a wheelchair according to their individual requirements, which will give them a deeper and more impressive feeling about the wheelchair’s special motion functions.
Key words: omni-directional wheelchair     real-time customization     motion simulation

VRML是基于Internet的三维虚拟场景描绘标准, 强调多用户之间的相互感知, 在情景创投、协同工作、交互性方面具有明显的优势[4,5]. 因此, 将虚拟现实建模语言(VRML)应用进来, 不但实现了客户对轮椅实时定制的需求, 还可以使异地的设计者, 通过网络实现异地协作, 并可以进行在线仿真.

1 全方位轮椅的运动分析

 $\begin{array}{l} {v_1} = \sigma \cos (\alpha + \beta ) + r\theta '\cos \alpha - l\varphi '\sin \gamma \\ {v_2} = \sigma \sin (\alpha + \beta ) + r\theta '\sin \alpha + l\varphi '\cos \gamma \end{array}$ (1)

 $\begin{array}{l} \sin \gamma = {s_2}/l\\ \cos \gamma = {s_1}/l \end{array}$ (2)

 $\theta ' = {a_1}{v_1} + {a_1}v{}_2 + {a_3}\varphi '$ (3)

 $\left\{\begin{array}{l} {a_1} = \sin (\alpha + \beta )/r\sin \beta \\ {a_2} = - \cos (\alpha + \beta )/r\sin \beta \\ {a_3} = {a_2}{s_1} - {a_1}{s_2} \end{array}\right.$ (4)
 图 1 全向轮三维图

 图 2 轮椅与万向轮的坐标系

 图 3 轮椅在Mecanum轮的排布形式

 ${\theta '_1} = \frac{1}{r}\left[ {{v_1} - {v_2} - ({s_1} + {s_2})\varphi '} \right]$ (5)

 $\left( \begin{array}{l} {{\theta '}_1}\\ {{\theta '}_2}\\ {{\theta '}_3}\\ {{\theta '}_4} \end{array} \right) = \frac{1}{r}\left( {\begin{array}{*{20}{c}} 1 & { - 1} & { - ({s_1} + {s_2})}\\ 1 & { - 1} & {{s_1} + {s_2}}\\ 1 & { - 1} & { - ({s_1} + {s_2})}\\ 1 & 1 & {{s_1} + {s_2}} \end{array}} \right)\left( \begin{array}{l} {v_1}\\ {v_2}\\ {\varphi '} \end{array} \right)$ (6)

 ${\theta '_1} = \frac{{\sqrt 2 }}{{2r}}\left[ {{v_1} - {v_2} - ({s_1} + {s_2})\varphi '} \right]$ (7)

 $\left( \begin{array}{l} {{\theta '}_1}\\ {{\theta '}_2}\\ {{\theta '}_3}\\ {{\theta '}_4} \end{array} \right) = \frac{{\sqrt 2 }}{{2r}}\left( {\begin{array}{*{20}{c}} 1 & { - 1} & { - ({s_1} + {s_2})}\\ 1 & { - 1} & {{s_1} + {s_2}}\\ 1 & { - 1} & { - ({s_1} + {s_2})}\\ 1 & 1 & {{s_1} + {s_2}} \end{array}} \right)\left( \begin{array}{l} {v_1}\\ {v_2}\\ {\varphi '} \end{array} \right)$ (8)

2 VRML定制与仿真系统的整体设计

VRML自身具有三维造型功能, 但是造型能力较差, 只能创建比较简单的模型, 对于像全方位轮椅这样复杂的模型需要专用的三维建模软件如Pro/E等进行建模. 将全方位轮椅的装配体在Pro/E里保存为wrl格式文件导出便可以得到初级VRML文件. 为了后面的定制以及运动仿真编程的方便, 需要对初级VRML文件进行一定的优化处理, 这些优化处理包括: 实例重用即DEF定义和USE引用; 删除格式转化过程中的不必要的面片、节点、视点等; 文件的整体化以及节点的重命名[8]. 经过这些处理后的VRML文件体积将会大大减小. 在编辑器VRMLpad里使用各种传感器节点再结合编程语言javascript, 完成交互定制系统和运动仿真系统的编程. 为了满足客户的网络浏览要求, 可以用网页制作软件Dreamweaver等将VRML文件和网页进行整合后上传至网络服务器[9]. 系统的整体实现过程如图5所示.

 图 4 轮椅在切换轮及锥滚轮的排布方式

3 定制交互的实现

 图 5 系统实现过程

4 运动仿真的实现

 图 6 实时定制效果图

 图 7 仿真控制流程图

 图 8 轮椅运动仿真

5 结论

 [1] 赵兴平. 基于单通道脑机接口的智能轮椅控制及人机交互研究[硕士学位论文]. 哈尔滨: 哈尔滨工业大学, 2017. [2] 李雪莲. 老年智能轮椅设计研究. 机械设计, 2014, 31(4): 100-104. [3] 周卫华, 王班, 郭吉丰. 四轮移动机器人直线运动下的力矩优化控制. 计算机集成制造系统, 2016, 22(3): 800-805. [4] 许爱军. VRML协同虚拟现实系统的研究与应用. 计算机技术与发展, 2016, 26(6): 115-118, 122. [5] 石敏, 王俊铮, 魏家辉. 真实感三维虚拟场景构建与漫游方法. 系统仿真学报, 2014, 26(9): 1969-19740, 1979. [6] 赵冬斌, 易建强. 全方位移动机器人导论. 北京: 科学出版社, 2010. [7] 周卫华, 王班, 黄善均, 等. 单排连续切换全向轮移动机器人的布局方式与运动的稳定性分析. 中国机械工程, 2014, 25(7): 888-894. DOI:10.3969/j.issn.1004-132X.2014.07.008 [8] 胡光军. 三维虚拟校园自动漫游系统的设计与实现[硕士学位论文]. 济南: 山东大学, 2013. [9] 赵冶. 基于OpenGL结合VRML的六自由度机械臂模拟仿真[硕士学位论文]. 合肥: 合肥工业大学, 2017. [10] Gorai P, Gao DF, Ortiz B, et al. TE Design Lab: A virtual laboratory for thermoelectric material design. Computational Materials Science, 2016, 112: 368-376. DOI:10.1016/j.commatsci.2015.11.006 [11] 刘怡, 张洪定, 崔欣. 虚拟现实 VRML程序设计. 天津: 南开大学出版社, 2007. [12] 刘维平. 液压挖掘机工装控制远程虚拟实验教学系统研发[硕士学位论文]. 黑龙江: 哈尔滨工业大学, 2017.