Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

KHR-2 SDK?

KHR-1, KHR-2HV, KHR-3HV, ICS servos, RCB controllers and other Kondo products
3 postsPage 1 of 1
3 postsPage 1 of 1

KHR-2 SDK?

Post by AndrewF » Sun Nov 05, 2006 5:46 am

Post by AndrewF
Sun Nov 05, 2006 5:46 am

I am starting a robot lab and need to do update and query servo position 30 times per second over serial. The goal is to abstract away the details of the specific robot that is chosen, and AI algorithms will attempt to learn useful motor movements in a child developmental fashion. The idea is that these algorithms should work on any robot (similar to how mammal brains are similar to each other even though the body types are different).

From my research into the robots sold on this site, it appears that the KHR-1 is the only robot that supports position feedback and position setting at 30 times a second or more over serial (up to 200 times sec for khr-1, through sdk's released by members of these forums).

I have seen no report of an sdk for KHR-2. Is there an sdk or api for getting servo position and sending new positions at a reasonably high rate over serial?

AFAIK Bioloid has no such API yet (unless you write controller code), and RN-1 can only poll all servos about 2 times a second or so unless hardware hacking is attempted.

Am I right, KHR-1 is my only choice?
I am starting a robot lab and need to do update and query servo position 30 times per second over serial. The goal is to abstract away the details of the specific robot that is chosen, and AI algorithms will attempt to learn useful motor movements in a child developmental fashion. The idea is that these algorithms should work on any robot (similar to how mammal brains are similar to each other even though the body types are different).

From my research into the robots sold on this site, it appears that the KHR-1 is the only robot that supports position feedback and position setting at 30 times a second or more over serial (up to 200 times sec for khr-1, through sdk's released by members of these forums).

I have seen no report of an sdk for KHR-2. Is there an sdk or api for getting servo position and sending new positions at a reasonably high rate over serial?

AFAIK Bioloid has no such API yet (unless you write controller code), and RN-1 can only poll all servos about 2 times a second or so unless hardware hacking is attempted.

Am I right, KHR-1 is my only choice?
AndrewF
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Sat Nov 04, 2006 1:00 am

Post by limor » Mon Nov 06, 2006 4:34 am

Post by limor
Mon Nov 06, 2006 4:34 am

Hi Andrew, Welcome to the forum!

Hitec and Kondo servos are actuated using the old RC-servo style 50Hz 1-2ms PWM. They provide position feedback function that is activated by sending a short 100us pulse and waiting for a 1-2ms pulse returned from the servo.

Currently Kondo and Hitec robot controllers do not make use of this feature except for the "catch and play" function which allows the user to mold the robot into a pose and record the relative position of the servos (assisting in creating open-loop gaits). Some users have hacked the PC-Robot protocol and managed to get position streams (see past posts on this forum from someone in Japan who wrote a 3D simulator) but afaik not while the robot servos are applying torque.
Hitec and Kondo do not expose their firmware upgrade sequence and hence their controler firmware can not (easily) be modified to take advantage of the servos' position feedback for "realtime control".

-- In order to read servo position at 30hz from Kondo and Hitec servos, you may need to use an alternative controller board that is programmable and happens to have a whole lot of RC-servo pin-outs.


Robotis servos were designed for control research. Bioloid is the only kit that happily exposes everything about the servos, protocols, firmware etc.
The default firmware comes with three textual operation modes that are switcheable using the buttons on the CM5 enclosure.
Mode1: bootloader that allows for diagnostics and firmware upgrade
Mode2: servo parameter configuration mode
Mode3: protocol testing mode

You should be able to write a program on the PC that communicates with the CM5 when it is in Mode3; querry the servos and reposition the servos. The default baudrate of Mode3 is 57600bps. So if you need a frame rate of 30hz, you have about 1920 bytes per frame to send and receive data for each servo. ie: it can be done.

Obviously if you wish to write some Atmega code, you can replace the default firmware of the CM5, you may be able to do get much higher framerates. (I will be publishing some CM5 firmware code that does pretty much this kind of feedback control data exchange over the serial line for the Bioloid in the near future)


To conclude, the "easiest" way to get position data at 30hz while repositioning the servos in reaction to this data and potentially other sensory data is from a Bioloid.
Hi Andrew, Welcome to the forum!

Hitec and Kondo servos are actuated using the old RC-servo style 50Hz 1-2ms PWM. They provide position feedback function that is activated by sending a short 100us pulse and waiting for a 1-2ms pulse returned from the servo.

Currently Kondo and Hitec robot controllers do not make use of this feature except for the "catch and play" function which allows the user to mold the robot into a pose and record the relative position of the servos (assisting in creating open-loop gaits). Some users have hacked the PC-Robot protocol and managed to get position streams (see past posts on this forum from someone in Japan who wrote a 3D simulator) but afaik not while the robot servos are applying torque.
Hitec and Kondo do not expose their firmware upgrade sequence and hence their controler firmware can not (easily) be modified to take advantage of the servos' position feedback for "realtime control".

-- In order to read servo position at 30hz from Kondo and Hitec servos, you may need to use an alternative controller board that is programmable and happens to have a whole lot of RC-servo pin-outs.


Robotis servos were designed for control research. Bioloid is the only kit that happily exposes everything about the servos, protocols, firmware etc.
The default firmware comes with three textual operation modes that are switcheable using the buttons on the CM5 enclosure.
Mode1: bootloader that allows for diagnostics and firmware upgrade
Mode2: servo parameter configuration mode
Mode3: protocol testing mode

You should be able to write a program on the PC that communicates with the CM5 when it is in Mode3; querry the servos and reposition the servos. The default baudrate of Mode3 is 57600bps. So if you need a frame rate of 30hz, you have about 1920 bytes per frame to send and receive data for each servo. ie: it can be done.

Obviously if you wish to write some Atmega code, you can replace the default firmware of the CM5, you may be able to do get much higher framerates. (I will be publishing some CM5 firmware code that does pretty much this kind of feedback control data exchange over the serial line for the Bioloid in the near future)


To conclude, the "easiest" way to get position data at 30hz while repositioning the servos in reaction to this data and potentially other sensory data is from a Bioloid.
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

go here

Post by edmen » Mon Jan 29, 2007 9:11 pm

Post by edmen
Mon Jan 29, 2007 9:11 pm

edmen
Robot Builder
Robot Builder
Posts: 22
Joined: Sun Jan 28, 2007 1:00 am


3 postsPage 1 of 1
3 postsPage 1 of 1