matlab 代码主要实现了一个机器人动力学相关的计算,涉及到机器人连杆的定义、关节参数的初始化,以及通过正向和反向运动学的计算来分析机器人的运动状态

clear functions 
close all
clear all

addpath ../mr

global link ToRad ToAngle

ToRad = pi/180;
ToAngle = 180/pi;

link(1).name = 'link1'; link(1).child = 2; link(1).mother = 0;
link(2).name = 'link2'; link(2).child = 3; link(2).mother = 1;
link(3).name = 'end_effector'; link(3).child = 0; link(3).mother = 2;

%% define the screw axis of each joint
% In this case, there are 2 joints. Both are the rotation about z axis.
N = 3;
link(1).ScrewAxis = [0 0 1 0 0 0]'; % [angular_velocity linear_velocity]'
link(2).ScrewAxis = [0 0 1 0 0 0]';
link(3).ScrewAxis = [0 0 0 0 0 0]';


%% joint realtive position (relative to parent)

link(1).b = [0 0 0]';
link(2).b = [0 0 1]';
link(3).b = [0 0 1]';

%% mass of each link

link(1).m = 1;
link(2).m = 1;
link(3).m = 0;

%% CoM positioin

link(1).c = [0 0 0.5]';
link(2).c = [0 0 0.5]';
link(
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值