然后说一下这个,Robotics-toolbox-matlab tutorial

Download :

git clone https://github.com/petercorke/robotics-toolbox-matlab.git

1 Overview

该工具箱利用了MATLAB的固有功能(线性代数,可移植性,图形),为MATLAB提供了特定于机器人技术的功能。

工具箱使用一种非常通用的方法将串行链接操纵器的运动学和动力学表示为MATLAB对象–用户可以为任何串行链接操纵器创建机器人对象,并为Kinova的知名机器人提供了许多示例,Universal Robotics,Rethink以及Puma 560和Stanford手臂等经典机器人。该工具箱还支持具有以下功能的移动机器人:机器人运动模型(单轮脚踏车,自行车),路径规划算法(距离变换,D *,PRM),运动学规划(晶格,RRT),本地化(EKF,粒子过滤器),地图建立(EKF),同时定位和地图绘制(EKF),以及非完整车辆的Simulink模型。工具箱还包括用于四旋翼飞行机器人的详细Simulink模型。

2 Example

Example 1 puma560 :

>> mdl_puma560

p560

>> p560

p560 =

Puma 560 [Unimation]:: 6 axis, RRRRRR, stdDH, fastRNE

– viscous friction; params of 8/95;

+—+———–+———–+———–+———–+———–+

| j | theta | d | a | alpha | offset |

+—+———–+———–+———–+———–+———–+

| 1| q1| 0| 0| 1.5708| 0|

| 2| q2| 0| 0.4318| 0| 0|

| 3| q3| 0.15005| 0.0203| -1.5708| 0|

| 4| q4| 0.4318| 0| 1.5708| 0|

| 5| q5| 0| 0| -1.5708| 0|

| 6| q6| 0| 0| 0| 0|

+—+———–+———–+———–+———–+———–+

>> p560.fkine([0 0 0 0 0 0]) % forward kinematics

ans =

1 0 0 0.4521

0 1 0 -0.15

0 0 1 0.4318

0 0 0 1

mdl_puma560

p = [0.8 0 0];

T = transl(p) * troty(pi/2);

qr(1) = -pi/2;

qqr = p560.ikine6s(T, ‘ru’);

qrt = jtraj(qr, qqr, 50);

plot_sphere(p, 0.05, ‘y’);

p560.plot3d(qrt, ‘view’, ae, ‘movie’, ‘move2ball.gif’);

Example2: Quadrotor animation

>> sl_quadrotor

Example 3

Mobile robot animation

q0 = [0 0 0]’; % initial configuration [x y theta]

qf = [0 0 pi]’; % final configuration

maxcurv = 1/5; % 5m turning circle

rs = ReedsShepp(q0, qf, maxcurv, 0.05)

% set up a vehicle model for animation

[car.image,~,car.alpha] = imread(‘car2.png’);

car.rotation = 180; % degrees

car.centre = [648; 173]; % pix

car.length = 4.2; % m

% setup the plot

clf; plotvol([-4 8 -6 6])

a = gca;

a.XLimMode = ‘manual’;

a.YLimMode = ‘manual’;

set(gcf, ‘Color’, ‘w’)

grid on

a = gca;

xyzlabel

% now animate

plot_vehicle(rs.path, ‘model’, car, ‘trail’, ‘r:’, ‘movie’, ‘3point.gif’);

3 Install from shared MATLAB Drive folder

This will work for MATLAB Online or MATLAB Desktop provided you have MATLAB drive setup.

  1. Click on the appropriate link below and an invitation to share will be emailed to the address associated with your MATLAB account:
  1. Accept the invitation.
  2. A folder named RVC1 or RVC2 will appear in your MATLAB drive folder.
  3. Use the MATLAB file browser and navigate to the folder RVCx/rvctools and double-click the script named startup_rvc.m

Other Toolbox

推荐书籍

4 Hands-on and Blogs

正文完