Following my last post I've now got two dynamixels working on the same network with Matlab. The flexibility of these servos means that one can be used just as a position sensor. This lets you do some cool stuff, like this simple tracking controller, where one servo follows the other. This is known as a master / slave network. The moving one is the slave as it obeys the master.
To make this work you need to set the ID of each dynamixel differently. This is obvious, but without the Dynamixel Wizard from Robotis (which didn't work on my machine) I had a hard time trying to figure out how to make this happen. In the end I discovered that by using the following command with an ID of 254 you can broadcast a new ID to every servo on the network.
(calllib('dynamixel','dxl_write_byte',254,3,new_ID))
So, just connect one servo to the network and broadcast it a new ID!
The Matlab source code for the master slave demo can be downloaded here.
IMPORTANT! - You won't feel the forces from the slave servo on the master. Do not stick your finger or anything else in the way to check!
Friday, 11 March 2011
Dynamixel Master / Slave network with Matlab
Labels:
drawing robot,
dynamixel,
example,
master slave,
Matlab,
RX28,
servo,
source
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment