积木机器人遥控关节控制教程升级版.pdfVIP

  • 1
  • 0
  • 约4.74千字
  • 约 14页
  • 2025-10-23 发布于山西
  • 举报

积木机器人遥控关节控制教程升级版.pdf

控制关节

我们先介绍另外一个关节控制图标:

这个图标的功能有些特殊。前面介绍的关节控制图标要

么是直接设置角度的,要么是通过变量设置角度的。而今天

的这个关节控制图标不需要设置角度,只要执行这个图标,

关节就会向一个方向转动,转到极限位置停止。具体是怎么

一个操作方式还是通过试验来说明吧。

试验一:

用一个按键(按键接在端口2)控制插在关节1插口的

关节,具体的操作方式为:按下按键关节就向一个方向

转动,松开按键停止转动。

开始编程:

既然是通过端口2的按键来控制,那么当然需要判断端

口2的状态,先拖入一个端口2判断图标:

Remotecontrol

joints

Let’sfirstintroduceanotherjointcontrolicon:

Thefunctionofthisiconissomewhatspecial.Thejoint

controliconsintroducedearliereithersettheangledirectlyor

settheanglethroughvariab.Todaysjointcontrolicondoes

notrequiresettingtheangle.Aslongasthisiconisexecuted,

thejointwillrotateinonedirectionandstopattheextreme

position.Let’sexinthespecificoperationmethodthrough

experiments.

试验一:

Useabutton(thebuttonisconnectedtoport2)tocontrol

thejointinsertedintothejoint1socket.Thespecificoperation

methodis:afterpressingthebutton,thejointwillrotateinone

direction,andreleasethebuttontostoptherotation.

Start

programming:

Sinceitiscontrolledthroughthebuttonsofport2,of

courseitisnecessarytojudgethestatusofport2.Firstdragin

aport2judgmenticon:

然后拖入今天介绍的这个图标:

默认是控制关节1转动,单击这个图标可以进行设置:

Thendragintheiconintroducedtoday:

Thedefaultistocontroltherotationofjoint1.Clickthisicontoset:

可以看到这里既可以选择需要控制的关节,也可以选择

需要关节转动的方向。我们这里采用默认值即可。

然后我们需要按键松开的时候关节停止转动,我们再拖

入一个关节转动控制图标:

同样单击这个图标进行设置:

Youcanseethatyoucanselectthejointsthatneedtobe

controlledandthedirectioninwhichthejointsneedtorotate.W

文档评论(0)

1亿VIP精品文档

相关文档