当前位置:网站首页>Unityvr robot Scene 3 gripper
Unityvr robot Scene 3 gripper
2022-07-26 00:45:00 【Classmate Tang Xiaomo】
The gripper is a difficult part of the robot arm scene , It involves collision and joint movement with grasping objects , The following claw script only considers the preliminary functions , On this basis, improvements can be made .

1. First, find the moving part of the paw —— Two fingers , They are the key to control opening and closing . Rename them respectively fingerRed and fingerBlue, In order to be easy to describe in the script . You can also use different colors to distinguish them , Also for the convenience of the production process .


2. Add collision bodies to two fingers, red and blue respectively ,BoxCollider Just go , And adjust two Collider Location and size of , As long as the fingertip is small ( As shown in the figure below , In fact, it can be smaller ). They are used to detect whether they touch objects . In addition, their IsTrigger Check it out , We don't want our paws to spring away as soon as they touch an object .


3. Add a Rigidbody( rigid body ), After that, the collision body on little red and little blue needs to use this rigid body to call . And cancel the gravity of the rigid body , We don't want our paws to fall to the ground at the beginning .

4. Test Xiaohong 、 The direction and distance that Xiaolan needs to move from opening the claw to closing the claw : Click red and blue respectively , Check their local coordinates . As shown in the picture below , Opening and closing claws follow their Z Axial movement , And the moving distance is 0.15.

5. Gripper script :
The first paragraph : Declare variables 
The second paragraph : Initialize variable , Here we have one Slider Control to control the opening and closing of the gripper , And only consider the open and closed states , Do not consider the intermediate state .

The third paragraph : A function that controls the opening and closing of jaws , Pass a 0 or 1 Parameters of . The gripper model has been simplified here , The command it gets is either open or closed .

The fourth paragraph : Use collision detection , Once an object is detected , Let the clamped object become the child node of the claw , Follow the claws to move .( The object must have “Goods” Tags will be grabbed )

The fifth paragraph : When opening the paw and the object leaves the paw , Let the object restore gravity , And break away from the father son relationship with the claw , It can fall from the claw .

Expand your thinking :
1. Here the claw only considers opening 、 Closed in two states , How to use Slider Control controls the intermediate transition state of the gripper from open to closed
2. How to realize the closing process of the gripper , The function of stopping on the surface of an object immediately once it touches it .
边栏推荐
- [calculate the number of times that one string is equal to another string]
- 2022/7/25 考试总结
- OAuth2和JWT
- Verilog grammar basics HDL bits training 05
- Oauth2 and JWT
- Leetcode 笔记 121. 买卖股票的最佳时机
- Redis(八) - Redis企业实战之优惠券秒杀
- [untitled] how to realize pluggable configuration?
- 分布式事务和Seata的AT模式原理
- Distributed transaction and at mode principle of Seata
猜你喜欢
随机推荐
2022/7/25 考试总结
Leetcode 笔记 20. 有效的括号
SereTOD2022 Track1代码剖析-面向半监督和强化学习的任务型对话系统挑战赛
Leetcode notes 20. valid parentheses
独家下载|《阿里云MaxCompute百问百答》 解锁SaaS模式云数据仓库尽在本电子手册!
Research on the influence of opinion leaders based on network analysis and text mining
P4047 [jsoi2010] tribal Division
hcia综合实验
Azure synapse analytics Performance Optimization Guide (1) -- optimize performance using ordered aggregate column storage indexes
Tid-mop: a comprehensive framework for security management and control under the scenario of data exchange
Distributed transaction and at mode principle of Seata
Leetcode 笔记 121. 买卖股票的最佳时机
Attack and defense world web question -favorite_ number
Super super super realistic digital people! Keep you on the air 24 hours a day
SQL time splicing problem, splicing recovery automatically truncated by the system
Database tools duel: heidisql and Navicat
以数据驱动管理转型,元年科技正当时
Mwec: a new Chinese word discovery method based on multi semantic word vector
前缀异或和,异或差分数组
Hcip day 13








