Your task is to design and implement a system for controlling a Mars rover – a wheeled robot for planetary exploration. The rover will be able to drive around on the planet’s surface, and will have a communications antenna, a camera, and tools for soil analysis.
There is no need for any user interface (in the conventional sense). The rover will perform tasks based on signals transmitted from mission control on Earth. For efficiency (since the signals will take several minutes to travel between planets), the rover is intended to work semi-autonomously. Specifically, mission control on Earth will send lists of tasks to be completed by the rover, one after another.
Each list of tasks will be identified by a unique integer, sent from Earth along with the tasks themselves. These are the possible tasks that the rover will need to carry out:
• Turn qdegrees clockwise (where -180<= q<=180).
• Drive x metres forward (where -100m <= x <=100m).
• Take a soil sample and analyse.
• Take a photo.
• Execute task list i(wherei is the identifying number of any previous list of tasks). In this case, the rover must simply perform all tasks on that previous task list as if they appeared in the current list.
These tasks may occur in any order, and be repeated any number of times.
After each task is complete, the rover must send back a message to Earth. For turning and driving, the return message simply indicates success or failure. For soil analysis and photo taking, the return message will embed the result of that activity.
Each task must not be started until the previous task is complete. If the rover encounters a mechanical fault during one of the tasks (see the next section), the rest of the tasks in the list should be abandoned.
It is possible that a new list of tasks will be received before an existing list is completed.
When this happens, the tasks on the new list must be delayed until all previous lists have been completed or abandoned.
Existing Classes
Make sure you understand all this before you start designing anything!
The following classes are provided for you. (More accurately, you’re going to pretend that they’ve been provided for you.) You may assume that equivalent Python and
C++ classes exist as well.
IMPORTANT: You are not allowed to change anything within any of the following classes. Except for translating them into Python/C++ (if desired), you must use them strictly as they are in your design. (If you fail to heed this, you will certainly lose marks.)
These classes work asynchronously. They contain non-abstract methods for performing specific tasks. These methods will return before the task (driving, analysing, etc.) is finished. The task itself will continue in parallel while your code is running (“in the background”, if you prefer to think of it that way). The classes also contain abstract methods, which will be called from some private method within the class (not shown) when one of several things happens that your system must handle.
相关推荐
java-msn机器人代码.doc
Java星球大战,源码,达内
点线星球机器人手臂背景的AI人工智能PPT模板,共24页; PPT模板封面,使用了点线虚拟星球和机器人手臂PPT背景图片。中间填写AI人工智能PPT标题。界面充满科技感。 PowerPoint模板内容页,由紫色2.5D幻灯片图表,搭配...
科技PPT模板蓝色星球与机器人背景的AI人工智能PPT模板
一个非常不错的游戏,星球大战,音效也很好。全屏的。 包含系统设计的类图。 很适合应付课程项目~~~
揭秘《星球大战》机器人BB-8技术原理doc,提供“揭秘《星球大战》机器人BB-8技术原理”免费资料下载,本文介绍了机器人BB-8技术原理、以及其构造等内容,可供大家对机器人BB-8进行了解。
点线星球机器人手臂背景的AI人工智能PPT模板.pptx
对可重构星球探测机器人在运动模式下完成对接的两种姿态进行了比较,分别用一般方法和改进后的规划方法计算出了对接工作空间,比较结果说明,机器人在运动模式下三角边着地有利于完成自动对接。对工作模式机器人在...
本魔方机器人是通过颜色传感器辨识魔方各个面,之后通过单片机处理运算,达到解决魔方的问题
可重构模块星球机器人系统由母体和多个子机器人模块组成,单个模块可以独立运动和操作,多个模块可以重构组合成不同构形,模块采用非对称式轮手一体机构,具有姿态方位性和运动方向性,重构目的是组成在某种环境下更...
梦幻星球科技风3D建模可编辑PPT模板内含字体太空通信技术科幻高端大气,粒子背景光点背景电子相册ppt模板倒计时背景卡通星球星球背景ppt背景模板蓝色星球背景卡通星球背景背景模板PPT星球ppt模板党员会议ppt背景模板...
java模拟太阳系行星运动源码
java编写的太阳系星球动画程序,可直接运行
科技PPT模板机器人与宇宙星球背景的人工智能主题PPT模板
java2D做的星际大战 可以简单运行 攻击 采矿。安装java环境之后可以直接运行
HTML5+GSAP实现的星球大战中BB8机器人逃亡动画效果源码
面向星球探测的轮腿式多足机器人群体系统通信机制研究,路艳玲,刘炳尧,作为多机器人应用领域的研究热点,关于星球探测多机器人系统的研究得到了广泛关注,尤其是Ad Hoc网络通信技术的发展,更是极大的促
Java安全漫谈-知识星球代码审计
对蚁群算法中蚂蚁的个体行为进行改进, 解决了星球表面复杂环境下探测机器人的路径规划问题.在个体行为中加入目标导向行为, 惯性行为和沿障碍行走行为, 并进行加权融合, 改进了传统的ACO 算法,提高了算法的智能,保证...