Problem with control of Dynamixel AX-12A by using MatLab

조회 수: 7 (최근 30일)
Grigoriy Yashin
Grigoriy Yashin 2016년 10월 3일
답변: Alice James 2019년 7월 22일
I plan to work with Dynamixel AX-12A, which is connected to computer (Win64 with Windows 10) by USB2Dynamixel. I use information from Dynamixel SDK Manual ( item 4.6 ) for adding libraries in MatLab R2014a (it's files for DynamixelSDK-3.4.1), but when I run file "read_write.m", I got error:
Index exceeds matrix dimensions.
Error in
loadlibrary>getLoadlibraryCompilerConfiguration
(line 497)
compilerConfiguration=compilerConfiguration(1);
%unix machines return c and cpp
compilers here
Error in loadlibrary (line 253)
[thunk_build_fn,preprocess_command]=getLoadlibraryCompilerConfiguration(ccinclude,header,headername,compilerConfiguration);
Error in read_write (line 60)
[notfound, warnings] =
loadlibrary(lib_name,
'dynamixel_sdk.h', 'addheader',
'port_handler.h', 'addheader',
'packet_handler.h');
Also I tried to add library as it's written in ROBOTIS e-Manual v1.24.00 , but I have simular error. Could you help me with this problem?

답변 (2개)

Michael C.
Michael C. 2016년 10월 3일
I believe I ran into the same type of problem while trying to communicate with some Dynamixel servos. My solution was just to create a serial port object and then build up my own library around that since the Dynamixel communication is fairly straightforward and well documented. This is the start of it.
serialPort = serial('COM3','BaudRate',1000000,'Parity','none','DataBits',8,'StopBits',1,'Timeout',1);
fopen(serialPort);
I think this is the document I originally started with for building my code (see page 9) http://documents.mx/documents/dynamixel-ax12-matlab.html
I might try and pretty up and document some of my code and put it on the file exchange.
  댓글 수: 1
Grigoriy Yashin
Grigoriy Yashin 2016년 10월 14일
편집: Grigoriy Yashin 2016년 10월 14일
Thank you, but I found other solution. It was problem with compiler, which I solved by installing Microsoft Visual Studio Professional 2013. On some reason I couldn't use Microsoft Visual Studio 2015. Maybe you know how can I connect Dynamixel to MatLab by using special Arduino (Arduino with libraries for Dynamixel motors)?

댓글을 달려면 로그인하십시오.


Alice James
Alice James 2019년 7월 22일
Hi
How did you get it to work with visual studio?

카테고리

Help CenterFile Exchange에서 Converters (High Power)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by