# Foundations-of-Robotics-NYU
This repository includes the final project as part of the Foundations of Robotics course by Prof William Peng at NYU.
The objective of the project is to explore and implement key robotics concepts, focusing on the kinematics, visualization and dynamics of David Bowen’s Plant Machete robot. The resemblance, especially in terms of the six degrees of freedom and the physical design of the links, guided our decision to model our project on the Ufactory Xarm 6.
We implemented our project, utilizing MATLAB as our primary tool for executing the tasks of the project, which included the development of forward kinematics, inverse kinematics, pose visualization, application of the Jacobian method in both inverse kinematics and inverse dynamics, and workspace visualization.
## Visualization:
Robotic Systems Toolbox is used in this code for visualizing the robot poses. The 3D model of the robot is stored in the Xarm6_description folder, which also contains other information such as the location and types of joints of the robot. The robot model is imported to MATLAB using the importrobot() function with the path to the .xacro file ( "Xarm6_description/urdf/Xarm6.xacro") as the input. DataFormat parameter to the importrobot function is set to “row” for easier handling of the visualization code. The imported model, stored in the variable ‘m6r’, is then passed as a parameter to the show() function along with the joint angles vector for displaying the robot pose.
<img width="515" alt="image" src="https://github.com/Santoshsrini/Foundations-of-Robotics-NYU/assets/28926309/61779091-1101-4249-a136-77720db2546e">
## Forward Kinematics:
The fwd_kin function computes the positions of the origins of link frames and the end-effector frame for given joint angles. Also, it produces a visual representation of the corresponding pose of the robot.
Input: 1*6 array of joint angles
Output: Position of joints (px, py,pz) and end effector position
<img width="529" alt="image" src="https://github.com/Santoshsrini/Foundations-of-Robotics-NYU/assets/28926309/02200acb-6ef4-4334-b4ec-f4cc865711f4">
## Inverse Kinematics:
Inverse kinematics calculates the joint parameters needed to achieve a specific position and orientation of the end effector. The joint parameters are computed by solving equations that are obtained by equating the forward kinematics model of the manipulator to the desired end effector position and orientation using fsolve optimisation.
Input: A 1x6 array containing end effector position in cm and moving XYZ Euler angles in radians
Output: Joint angles if solution is found, else the message “Given position and orientation is not attainable”. The corresponding robot pose is also displayed if a solution is found.
<img width="499" alt="image" src="https://github.com/Santoshsrini/Foundations-of-Robotics-NYU/assets/28926309/78565ae5-67f6-49dd-bd50-bfa9e19a8ea5">
## Inverse Kinematics with Jacobian:
The joint_vel function calculates the joint angular velocities (qd) of a robotic arm for a given end effector position (pos) and velocity (vel). It first obtains the Jacobian matrix as a function using Jacob(), and then determines the joint angles corresponding to the specified end effector position using inv_kin(pos). If the position is reachable and not at a singular point (where the Jacobian determinant is not zero), the function computes the joint velocities by inverting the Jacobian and multiplying it with the end effector velocities (vel). If the position is unreachable or a singular point, the function displays an appropriate message and exits.
Input: 1*6 array containing end effector position and XYZ Moving Euler angles and 1*6 array containing end effector linear and angular velocity
Output: 1*6 array containing Joint angular velocities
<img width="505" alt="image" src="https://github.com/Santoshsrini/Foundations-of-Robotics-NYU/assets/28926309/483a4404-2af6-4b5d-8a16-bcca565fb7b8">
## Inverse Dynamics with Jacobian:
The function joint_torques computes the joint torques (F) for a given end effector position , orientation and external forces/moments acting on it. It first derives the joint angles for the specified position and orientation using inv_kin(pos) and then obtains the Jacobian matrix using the Jacob() function. The function checks for reachability of the position and singularity (where the Jacobian determinant is zero). If the position is reachable and non-singular, it calculates the joint torques by multiplying the transpose of the Jacobian with the negative of the external forces/moments.
Input: 1*6 array containing end effector position and XYZ Moving Euler angles and 1*6 array containing force and moment at the end effector
Output: 1*6 array containing Joint Torques
<img width="518" alt="image" src="https://github.com/Santoshsrini/Foundations-of-Robotics-NYU/assets/28926309/07113e17-9a51-48bd-bf28-6b56fcab33e5">
没有合适的资源?快使用搜索试试~ 我知道了~
纽约大学机器人基础matlab代码.zip
共32个文件
m:9个
stl:7个
launch:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 8 浏览量
2024-05-18
14:28:42
上传
评论
收藏 5.33MB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
纽约大学机器人基础matlab代码.zip (32个子文件)
纽约大学机器人基础matlab代码
Foundations-of-Robotics-NYU-main
Project Q.pdf 194KB
FOR Project Report.pdf 3.17MB
README.md 5KB
FOR Project
Xarm6_description
.DS_Store 6KB
CMakeLists.txt 7KB
urdf
materials.xacro 187B
Xarm6.trans 3KB
Xarm6.gazebo 1KB
Xarm6.xacro 7KB
LICENSE 1KB
package.xml 3KB
meshes
link3_1_1_1.stl 454KB
link5_1_1_1.stl 663KB
link1_1_1_1.stl 324KB
link4_1_1_1.stl 1.22MB
link2_1_1_1.stl 1.97MB
base_link.stl 146KB
end_effector_1_1_1.stl 119KB
launch
gazebo.launch 527B
display.launch 636B
urdf.rviz 11KB
controller.launch 641B
controller.yaml 1KB
PlotWorkspace.m 1KB
Jacob.m 303B
Tn.m 266B
joint_torques.m 591B
inv_kin.m 1KB
fwd_kin.m 441B
joint_vel.m 593B
T.m 342B
Manipulator_6R.m 2KB
共 32 条
- 1
资源评论
matlab科研助手
- 粉丝: 2w+
- 资源: 2698
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功