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星球大战》是一个以Java编程语言为背景的项目,旨在通过模拟星球大战的场景,帮助学习者深入理解和掌握Java编程技术。这个项目可能包含了游戏逻辑、对象模型、多线程、网络通信等多个方面的编程实践,是提升...
这篇文档涉及的是一个Java编程项目,用于创建一个MSN(Microsoft Messenger)机器人。这个机器人能够接收和处理MSN Messenger上的消息,并且具有与数据库交互的能力。以下是关键知识点的详细说明: 1. **MSN ...
点线星球机器人手臂背景的AI人工智能PPT模板,共24页; PPT模板封面,使用了点线虚拟星球和机器人手臂PPT背景图片。中间填写AI人工智能PPT标题。界面充满科技感。 PowerPoint模板内容页,由紫色2.5D幻灯片图表,搭配...
类图是UML(统一建模语言)中的一种图形表示,它展示了类之间的关系,包括继承、关联、依赖等。在Java中,这些类可能包含私有变量来存储状态信息,以及公共方法来实现交互逻辑。例如,`Player`类可能包含位置、生命...
### 魔方机器人的关键技术知识点 #### 一、魔方机器人的定义及工作原理 魔方机器人是一种能够自动识别并解决魔方问题的智能设备。它主要通过颜色传感器识别魔方各面上的颜色分布,然后将这些信息传输给单片机进行...
揭秘《星球大战》机器人BB-8技术原理doc,提供“揭秘《星球大战》机器人BB-8技术原理”免费资料下载,本文介绍了机器人BB-8技术原理、以及其构造等内容,可供大家对机器人BB-8进行了解。
本篇内容主要围绕着“蓝色星球与机器人背景的AI人工智能PPT模板”,探讨了人工智能在科技领域的应用及展示方式。人工智能是当前科技发展的重要趋势,它涵盖了机器学习、深度学习、自然语言处理等多个子领域,正在...
对可重构星球探测机器人在运动模式下完成对接的两种姿态进行了比较,分别用一般方法和改进后的规划方法计算出了对接工作空间,比较结果说明,机器人在运动模式下三角边着地有利于完成自动对接。对工作模式机器人在...
知识星球JavaGuide面试大全,包括大厂面试题,万字总结java面试题和答案(1),Java多线程,Java基础,java虚拟机,北京-百度-Java中级,北京-京东-Java中级,操作系统,杭州-阿里云-Java中级,计算机网络,数据结构与算法,数据库...
可重构模块星球机器人系统由母体和多个子机器人模块组成,单个模块可以独立运动和操作,多个模块可以重构组合成不同构形,模块采用非对称式轮手一体机构,具有姿态方位性和运动方向性,重构目的是组成在某种环境下更...
梦幻星球科技风3D建模可编辑PPT模板内含字体太空通信技术科幻高端大气,粒子背景光点背景电子相册ppt模板倒计时背景卡通星球星球背景ppt背景模板蓝色星球背景卡通星球背景背景模板PPT星球ppt模板党员会议ppt背景模板...
Java模拟太阳系行星运动源码是一个编程项目,它利用Java语言来再现天文学中的行星运动规律,这通常涉及到牛顿的万有引力定律和开普勒三定律。在这个项目中,开发者通过编程来创建一个虚拟的太阳系模型,使得用户可以...
R2-D2是《星球大战》系列电影中的一个机器人角色,而T-800则可能是指《终结者》系列电影中的终结者机器人。这些内容可能用来说明机器人在文化作品中的形象和影响。由于文档的内容经OCR扫描后存在识别错误,以下将以...
这些机器人主要面向非结构化或者特殊地形环境,例如沙漠、山地、战场以及外星球表面等。根据不同地形特点与移动需求,研究者们设计出多种类型的移动机器人,它们各有特点和适应场景。 1. 腿式移动机器人: 腿式移动...
对于未来月球探测机器人来说,地形建模的准确度直接关系到机器人是否能够识别复杂的地形和障碍,从而作出正确的避障决策。 最后,避障控制作为研究的核心问题,需要结合机器学习和深度学习等先进技术,以使机器人...
它们可以协助进行危险的任务,如修复卫星、建立和维护空间站、执行太空行走,甚至探索其他星球。同时,空间机器人可以进行长时间、精确的操作,减少宇航员的暴露风险,节省资源,提高任务效率。 综上所述,空间...
但请注意,人工智能并不等同于好莱坞电影中所描绘的几乎等同于人类的机器人,如《银河系漫游指南》中的偏执机器人Marvin或《星球大战》中的C-3PO。 聊天机器人原理的核心在于自然语言处理(Natural Language ...
这类机器人模仿自然界中的生物体,不仅具备高度的灵活性和适应性,还能完成人类难以涉足的任务,例如星球探测、深海探索、灾难救援和反恐行动等。本文旨在总结当前仿生机器人的研究现状和发展趋势,重点介绍地面仿生...
《Java实现的星际大战游戏详解》 在编程世界中,Java以其跨平台的特性、丰富的类库和强大的性能,成为了开发各种类型应用的热门选择,包括游戏开发。本篇文章将详细解析一个用Java 2D图形库制作的“星际大战”游戏...