⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simuladorcs.asv

📁 是一个在matlab下的机器人运动仿真的软件
💻 ASV
字号:
function varargout = SimuladorCs(varargin)
% SIMULADORCS M-file for SimuladorCs.fig
%      SIMULADORCS, by itself, creates a new SIMULADORCS or raises the existing
%      singleton*.
%
%      H = SIMULADORCS returns the handle to a new SIMULADORCS or the handle to
%      the existing singleton*.
%
%      SIMULADORCS('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in SIMULADORCS.M with the given input arguments.
%
%      SIMULADORCS('Property','Value',...) creates a new SIMULADORCS or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before SimuladorCs_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to SimuladorCs_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Copyright 2002-2003 The MathWorks, Inc.

% Edit the above text to modify the response to help SimuladorCs

% Last Modified by GUIDE v2.5 04-Jan-2007 21:25:14

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @SimuladorCs_OpeningFcn, ...
                   'gui_OutputFcn',  @SimuladorCs_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before SimuladorCs is made visible.
function SimuladorCs_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to SimuladorCs (see VARARGIN)
set(handles.figure1,'Color',[0.16 0.2117  0.36]);

[a,map,b]=imread('_Cylindrical.JPG');
set(handles.NomeSumulador,'CData',a);

[a,map,b]=imread('_Iniciar.JPG');
set(handles.pbiniciar,'CData',a);
set(handles.pbjacobiano,'CData',a);
set(handles.pbtrajectoria,'CData',a);
[a,map,b]=imread('_Rodar_Off.JPG');
set(handles.tbrodar,'CData',a);
[a,map,b]=imread('_Reset_.JPG');
set(handles.pbrestaurar,'CData',a);
[a,map,b]=imread('_Zoom_Off.JPG');
set(handles.tbzoom,'CData',a);
[a,map,b]=imread('_Cursor_Off.JPG');
set(handles.tbDataCursor,'CData',a);
[a,map,b]=imread('Guardar_.JPG');
set(handles.pbGuarda,'CData',a);
[a,map,b]=imread('Apagar_.JPG');
set(handles.pbDEL,'CData',a);
[a,map,b]=imread('Guardar_Dados.JPG');
set(handles.GuardaDados,'CData',a);
[a,map,b]=imread('Ler_Dados.JPG');
set(handles.LerDados,'CData',a);


set(hObject, 'Units', 'pixels');
handles.isec = imread( 'isec','jpeg'); % Read the image file banner.jpg
info = imfinfo('isec','jpeg'); % Determine the size of the image file
%position = get(hObject, 'Position');
%set(hObject, 'Position', [position(1:2) info.Width + 100 info.Height + 100]);
axes(handles.axes7);
axis off;
image(handles.isec)
set(handles.axes7, ...
    'Visible', 'off', ...
    'Units', 'pixels');%,...

set(hObject, 'Units', 'pixels');
handles.robotimagem = imread( 'robotimagem','jpeg'); % Read the image file banner.jpg
info = imfinfo('robotimagem','jpeg'); % Determine the size of the image file
%position = get(hObject, 'Position');
%set(hObject, 'Position', [position(1:2) info.Width + 100 info.Height + 100]);
axes(handles.axes8);
axis off;
image(handles.robotimagem)
set(handles.axes8, ...
    'Visible', 'off', ...
    'Units', 'pixels');%,...

% set(hObject, 'Units', 'pixels');
% handles.fundo = imread( 'fundo','JPEG'); % Read the image file banner.jpg
% info = imfinfo('fundo','JPEG'); % Determine the size of the image file
% %position = get(hObject, 'Position');
% %set(hObject, 'Position', [position(1:2) info.Width + 100 info.Height + 100]);
% axes(handles.fundoaxes);
% axis off;
% image(handles.fundo)
% set(handles.fundoaxes, ...
%     'Visible', 'off', ...
%     'Units', 'pixels');%,...
%     %'Position', [50 50 info.Width info.Height]);






%set(gca,'XDir','rev','YDir','rev','ZDir','rev') %muda a parte positiva com a negativa
%set(handles.axes1,'XAxisLocation','bottom');

% Choose default command line output for SimuladorCs
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);

       

axes(handles.axes1);
axis on
axis([-100 100 -100 100 -100 100]);     %%%%%%%%tem-se de por
% UIWAIT makes SimuladorCs wait for user response (see UIRESUME)
% uiwait(handles.figure1);
          

Iniciar_variaveis;    %%%%%%%%inicia variaveis
Inicia_Matriz_Objecto; %%%%%%%%%%%%Iniciar todas as matirzes referentes as faces dos objectos

Desenha_robo(hObject, eventdata,handles); %%Matlab 7.3
%%SimuladorCs('Desenha_robo',hObject, eventdata,handles);%%Matlab /7.1

set(handles.editteta1,'String','0');
set(handles.editteta4,'String','90');
set(handles.editteta5,'String','0');
set(handles.editteta6,'String','0');
set(handles.editd2,'String','90');
set(handles.editd3,'String','125');
set(handles.textd2,'String',get(handles.editd2,'String'));
set(handles.textd3,'String',get(handles.editd3,'String'));
set(handles.textteta1,'String',get(handles.editteta1,'String'));
set(handles.textteta4,'String',get(handles.editteta4,'String'));
set(handles.textteta5,'String',get(handles.editteta5,'String'));
set(handles.textteta6,'String',get(handles.editteta6,'String'));
%%%%%%%%%%%%%%%Colocar acentos%%%%%%%%%%%%%%%%%%%%
set(handles.PX,'String','Posi玢o X');
set(handles.PY,'String','Posi玢o Y');
set(handles.PZ,'String','Posi玢o Z');
set(handles.rbcinemdirect,'String','Cinem醫ica Directa');
set(handles.rbcineminv,'String','Cinem醫ica Inversa');
set(handles.uipanelCineDirect,'Title','Cinem醫ica Directa');
set(handles.uipanel10,'Title','Traject髍ias');

set(handles.uipCinInv,'Title','Cinem醫ica Inversa');
set(handles.text28,'String','Posi玢o X =');
set(handles.text29,'String','Posi玢o Y =');
set(handles.text30,'String','Posi玢o Z =');
set(handles.uipanel7,'Title','Posi玢o Rob

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -