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

C libraries

Korean company maker of Robot kits and servos designed for of articulated robots. Re-incarnation of Megarobotics.
10 postsPage 1 of 1
10 postsPage 1 of 1

C libraries

Post by Anding » Sun May 24, 2009 12:45 pm

Post by Anding
Sun May 24, 2009 12:45 pm

I'd like to program a robobuilder in C. I'm an experiened programmer and I also know the AtMega series quite well, but I don't have time to start right from the bottom up, implementing protocols, multitasking, etc.

Does the robobuilder come with a reasonable C library to call on for commanding the servos, reading the sensors, etc? How about the required multitasking RTOS - do you have to build (or find) your own, or can you stay with Robobuilder's own platform whilst developing in C?
I'd like to program a robobuilder in C. I'm an experiened programmer and I also know the AtMega series quite well, but I don't have time to start right from the bottom up, implementing protocols, multitasking, etc.

Does the robobuilder come with a reasonable C library to call on for commanding the servos, reading the sensors, etc? How about the required multitasking RTOS - do you have to build (or find) your own, or can you stay with Robobuilder's own platform whilst developing in C?
Anding
Newbie
Newbie
Posts: 5
Joined: Sun May 24, 2009 12:34 pm

Post by l3v3rz » Sun May 24, 2009 1:55 pm

Post by l3v3rz
Sun May 24, 2009 1:55 pm

Check out http://code.google.com/p/robobuilderlib/ Its an open source initiative to create a homebrew OS for Robobuilder.

cheers
Check out http://code.google.com/p/robobuilderlib/ Its an open source initiative to create a homebrew OS for Robobuilder.

cheers
l3v3rz
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by Anding » Sun May 24, 2009 3:09 pm

Post by Anding
Sun May 24, 2009 3:09 pm

Thanks, I appreciate the link but having looked there, it doesn't answer my question unfortunately - there is not much documentation.

What I am interested in at this stage is not an aftermarket operating systems, but what is supplied with the robot itself as part of the package. My question is: is it possible to program the robot "out of the box" in C using some reasonable high level libraries, or is high level programming really only accomplished with the supplied GUI tools?

Many thanks if anyone has information on this point.
Thanks, I appreciate the link but having looked there, it doesn't answer my question unfortunately - there is not much documentation.

What I am interested in at this stage is not an aftermarket operating systems, but what is supplied with the robot itself as part of the package. My question is: is it possible to program the robot "out of the box" in C using some reasonable high level libraries, or is high level programming really only accomplished with the supplied GUI tools?

Many thanks if anyone has information on this point.
Anding
Newbie
Newbie
Posts: 5
Joined: Sun May 24, 2009 12:34 pm

Post by PedroR » Tue May 26, 2009 5:17 pm

Post by PedroR
Tue May 26, 2009 5:17 pm

HI

In that case you may want to start here http://robosavvy.com/forum/viewtopic.php?t=3379

That's the base C code offered by Robobuidler and includes links to improved versions that interact with sensors.

There is not a formal library as coding in C is a very low level task.

The code in that sample lets you run motion files created/exported from MotionBuilder.
As I mentioned further contributions from the community added support for PSD sensor and Acc Sensor.

There are also other threads that discuss the wCK protocol to access other advanced functions in the servos.
HI

In that case you may want to start here http://robosavvy.com/forum/viewtopic.php?t=3379

That's the base C code offered by Robobuidler and includes links to improved versions that interact with sensors.

There is not a formal library as coding in C is a very low level task.

The code in that sample lets you run motion files created/exported from MotionBuilder.
As I mentioned further contributions from the community added support for PSD sensor and Acc Sensor.

There are also other threads that discuss the wCK protocol to access other advanced functions in the servos.
PedroR
Savvy Roboteer
Savvy Roboteer
Posts: 1199
Joined: Mon Jun 16, 2008 11:07 pm

Post by Anding » Wed May 27, 2009 4:07 pm

Post by Anding
Wed May 27, 2009 4:07 pm

Webmaster, would you please delete this thread. It was a waste of my time to ask the question and would be a waste of anyone else's time to read the replies.
Webmaster, would you please delete this thread. It was a waste of my time to ask the question and would be a waste of anyone else's time to read the replies.
Anding
Newbie
Newbie
Posts: 5
Joined: Sun May 24, 2009 12:34 pm

Post by i-Bot » Wed May 27, 2009 8:24 pm

Post by i-Bot
Wed May 27, 2009 8:24 pm

I hope this thread is not deleted.

Anding, Please do not leave us now. Your frustration is shared by many of us. However l3v3rz, Pedro ... are trying very hard to resolve this gap. Your help is needed. Hopefully you can share your project objective, not simply damn the contributors in their support to date.

The robobuilder servos are pretty intelligent, so the controller code is fairly trivial if you are really experienced in ATMega and C.

Robobuilder.net, like most other vendors do not share very much of their own code or libraries. I doubt they will fill your needs. But if you can make your needs known, then I feel they may well be met by the "aftermarket" community.

So do you a have a robot problem to share ? or just a problem ?
I hope this thread is not deleted.

Anding, Please do not leave us now. Your frustration is shared by many of us. However l3v3rz, Pedro ... are trying very hard to resolve this gap. Your help is needed. Hopefully you can share your project objective, not simply damn the contributors in their support to date.

The robobuilder servos are pretty intelligent, so the controller code is fairly trivial if you are really experienced in ATMega and C.

Robobuilder.net, like most other vendors do not share very much of their own code or libraries. I doubt they will fill your needs. But if you can make your needs known, then I feel they may well be met by the "aftermarket" community.

So do you a have a robot problem to share ? or just a problem ?
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Anding » Thu May 28, 2009 1:47 am

Post by Anding
Thu May 28, 2009 1:47 am

i-Bot, thanks for your response. I apologize to you and the others for my ungrateful suggestion to delete the thread.

Basically I wanted to get an idea of the flexibility of the Robobuilder platform from a programming point of view. What I mean by that is the ability to code more sophisticated behaviours, reactions, memory, etc. Now given the attractive price point of the system I'm not expecting the world, and the fact that manufacturer demo code is available and that skillful people on your forum have ported it to AVRStudio is all a great sign.

Having said that, now that I have reviewed the manufacturer's demo code I would say that the answer to my question is basically that if you want to go beyond the current model in a significant way then you have to start from the ground up.

There may have be some confusion about what I meant by a C library. "printf()" is a highly complex function that every developer will need at some point but which nobody in their right mind would want to build from scratch. Hence it available in the standard library. Same goes for floating point math functions, etc. I only had a quick look at the example C code from the manufacturer (comments in Korean didn't help me), but as far as I can tell that this is not the way they have implemented the robobuilder software, rather it's an interrupt driven model where the code directly hits the hardware. This is probably a very smart way to do it to make the robot's brain fast and cheap, but it does imply that to develop the system further you would either have to keep the same overall model but implement some new capabilities here and there (but without the scope to dramatically change the way it works), or if you do want to dramaticlaly change things, you'd need to build your own routines for all control activities.

By the way, I like the robobuilder, but the bioloid is the other option. A different topic, but I wonder which is better for hacking? I guess the fact the bioloid supply servos to other builers is a good sign, but the robobuilder servos have a published protocol too. From a mechanical point of view, which one is more flexible in terms of range of designs that can be built up with the kit? I see bioloid comes with more connecting parts, mecanno-style, for example. Does this make a big difference. I really need to find someone who has used both.
i-Bot, thanks for your response. I apologize to you and the others for my ungrateful suggestion to delete the thread.

Basically I wanted to get an idea of the flexibility of the Robobuilder platform from a programming point of view. What I mean by that is the ability to code more sophisticated behaviours, reactions, memory, etc. Now given the attractive price point of the system I'm not expecting the world, and the fact that manufacturer demo code is available and that skillful people on your forum have ported it to AVRStudio is all a great sign.

Having said that, now that I have reviewed the manufacturer's demo code I would say that the answer to my question is basically that if you want to go beyond the current model in a significant way then you have to start from the ground up.

There may have be some confusion about what I meant by a C library. "printf()" is a highly complex function that every developer will need at some point but which nobody in their right mind would want to build from scratch. Hence it available in the standard library. Same goes for floating point math functions, etc. I only had a quick look at the example C code from the manufacturer (comments in Korean didn't help me), but as far as I can tell that this is not the way they have implemented the robobuilder software, rather it's an interrupt driven model where the code directly hits the hardware. This is probably a very smart way to do it to make the robot's brain fast and cheap, but it does imply that to develop the system further you would either have to keep the same overall model but implement some new capabilities here and there (but without the scope to dramatically change the way it works), or if you do want to dramaticlaly change things, you'd need to build your own routines for all control activities.

By the way, I like the robobuilder, but the bioloid is the other option. A different topic, but I wonder which is better for hacking? I guess the fact the bioloid supply servos to other builers is a good sign, but the robobuilder servos have a published protocol too. From a mechanical point of view, which one is more flexible in terms of range of designs that can be built up with the kit? I see bioloid comes with more connecting parts, mecanno-style, for example. Does this make a big difference. I really need to find someone who has used both.
Anding
Newbie
Newbie
Posts: 5
Joined: Sun May 24, 2009 12:34 pm

Post by RandomMatt » Thu May 28, 2009 8:45 pm

Post by RandomMatt
Thu May 28, 2009 8:45 pm

Anding wrote:"printf()" is a highly complex function that every developer will need at some point but which nobody in their right mind would want to build from scratch. Hence it available in the standard library. Same goes for floating point math functions, etc.



printf() has been implemented in avr-libc... although I couldn't be faffed with it(*) and wrote my own in half-an-hour or so. You're welcome to look at the libbioloid source to see how I did it - I'm sure it'd be easy to port (just make sure you read the licence first).

* you'll need to work out how to get their FILE * stuff to work.


I'd strongly recommend against using floating point in a robot - I've found that you simply don't need that amount of accuracy (given the speed penalty). In libbioloid I've solved the problem by doing all the trig in fixed point - which isn't that uncommon on embedded targets. That said... I think avr-gcc will get basic floating point stuff to work (multiplication, division, etc).


In summary: Look at avr-libc package, or the libbioloid/libavr packages:
http://www.nongnu.org/avr-libc/
http://www.braincell.cx/bioloid/dist/

--

Also... I'm sure that I'm not the only one who assumes that a request for a C library (in a robot forum) means something with functions like "set_servo_position()" rather than functions like "putc()".

--

I cannot answer your final question. But I will say that libbioloid combined with a bioloid seems to be a better fit for you. caveat: I wrote most of libbioloid (and all of libavr)... so take my words with a pinch of salt.
Anding wrote:"printf()" is a highly complex function that every developer will need at some point but which nobody in their right mind would want to build from scratch. Hence it available in the standard library. Same goes for floating point math functions, etc.



printf() has been implemented in avr-libc... although I couldn't be faffed with it(*) and wrote my own in half-an-hour or so. You're welcome to look at the libbioloid source to see how I did it - I'm sure it'd be easy to port (just make sure you read the licence first).

* you'll need to work out how to get their FILE * stuff to work.


I'd strongly recommend against using floating point in a robot - I've found that you simply don't need that amount of accuracy (given the speed penalty). In libbioloid I've solved the problem by doing all the trig in fixed point - which isn't that uncommon on embedded targets. That said... I think avr-gcc will get basic floating point stuff to work (multiplication, division, etc).


In summary: Look at avr-libc package, or the libbioloid/libavr packages:
http://www.nongnu.org/avr-libc/
http://www.braincell.cx/bioloid/dist/

--

Also... I'm sure that I'm not the only one who assumes that a request for a C library (in a robot forum) means something with functions like "set_servo_position()" rather than functions like "putc()".

--

I cannot answer your final question. But I will say that libbioloid combined with a bioloid seems to be a better fit for you. caveat: I wrote most of libbioloid (and all of libavr)... so take my words with a pinch of salt.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by Anding » Thu May 28, 2009 11:43 pm

Post by Anding
Thu May 28, 2009 11:43 pm

RandomMatt wrote:--

Also... I'm sure that I'm not the only one who assumes that a request for a C library (in a robot forum) means something with functions like "set_servo_position()" rather than functions like "putc()".

[/b]


This is exactly what I meant! The printf() was just an example of "what is a library function" as one of the other replies seemed to imply that libraries were incompatiable with C.
RandomMatt wrote:--

Also... I'm sure that I'm not the only one who assumes that a request for a C library (in a robot forum) means something with functions like "set_servo_position()" rather than functions like "putc()".

[/b]


This is exactly what I meant! The printf() was just an example of "what is a library function" as one of the other replies seemed to imply that libraries were incompatiable with C.
Anding
Newbie
Newbie
Posts: 5
Joined: Sun May 24, 2009 12:34 pm

Post by PedroR » Fri May 29, 2009 12:53 am

Post by PedroR
Fri May 29, 2009 12:53 am

if you're looking into hacking and really want a full featured control board, heck out the roboard here http://robosavvy.com/site/index.php?opt ... Itemid=135 and here http://robosavvy.com/store/product_info ... cts_id/521

someone on the General Forum has also shared their way to attach this board to a robobuilder.
Connecting to the Robobuilder is not trivial though, but you get a full featured PC with all floating point, C libraries (printf, putc, ...) etc

It works with Robobuilder and Bioloid although from what I've seen if you're using the Roboard, connecting to Robobuilder is much more straighforward, because in Bioloid RX and TX are on the same channel.
if you're looking into hacking and really want a full featured control board, heck out the roboard here http://robosavvy.com/site/index.php?opt ... Itemid=135 and here http://robosavvy.com/store/product_info ... cts_id/521

someone on the General Forum has also shared their way to attach this board to a robobuilder.
Connecting to the Robobuilder is not trivial though, but you get a full featured PC with all floating point, C libraries (printf, putc, ...) etc

It works with Robobuilder and Bioloid although from what I've seen if you're using the Roboard, connecting to Robobuilder is much more straighforward, because in Bioloid RX and TX are on the same channel.
PedroR
Savvy Roboteer
Savvy Roboteer
Posts: 1199
Joined: Mon Jun 16, 2008 11:07 pm


10 postsPage 1 of 1
10 postsPage 1 of 1