【Stateflow入门】任务11.图表层次结构

本项目介绍如何使用Stateflow模型来实现机器人驾驶逻辑,包括对接和随机模式。项目分为两部分,首先定义驾驶模式的高层结构,然后填充实现细节并连接到Simulink。机器人有两种驾驶行为:行驶到指定位置和随机行驶。每个行为由一系列子状态控制,如纯旋转、纯平移和停止。在完成任务后,通过Simulink发送相应的速度和角速度命令给机器人。
摘要由CSDN通过智能技术生成

Robot Vacuum Driving Modes

Introduction

Background
As you’ve just learned, using hierarchy in your Stateflow models helps you group states with common functionality. In this project, you will use hierarchy to model something similar to the driving logic of the robotic vacuum that you previously modeled. In that project, the robot could drive in two modes: docking or vacuuming. The robot’s instructions for each of these modes were:
(正如您刚刚学到的,在Stateflow模型中使用层次结构可以帮助您使用通用功能对状态进行分组。在这个项目中,您将使用层次结构来建模类似于您之前建模的机器人真空的驱动逻辑的东西。在该项目中,机器人可以以两种模式驱动:对接或抽真空。机器人对每种模式的指示如下:)

SeekDock – drive to the dock and then stop.(SeekDock–行驶至码头,然后停车。)

Vacuum – drive to the corner of the room and then follow a zig-zag pattern.(吸尘器——开到房间的角落,然后按照Z字形行驶。)

Thus, the robot required two driving behaviors: drive to a location and follow a zig-zag pattern. These can be implemented as the top-level states in a hierarchy. The substates for each are the particular states required to implement each behavior. For example, when driving to a location, the robot’s motion can be broken down into: orient using pure rotation, drive using pure translation, and stop.
(因此,机器人需要两种驾驶行为:驾驶到一个位置和遵循Z字形模式。这些可以实现为层次结构中的顶级状态。每个的子状态是实现每个行为所需的特定状态。例如,当行驶到一个位置时,机器人的运动可以分解为:使用纯旋转进行定向,使用纯平移进行驱动,以及停止。)
在这里插入图片描述
Project
In this project, you will implement a driving pattern in which the robot can either dock or drive a random pattern around the room. (Many early or discount models of robotic vacuums follow a random pattern, which is simple to implement, although less efficient than using a map.) Thus, DriveToLocation and RandomDrive are two superstates. Your Stateflow chart will also have a TaskComplete state in which no further driving commands are sent.
(在这个项目中,你将实现一种驱动模式,在这种模式下,机器人可以停靠或驱动房间周围的随机模式。(许多早期或折扣型号的机器人真空吸尘器都遵循随机模式,这很容易实现,尽管效率不如使用地图。)因此,DriveToLocation和RandomDrive是两种超级状态。您的状态流程图也将处于TaskComplete状态,在该状态下不会发送进一步的驱动命令。)
在这里插入图片描述
As with the Robot Vacuum Supervisory Control project, the driving dynamics of the robotic vacuum have been built in Simulink. You will connect simulated sensor data and other information from this model to your Stateflow chart in order to set the desired velocity and angular velocity commands to be sent to the robot.
(与机器人真空监控项目一样,在Simulink中建立了机器人真空的驱动动力学。您将此模型中的模拟传感器数据和其他信息连接到状态流程图,以便设置要发送到机器人的所需速度和角速度命令。)在这里插入图片描述
You will build this model in two parts. In Part 1, you will define the high-level structure of the driving mode logic. Then, in Part 2, you will fill in the implementation details and connect the Stateflow chart to Simulink.
(您将分两部分构建此模型。在第1部分中,您将定义驾驶模式逻辑的高级结构。然后,在第2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值