CS 770/870 draw and control this robot

CS 770/870 Assignment 4

•  Due: Thursday, Oct. 3rd

•  Late penalty: Fri: -5, Sat/Sun/Mon: -10, Tue: -20 Wed: -50 Thu: -100

Write a program to draw and control this robot:

Figure 1: .

Specifications

The robot has the following body parts:

PART

COLOR

SHAPE

base

beige

box, 2x2x2

piston

green

cylinder, r=1,h=2

ball

orange

sphere,r=1

torso

beige

box, 2x1x4

head

beige

cylinder, r=0.75,h=1

eyes

red,blue

sphere, r=0.2

shoulder & elbow joints

green

cylinder, r=0.5,h=1

arm bones

beige

box, 1x1x2

The base of the robot should positioned with its center at (0 0 0).

The piston initially sits inside the base, and can be raised out of it. It can also turn.

The ball is attached to the top of the piston, and tilts forward/backward. The torso is attached to the sphere, and moves with it.

The head is linked to the torso. It can turn up/down (like a“yes”gesture) or le什/right (like a“no”gesture). The eyes are fixed to the head.

The shoulder joints are attached to the torso, and turn outward (so the upper arms move away from the body). The upper arms are attached to the shoulder joints.

The elbow joints are attached to the upper arms, and turn so that the elbows bend as human elbows do. The lower arms are attached to the elbow joints.

Controls

I am providing code, including a primitive keyboard-driven interface for adjusting the figure’s parameters. It uses these

keys:

•  K : next parameter (shi什-K to go to LAST parameter)

•  J : previous parameter (shi什-J to go the FIRST parameter)

•  I : increase current parameter (shi什-I to set to its maximum value)

•  M : decrease current parameter (shi什-M to set to its minimum value)

•  SPACE : show the state of all the parameters.

These are implemented in robot_controller .cpp, robot_view .cpp, and scene_parameters .cpp. You can also control the camera:

•  UP/DOWN   arrow: move eye up/down, keeping look-at point fixed

•  LEFT/RIGHT   arrow : move eye le什/right, keeping look-at point fixed

•  Shift  UP/DOWN  arrow: move eye forward/backward. Finally, you can toggle flags in the Robot_View class:

•  S : show/hide the body parts

•  G : show/hide the reference grid

•  B : show/hide the basis vectors

Your Tasks

1.  [45 points] Implement the Shape_Maker::cylinder(float n_slats ) method, in the file shapes.cpp. This should return a Mesh* with three Vertex_Array* parts: the base, the top, and the round sides of a cylinder (it currently returns a cube!).

The cylinder has radius 1, has its axis along the z axis, and extends from z=-1 to z=+1. The round sides should be approximated by n_slats vertical rectangles, stored in a GL_TRIANGLE_STRIP. The top and bottom are each a corresponding polygon with n_slats sides, stored in a GL_TRIANGLE_ FAN.

2.  [55 points] The draw_ robot () function in robot_view .cpp currently draws the torso and le什 upper arm of the figure. Extend it to draw all the parts.

Turn in Your Work

When you are done, go to mycourses.unh .edu, find CS770/870 assignment 4,click the“Submit”button, and upload robot_view .cpp and shapes.cpp. If you modified any other files, upload them too.

【四轴飞行器】非线性三自由度四轴飞行器模拟器研究(Matlab代码实现)内容概要:本文围绕非线性三自由度四轴飞行器的建模与仿真展开,重点介绍了基于Matlab的飞行器动力学模型构建与控制系统设计方法。通过对四轴飞行器非线性运动方程的推导,建立其在三维空间中的姿态与位置动态模型,并采用数值仿真手段实现飞行器在复杂环境下的行为模拟。文中详细阐述了系统状态方程的构建、控制输入设计以及仿真参数设置,并结合具体代码实现展示了如何对飞行器进行稳定控制与轨迹跟踪。此外,文章还提到了多种优化与控制策略的应用背景,如模型预测控制、PID控制等,突出了Matlab工具在无人机系统仿真中的强大功能。; 适合人群:具备一定自动控制理论基础和Matlab编程能力的高校学生、科研人员及从事无人机系统开发的工程师;尤其适合从事飞行器建模、控制算法研究及相关领域研究的专业人士。; 使用场景及目标:①用于四轴飞行器非线性动力学建模的教学与科研实践;②为无人机控制系统设计(如姿态控制、轨迹跟踪)提供仿真验证平台;③支持高级控制算法(如MPC、LQR、PID)的研究与对比分析; 阅读建议:建议读者结合文中提到的Matlab代码与仿真模型,动手实践飞行器建模与控制流程,重点关注动力学方程的实现与控制器参数调优,同时可拓展至多自由度或复杂环境下的飞行仿真研究。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值