Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Matlab based robot controllers. How can it be developed?

Subject: Matlab based robot controllers. How can it be developed?

From: Srinivas Tennety

Date: 22 Apr, 2010 18:50:42

Message: 1 of 3

I have been working on developing mobile robot controllers using C++ and Java for quite some time. I want to start using MATLAB to take advantage of the toolboxes but I have a fundamental problem. I want three different threads/processes to run in parallel. One for collecting the sensor data, one thread for data analysis, one for sending control commands to the robot. I want these to be independent to each other.

I have read in the forums that MATLAB does not support threads. Is there a way around for this issue? I need at least two different threads. I only have one computer with intel core 2 duo processor at hand to control the robot.

Srinivas Tennety
srinivas.tennety@gmail.com

Subject: Matlab based robot controllers. How can it be developed?

From: Srinivas Tennety

Date: 24 Apr, 2010 18:08:05

Message: 2 of 3

It would be great if any robot researchers out here would comment on their experiences.

Thanks

"Srinivas Tennety" <srinivas.tennety@gmail.com> wrote in message <hqq5q2$ora$1@fred.mathworks.com>...
> I have been working on developing mobile robot controllers using C++ and Java for quite some time. I want to start using MATLAB to take advantage of the toolboxes but I have a fundamental problem. I want three different threads/processes to run in parallel. One for collecting the sensor data, one thread for data analysis, one for sending control commands to the robot. I want these to be independent to each other.
>
> I have read in the forums that MATLAB does not support threads. Is there a way around for this issue? I need at least two different threads. I only have one computer with intel core 2 duo processor at hand to control the robot.
>
> Srinivas Tennety
> srinivas.tennety@gmail.com

Subject: Matlab based robot controllers. How can it be developed?

From: Ashish Uthama

Date: 26 Apr, 2010 12:02:15

Message: 3 of 3

On Sat, 24 Apr 2010 15:08:05 -0300, Srinivas Tennety
<srinivas.tennety@gmail.com> wrote:

> It would be great if any robot researchers out here would comment on
> their experiences.
>
> Thanks
>
> "Srinivas Tennety" <srinivas.tennety@gmail.com> wrote in message
> <hqq5q2$ora$1@fred.mathworks.com>...
>> I have been working on developing mobile robot controllers using C++
>> and Java for quite some time. I want to start using MATLAB to take
>> advantage of the toolboxes but I have a fundamental problem. I want
>> three different threads/processes to run in parallel. One for
>> collecting the sensor data, one thread for data analysis, one for
>> sending control commands to the robot. I want these to be independent
>> to each other. I have read in the forums that MATLAB does not support
>> threads. Is there a way around for this issue? I need at least two
>> different threads. I only have one computer with intel core 2 duo
>> processor at hand to control the robot.
>> Srinivas Tennety
>> srinivas.tennety@gmail.com

There is no explicit threading control in MATLAB. You could use the
parallel computing toolbox to have 2 or more MATLAB sessions communicating
with each other.

I believe folks use callback functions / timers to run two conceptual
threads. One function might do the data acquisition while a callback
function might be set up to be triggered at fixed intervals or after a
fixed number of samples have been collected.


If you already have a C++/Java code base and are looking to use MATLAB for
specific data processing, I would suggest skimming through some sections
in the 'External interfaces' guide :
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/bp_kqh7.html

Or maybe even the builder products:
http://www.mathworks.com/products/javabuilder/

These are two ways that you could include MATLAB code/functionality into
existing C++/JAVA code.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us