Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Robot models

Peter Corke edited this pageJun 16, 2020 ·1 revision

MATLAB

The RTB foldermodels contains files namedmdl_ROBOT.m whereROBOT is the name of a particular robot, eg.mdl_puma560.m. Themdl_ prefix is redundant but is a hangover from when there were fewer models and they all lived in the top-level folder.

There are two formats of these files:

  • old style is a script that creates a variable ofSerialLink type as well as some other variables which define some joint configurations, typically at leastqz which is a vector of zeros of the appropriate length. Limitations of this format:
    • the variable name is predefined in the script, the user cannot choose it
    • the joint configuration variables can clash if multiple robot models are loaded and used simultaneously
  • new style is a function that can:
    • return theSerialLink object to a user-specified variable. The joint configurations are defined within theSerialLink object as dynamic properties, eg.p560.qz.
    • write to the Base workspace if no output arguments are given, for backward compatibility with old-style scripts.

Python

Propose that every robot has its own fileROBOT.py in the foldermodels. Each file defines a class which subclassesSerialLink and provides the appropriate initialisation.

ROBOT.py:

import roboticstoolboxclass ROBOT(SerialLink):    def __init(self):        # create the links and add them        # set up configurations, eg.        self.qz = [0, 0, 0, 0, 0, 0]

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp