Robobuilder Servo Madness & C Programming - Help needed

Korean company maker of Robot kits and servos designed for of articulated robots. Re-incarnation of Megarobotics.
26 postsPage 1 of 21, 2
26 postsPage 1 of 21, 2

Robobuilder Servo Madness & C Programming - Help needed

Post by AlexanderHWUK » Tue Mar 02, 2010 8:24 pm

Post by AlexanderHWUK
Tue Mar 02, 2010 8:24 pm

Hello everyone:

First of all just say keep up the good work Robobuilder community, the tutorials and posts have helped me a long way understanding how the Robobuilder kit works.

Now, after I was tinkering and playing with my Robobuilder Humanoid robot (just after trying the PCRemote program from l3v3rz), I noticed that my Robobuilder could not return to its home position. For example, when I turn it on (with firmware 2.29) and attempt the home position (by holding PF1) the robot does a weird motion and then the red error light starts blinking.

Doing a little bit of trial and error, I discovered that the ID [1] and ID [10] have misteriously melded tothether. I found this by loading the Robobuilder Motion Builder program and trying to move the servos one by one. I have not changed anything physical, and re-upgrading the firmware does not seem to solve it (tried different versions too).

At the beginning I thought the home/zero position had been corrupted, but can anyone tell me why the leg servo and the arm servo are moving together now?

UPDATE - Tried restoring the home position as it says in the manual, but it gives a "Failed" error. It seems its not the home position then, any ideas? Will resetting the individual servos [ID] solve the problem? How is it done, with the WCK Programmer?

Thank you for all the help,

Alex
Hello everyone:

First of all just say keep up the good work Robobuilder community, the tutorials and posts have helped me a long way understanding how the Robobuilder kit works.

Now, after I was tinkering and playing with my Robobuilder Humanoid robot (just after trying the PCRemote program from l3v3rz), I noticed that my Robobuilder could not return to its home position. For example, when I turn it on (with firmware 2.29) and attempt the home position (by holding PF1) the robot does a weird motion and then the red error light starts blinking.

Doing a little bit of trial and error, I discovered that the ID [1] and ID [10] have misteriously melded tothether. I found this by loading the Robobuilder Motion Builder program and trying to move the servos one by one. I have not changed anything physical, and re-upgrading the firmware does not seem to solve it (tried different versions too).

At the beginning I thought the home/zero position had been corrupted, but can anyone tell me why the leg servo and the arm servo are moving together now?

UPDATE - Tried restoring the home position as it says in the manual, but it gives a "Failed" error. It seems its not the home position then, any ideas? Will resetting the individual servos [ID] solve the problem? How is it done, with the WCK Programmer?

Thank you for all the help,

Alex
Last edited by AlexanderHWUK on Wed Mar 03, 2010 11:52 am, edited 2 times in total.
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

More questions

Post by AlexanderHWUK » Tue Mar 02, 2010 10:47 pm

Post by AlexanderHWUK
Tue Mar 02, 2010 10:47 pm

I forgot to say that I am working on a University project to control the Robobuilder humanoid using an Artificial Neural Network. However I am encountering some problems using C Code for the Robobuilder.

I have spent the past weeks reading the forum posts, downloading C codes and reading tutorials so that I could program a simple firmware for the Robobuilder. For now, the only thing I want is for the robobuilder to detect an object in front of it and send a signal to a computer. However, I have some issues with the Robobuilder/firmware:

- I have upgraded my Robobuilder with different firmwares obtained from these forum. I am following the RobobuilderLibrary project and I have tried many if not all of their hex files. For the previous versions (0.2/0.3/0.5) the Robobuilder does not react to commands sent through the IR Remote Control (I use the RemoCon Program), and the latest r96 version returns an error at the end of its upgrade (could not read final line). I assume the problem is not with the upgrade (as the firmware 2.29 works fine), and I followed all the steps regarding this project. The only thing I did not know how to create is a terminal to communicate with the Robobuilder. Is this necessary or is it fine just with the IR RemoCon?

- As I did not have luck with the hex files supplied by the robosavvy community, I tried compiling my own using the Robobuilder code. I downloaded the 2nd Source Tutorial & Code, and I have followed it until I encountered a problem I could not solve. I try to compile the example project "Maze", however the compiler found 219 errors, all being "Symbol name length can't exceed 31 characters", pointing at the motion names such as "HUNOBASIC_SIDEWALKRIGHT_NUM_OF_SCENES".

I could edit all the names of the motions and where they are called, but that will take time and I am sure there must be a simpler way to solve this.

Is it the compiler, can I change an option somewhere or try a different software? Currently I am using CVAVR because it was recommended in the C Source Tutorial from robobuilder, however I see that for the RobobuilderLibrary project they use Studio AVR. Is this better/necessary to compile the c codes provided by them?
Could it be a corrupt header file? I have copied all the necesary C Header files, but I may be missing a critical one.

The only thing I need right now is a simple C Program for the robobuilder to detect an object in front of it (as long as the PSD is configured and it works I can do the rest).

However, I have been informed by Pedro that another way to do it is have the computer query the robobuilder to check the PSD value using the RBC protocol. How difficult is this to program/design? This may be better for me as I can then integrate it with the rest of the code for the Artificial Neural Network, and easier than playing around with firmwares.

Any help or advice is greatly appretiated as I know about programming & robots, but I am new to the Robobuilder and RBC protocols.

However, the most important issue is the one above, about both servos moving at the same time. If anyone has any idea why this is happening any hint would help me a lot!

If it helps, I have a Robobuilder 5720T and use a bluetooth dongle.

Thanks,

Alex
I forgot to say that I am working on a University project to control the Robobuilder humanoid using an Artificial Neural Network. However I am encountering some problems using C Code for the Robobuilder.

I have spent the past weeks reading the forum posts, downloading C codes and reading tutorials so that I could program a simple firmware for the Robobuilder. For now, the only thing I want is for the robobuilder to detect an object in front of it and send a signal to a computer. However, I have some issues with the Robobuilder/firmware:

- I have upgraded my Robobuilder with different firmwares obtained from these forum. I am following the RobobuilderLibrary project and I have tried many if not all of their hex files. For the previous versions (0.2/0.3/0.5) the Robobuilder does not react to commands sent through the IR Remote Control (I use the RemoCon Program), and the latest r96 version returns an error at the end of its upgrade (could not read final line). I assume the problem is not with the upgrade (as the firmware 2.29 works fine), and I followed all the steps regarding this project. The only thing I did not know how to create is a terminal to communicate with the Robobuilder. Is this necessary or is it fine just with the IR RemoCon?

- As I did not have luck with the hex files supplied by the robosavvy community, I tried compiling my own using the Robobuilder code. I downloaded the 2nd Source Tutorial & Code, and I have followed it until I encountered a problem I could not solve. I try to compile the example project "Maze", however the compiler found 219 errors, all being "Symbol name length can't exceed 31 characters", pointing at the motion names such as "HUNOBASIC_SIDEWALKRIGHT_NUM_OF_SCENES".

I could edit all the names of the motions and where they are called, but that will take time and I am sure there must be a simpler way to solve this.

Is it the compiler, can I change an option somewhere or try a different software? Currently I am using CVAVR because it was recommended in the C Source Tutorial from robobuilder, however I see that for the RobobuilderLibrary project they use Studio AVR. Is this better/necessary to compile the c codes provided by them?
Could it be a corrupt header file? I have copied all the necesary C Header files, but I may be missing a critical one.

The only thing I need right now is a simple C Program for the robobuilder to detect an object in front of it (as long as the PSD is configured and it works I can do the rest).

However, I have been informed by Pedro that another way to do it is have the computer query the robobuilder to check the PSD value using the RBC protocol. How difficult is this to program/design? This may be better for me as I can then integrate it with the rest of the code for the Artificial Neural Network, and easier than playing around with firmwares.

Any help or advice is greatly appretiated as I know about programming & robots, but I am new to the Robobuilder and RBC protocols.

However, the most important issue is the one above, about both servos moving at the same time. If anyone has any idea why this is happening any hint would help me a lot!

If it helps, I have a Robobuilder 5720T and use a bluetooth dongle.

Thanks,

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by badcommandorfilename » Tue Mar 02, 2010 11:12 pm

Post by badcommandorfilename
Tue Mar 02, 2010 11:12 pm

Hi Alex,

It sounds like you have a lot of problems, and I'll try to cover the ones I can help with.

First of all, I'm not sure why two of your servos have inherited the same ID values - it might be due to a corrupted signal. You can fix it by using the wCK Programmer software which came with your kit. There are instructions for reprogramming the ID in your instruction manual.

Secondly, for all my robobuilder coding I have been using avr-gcc and avrlibc. They should not have any problems with #defines being too long. For what it's worth, I think that WinAVR uses avr-gcc as it's compiler.

Finally, after a few months of wrestling with the sample robobuilder source code provided, I decided that it's not worth the effort. Save yourself some time and start from scratch or use a community implementation.

I am also currently working on trying to interface the IR remote control too, so I'll keep you informed if I make any breakthroughs. I will integrate an interface into a later version of my code.
Hi Alex,

It sounds like you have a lot of problems, and I'll try to cover the ones I can help with.

First of all, I'm not sure why two of your servos have inherited the same ID values - it might be due to a corrupted signal. You can fix it by using the wCK Programmer software which came with your kit. There are instructions for reprogramming the ID in your instruction manual.

Secondly, for all my robobuilder coding I have been using avr-gcc and avrlibc. They should not have any problems with #defines being too long. For what it's worth, I think that WinAVR uses avr-gcc as it's compiler.

Finally, after a few months of wrestling with the sample robobuilder source code provided, I decided that it's not worth the effort. Save yourself some time and start from scratch or use a community implementation.

I am also currently working on trying to interface the IR remote control too, so I'll keep you informed if I make any breakthroughs. I will integrate an interface into a later version of my code.
badcommandorfilename offline
Robot Builder
Robot Builder
Posts: 12
Joined: Fri Dec 11, 2009 11:34 am

Post by AlexanderHWUK » Wed Mar 03, 2010 1:26 am

Post by AlexanderHWUK
Wed Mar 03, 2010 1:26 am

Hi there!

Cool, I will give that a try tomorrow, see if it solves the problem. The solution seems logical and I did read that you could do it, its just a mistery how it all happened. The robobuilder was working fine, until I used the PCRemote program (Probably clicked a random button, not blaming the person that programmed it!).

Awesome, I shall install WinAVR and see if I have any more problems compiling stuff. At the beginning I thought creating a firmware for the Robobuilder would be the easiest/fastest/only aproach to achieve my objectives. However running a program in the computer that checks the value of the PSD remotely and sends simple motion commands to the robot sound much easier. My main problem is my time constraint, as I have to finish this project in aproximately a month.

So if anyone can give me a hint about how to send these RBC Protocol codes through Bluetooth using a C program it would be a great help.

Thank you for your advices, cool blog by the way :wink:

UPDATE - I have tried using the WCK programmer, however it does not seem to work anymore! I used it to test individual servos, but now when I click Scan Baudrate it cycles through all of them and then says "Try Again". This was my only idea of fixing this weird issue, I wanted to know how to detect objects, but this is by far more important as it does not "work" correctly anymore!
Motion Builder works though, however the fact both servos are moving together is bad... Have I fried a chip or something?

Alex
Hi there!

Cool, I will give that a try tomorrow, see if it solves the problem. The solution seems logical and I did read that you could do it, its just a mistery how it all happened. The robobuilder was working fine, until I used the PCRemote program (Probably clicked a random button, not blaming the person that programmed it!).

Awesome, I shall install WinAVR and see if I have any more problems compiling stuff. At the beginning I thought creating a firmware for the Robobuilder would be the easiest/fastest/only aproach to achieve my objectives. However running a program in the computer that checks the value of the PSD remotely and sends simple motion commands to the robot sound much easier. My main problem is my time constraint, as I have to finish this project in aproximately a month.

So if anyone can give me a hint about how to send these RBC Protocol codes through Bluetooth using a C program it would be a great help.

Thank you for your advices, cool blog by the way :wink:

UPDATE - I have tried using the WCK programmer, however it does not seem to work anymore! I used it to test individual servos, but now when I click Scan Baudrate it cycles through all of them and then says "Try Again". This was my only idea of fixing this weird issue, I wanted to know how to detect objects, but this is by far more important as it does not "work" correctly anymore!
Motion Builder works though, however the fact both servos are moving together is bad... Have I fried a chip or something?

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by l3v3rz » Wed Mar 03, 2010 1:58 pm

Post by l3v3rz
Wed Mar 03, 2010 1:58 pm

Hi there.

PCremote program (I don't think) can cause the problem you describe, although I suppose corrupted message in direct mode could potentially set a servo ID (if the checksum happened to match). If you have bought any new servo they come by default with ID 0 - and need to be set, or if you have reset the servo using the hardware short mechanism described in the guide. The various versions of PC remote (0.2, 0.3 etc) were very limited in what they could do - later version I pulled the code that talks RBC protocl into a separate library/DLL called RobobuilderLib.When you the servo IDs 1 and 10 are melded together is it as servo 1 or servo 10 ? Either way you will need to pull and isolate the servos and the use wck programmer to reset the IDs.

If you used early versions of the homebrew OS stuff (pre R96) and wrote some basic programs then the basic code was written into the firmware where the serial number was stored - hence this was a problem. You don't notice it until you load the standard firmware back which checks. It also overwrote the servo home positions (you can reset this using PCremote). It also overwrites the robot type - but this can be set using PF buttons at power up. However the problems you describe don't sound like any of the above. If this is your problem reseting the serial number is straightforward - but does require a little code to be built and download into the firmware.

You can't compile the C code provided by Robosavvy without the commercial version of Studio AVR - the free version is limited and throws error messages at build time - hence ibot started the port to avrgcc. (or WinAVR)

Depending on the version of the wck programmer you use you may have to put your bot into PC control mode first (hold down PF2 at power up ). To set the ID of a servo - you should disconnect all the other servo - and just leave the one connected you want to set.

PCremote / RoobuilderLib.DLL code does read PSD quite well - and you can either use PCremote or use the library with your own code (or even program in L# - I show demo reading PSD). If your ANN is in .NET hooking up to the library should be straightforward. Since it uses the robosavvy official firmware 2.23 or later it means you don't have to write your own firmware and you can access all the built in motions and use motion builder to extend them. Its by far the safest route, which is why I haven't done any recent development on the homebrew OS.

One final thought - a blinking red power light (rather than the error light) may just mean you are low on battery power - check you're plugged into mains - it will go green if thats the case. If ID1 and 10 are melded - then it will fails its self-test and this will cause the error light to blink red. There is a servo diagnostic program that you can run. If when you do connect the serial number comes up corrupted (PCremote can tell you this) then we can look to fix that .

Sounds like an interesting project - hope you make the results public when it works !

cheers
Hi there.

PCremote program (I don't think) can cause the problem you describe, although I suppose corrupted message in direct mode could potentially set a servo ID (if the checksum happened to match). If you have bought any new servo they come by default with ID 0 - and need to be set, or if you have reset the servo using the hardware short mechanism described in the guide. The various versions of PC remote (0.2, 0.3 etc) were very limited in what they could do - later version I pulled the code that talks RBC protocl into a separate library/DLL called RobobuilderLib.When you the servo IDs 1 and 10 are melded together is it as servo 1 or servo 10 ? Either way you will need to pull and isolate the servos and the use wck programmer to reset the IDs.

If you used early versions of the homebrew OS stuff (pre R96) and wrote some basic programs then the basic code was written into the firmware where the serial number was stored - hence this was a problem. You don't notice it until you load the standard firmware back which checks. It also overwrote the servo home positions (you can reset this using PCremote). It also overwrites the robot type - but this can be set using PF buttons at power up. However the problems you describe don't sound like any of the above. If this is your problem reseting the serial number is straightforward - but does require a little code to be built and download into the firmware.

You can't compile the C code provided by Robosavvy without the commercial version of Studio AVR - the free version is limited and throws error messages at build time - hence ibot started the port to avrgcc. (or WinAVR)

Depending on the version of the wck programmer you use you may have to put your bot into PC control mode first (hold down PF2 at power up ). To set the ID of a servo - you should disconnect all the other servo - and just leave the one connected you want to set.

PCremote / RoobuilderLib.DLL code does read PSD quite well - and you can either use PCremote or use the library with your own code (or even program in L# - I show demo reading PSD). If your ANN is in .NET hooking up to the library should be straightforward. Since it uses the robosavvy official firmware 2.23 or later it means you don't have to write your own firmware and you can access all the built in motions and use motion builder to extend them. Its by far the safest route, which is why I haven't done any recent development on the homebrew OS.

One final thought - a blinking red power light (rather than the error light) may just mean you are low on battery power - check you're plugged into mains - it will go green if thats the case. If ID1 and 10 are melded - then it will fails its self-test and this will cause the error light to blink red. There is a servo diagnostic program that you can run. If when you do connect the serial number comes up corrupted (PCremote can tell you this) then we can look to fix that .

Sounds like an interesting project - hope you make the results public when it works !

cheers
Last edited by l3v3rz on Wed Mar 03, 2010 2:48 pm, edited 1 time in total.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by l3v3rz » Wed Mar 03, 2010 2:29 pm

Post by l3v3rz
Wed Mar 03, 2010 2:29 pm

BTW the RBC specs can be found here:

http://robosavvy.com/RoboSavvyPages/Rob ... _v1.13.pdf

BTW the IR doesn't seem to work even with latest version of firmware. (2.29) so the doc doesn't seem to quite match up.

Also i-bot extensions has found these undocumented extension

http://robosavvy.com/Builders/i-Bot/RBCommands.pdf
BTW the RBC specs can be found here:

http://robosavvy.com/RoboSavvyPages/Rob ... _v1.13.pdf

BTW the IR doesn't seem to work even with latest version of firmware. (2.29) so the doc doesn't seem to quite match up.

Also i-bot extensions has found these undocumented extension

http://robosavvy.com/Builders/i-Bot/RBCommands.pdf
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by AlexanderHWUK » Wed Mar 03, 2010 2:51 pm

Post by AlexanderHWUK
Wed Mar 03, 2010 2:51 pm

Thanks a lot for the advise and support!

To confirm, the ID[1] servo (the one controlling the left leg to create a "kicking" motion) is following the commands sent to ID[10] (the left arm shoulder rotation), which means when I set it to "home position", it lifts the left leg up as well...

I have tried disconnecting all the arms servos, to check if it solved the problem and see if I could re-set the ID of the leg servo, but the WCK programmer keeps giving me the same errors, failing to connect to the robobuilder completely. I have tried both bluetooth and serial cable, both to no avail.
I have found the instructions on the wck manual, but do I have to disconnect all sevos apart except ID[1]? That means I will have to take the robobuilder appart, and I have a small demonstration to give on Thursday.
Can I connect this servo to another spare Control Box I have? Will it be the same as reseting it with my current control box? Do I have to upgrade its firmware first or any other things?

Yes, I encountered those problems when I tried using other firmwares, but it should not happen anymore if I am using the Robobuilder Firmware right?

Also I have a question about the WCK programmer software. I am using version 1.32 as it is the one I have found in the Robobuilder website, however in the C Tutorials released by the Robobuilder website, they mention a mystical 1.34 WCK programmer version. I have searched online but never found it, anyone know where you can find this?

Ok, when I fix this weird error, I will look deeper into the RobobuilderLibrary and see how to implement it with my code, however I have never combined a dll library with C code and will appretiate some advice when I get there :wink: . Your suggestion sounds by far the best approach, so will forget about writing my own firmwares. Lisp looks interesting, but don't have the time to learn it, and the amount of brackets scare me :P

Oh, the blinking red light is the error light, not the power. Where can I get this servo diagnostic program? And how can I use PCRemote to check this?

Sorry for the inquisitive questions and amount of problems depicted, but having the robot working is one of my priorities for this project. It is a cool project where I am trying to show that Artificial Intelligence can be applied to the real (robotics) world, in this case a humanoid robot learning about the environment around it.

I will keep you updated, mostly about my problems!

UPDATE - Just remembered you can slide the control box out... Trying the single servo WCK Programmer solution while I'm posting this

UPDATE2 - Bad news, tried changing the ID of a servo, but WCK programmer does not work even with a single servo connected. Whenever I click scan Baud Rate, it just cycles as if it can't find it, and then says try again... The only other option is checking if the serial number or something like that is corrupted, but I will wait on your post with instructions. Gotta go meet with someone to design a microgripper

Alex
Thanks a lot for the advise and support!

To confirm, the ID[1] servo (the one controlling the left leg to create a "kicking" motion) is following the commands sent to ID[10] (the left arm shoulder rotation), which means when I set it to "home position", it lifts the left leg up as well...

I have tried disconnecting all the arms servos, to check if it solved the problem and see if I could re-set the ID of the leg servo, but the WCK programmer keeps giving me the same errors, failing to connect to the robobuilder completely. I have tried both bluetooth and serial cable, both to no avail.
I have found the instructions on the wck manual, but do I have to disconnect all sevos apart except ID[1]? That means I will have to take the robobuilder appart, and I have a small demonstration to give on Thursday.
Can I connect this servo to another spare Control Box I have? Will it be the same as reseting it with my current control box? Do I have to upgrade its firmware first or any other things?

Yes, I encountered those problems when I tried using other firmwares, but it should not happen anymore if I am using the Robobuilder Firmware right?

Also I have a question about the WCK programmer software. I am using version 1.32 as it is the one I have found in the Robobuilder website, however in the C Tutorials released by the Robobuilder website, they mention a mystical 1.34 WCK programmer version. I have searched online but never found it, anyone know where you can find this?

Ok, when I fix this weird error, I will look deeper into the RobobuilderLibrary and see how to implement it with my code, however I have never combined a dll library with C code and will appretiate some advice when I get there :wink: . Your suggestion sounds by far the best approach, so will forget about writing my own firmwares. Lisp looks interesting, but don't have the time to learn it, and the amount of brackets scare me :P

Oh, the blinking red light is the error light, not the power. Where can I get this servo diagnostic program? And how can I use PCRemote to check this?

Sorry for the inquisitive questions and amount of problems depicted, but having the robot working is one of my priorities for this project. It is a cool project where I am trying to show that Artificial Intelligence can be applied to the real (robotics) world, in this case a humanoid robot learning about the environment around it.

I will keep you updated, mostly about my problems!

UPDATE - Just remembered you can slide the control box out... Trying the single servo WCK Programmer solution while I'm posting this

UPDATE2 - Bad news, tried changing the ID of a servo, but WCK programmer does not work even with a single servo connected. Whenever I click scan Baud Rate, it just cycles as if it can't find it, and then says try again... The only other option is checking if the serial number or something like that is corrupted, but I will wait on your post with instructions. Gotta go meet with someone to design a microgripper

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by l3v3rz » Wed Mar 03, 2010 5:37 pm

Post by l3v3rz
Wed Mar 03, 2010 5:37 pm

Make sure the wck progammer is in Direct mode - orange light on back. You need standard firmware (2.26 or above ideally) loaded as well.

You can connect servo to spare box - its just acting serial converter. The servos aren't keyed to a particular box. In fact you can use the servo directly without using RBC at all. Theres a nice video on youtube of someone who built a Simple "turtle" type robot using only 2 wck servo and some sensors - no RBC controller at all.

They do seem to have removed the V1.34 of the wck programmer - which auto put you direct mode - not sure why. I have the 1.34 version but its been removed from their download site.

If you're using non-managed code - might be easier to use Pedro remcon library than the .NET dll - although it is possible to call it - but you need to build the DLL with COM support turned on. Is it possible to call the ANN code as a library from, C# ? That would make thing easier.
Make sure the wck progammer is in Direct mode - orange light on back. You need standard firmware (2.26 or above ideally) loaded as well.

You can connect servo to spare box - its just acting serial converter. The servos aren't keyed to a particular box. In fact you can use the servo directly without using RBC at all. Theres a nice video on youtube of someone who built a Simple "turtle" type robot using only 2 wck servo and some sensors - no RBC controller at all.

They do seem to have removed the V1.34 of the wck programmer - which auto put you direct mode - not sure why. I have the 1.34 version but its been removed from their download site.

If you're using non-managed code - might be easier to use Pedro remcon library than the .NET dll - although it is possible to call it - but you need to build the DLL with COM support turned on. Is it possible to call the ANN code as a library from, C# ? That would make thing easier.
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by AlexanderHWUK » Wed Mar 03, 2010 8:00 pm

Post by AlexanderHWUK
Wed Mar 03, 2010 8:00 pm

Sorry to cause this much trouble. In engineering, the more time you spend trying to solve a problem, the greater the hit when you realise the stupid mistake. At least lets hope its that.

Anyway, got the new Control Box, and surprise surprise, the ID[10] servo still believes that its number ID[1] (which means I haven't fried any chips or anything).

However, I still have no luck making the WCK programmer to work. It worked before, so I know how to use it. I have set the Control Box to Direct mode (Blue and Orange), but the WCK programmer software still cannot detect it (Tried both control boxes). It does not complain about the COM port (Motion Builder can control the servos so bluetooth/cable works), but I click scan Baud Rate, and it cycles and asks to try again... This happens with ALL servos, weird but the WCK programmer doesnt work anymore for me.

Could this be a problem with my computer/configuration? Tomorrow I will install the WCK software in another computer, see if it can connect with the robot.
Could this be the serial code that you mentioned? How can I check/fix this? I tried both Boxes, and they both gave the same error, how is this possible?

Again sorry to bombard you guys with technical support questions, even if I came here asking about C programming with Robobuilder, but the sooner I get the Robobuilder running again, the sooner I can start coding/testing.

I am using C# to program the ANN, however I have to train it separately first, as training it with a physical robot would take forever (+500 tests per second in a computer). I could train it using the robobuilder just for demonstration purposes, however I would then write a simple piece of code that can read outputs, then write them in a file that the C# code can read from.

Don't worry about the ANN code yet, there is plenty to fix before that :lol:

Thanks again,

Alex
Sorry to cause this much trouble. In engineering, the more time you spend trying to solve a problem, the greater the hit when you realise the stupid mistake. At least lets hope its that.

Anyway, got the new Control Box, and surprise surprise, the ID[10] servo still believes that its number ID[1] (which means I haven't fried any chips or anything).

However, I still have no luck making the WCK programmer to work. It worked before, so I know how to use it. I have set the Control Box to Direct mode (Blue and Orange), but the WCK programmer software still cannot detect it (Tried both control boxes). It does not complain about the COM port (Motion Builder can control the servos so bluetooth/cable works), but I click scan Baud Rate, and it cycles and asks to try again... This happens with ALL servos, weird but the WCK programmer doesnt work anymore for me.

Could this be a problem with my computer/configuration? Tomorrow I will install the WCK software in another computer, see if it can connect with the robot.
Could this be the serial code that you mentioned? How can I check/fix this? I tried both Boxes, and they both gave the same error, how is this possible?

Again sorry to bombard you guys with technical support questions, even if I came here asking about C programming with Robobuilder, but the sooner I get the Robobuilder running again, the sooner I can start coding/testing.

I am using C# to program the ANN, however I have to train it separately first, as training it with a physical robot would take forever (+500 tests per second in a computer). I could train it using the robobuilder just for demonstration purposes, however I would then write a simple piece of code that can read outputs, then write them in a file that the C# code can read from.

Don't worry about the ANN code yet, there is plenty to fix before that :lol:

Thanks again,

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by l3v3rz » Wed Mar 03, 2010 9:02 pm

Post by l3v3rz
Wed Mar 03, 2010 9:02 pm

I get the exact same situation you describe if not direct mode first. (i.e. you must be in this mode for even the scan baud rate command to work). The other possibility is a bad connection- the COM port check - seems to test only if com port exists - it doesn't seem to notice if robobuilder is not connected!

Have you checked using a direct link (rather than bluetooth) in case its a problem with BT connection - I think BT runs a "service" on the host PC to do the conversion to serial, if thats stopped it won't work.

I doubt its your computer configuration - all the wck programmer does is send simple byte sequences down to the serial port.

Just thought of another possibility - if another program has locked the serial port - it won't work either . so make sure theres not another program running in background thats using the same port - for instance multiple copies of wck programmer running.

good luck
I get the exact same situation you describe if not direct mode first. (i.e. you must be in this mode for even the scan baud rate command to work). The other possibility is a bad connection- the COM port check - seems to test only if com port exists - it doesn't seem to notice if robobuilder is not connected!

Have you checked using a direct link (rather than bluetooth) in case its a problem with BT connection - I think BT runs a "service" on the host PC to do the conversion to serial, if thats stopped it won't work.

I doubt its your computer configuration - all the wck programmer does is send simple byte sequences down to the serial port.

Just thought of another possibility - if another program has locked the serial port - it won't work either . so make sure theres not another program running in background thats using the same port - for instance multiple copies of wck programmer running.

good luck
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by AlexanderHWUK » Wed Mar 03, 2010 11:07 pm

Post by AlexanderHWUK
Wed Mar 03, 2010 11:07 pm

Right, lets do this step by step, see if I am doing something wrong:

- I connect the USB to serial port cable into my computer (Recognises it as COM 2), and plug it into the RoboBuilder.

- I turn the Robobuilder on, and download the 2.29 Firmware into it using the upgrade tool (Just to make sure it's there).

- When it's all done, I turn the robobuilder Off, then On again holding the PF2 Button, after 2 seconds the lights change from just the Green on the left, to just the Blue and Orange on the right. (This is PC Direct mode right?)

- I turn on the WCK programmer software, set the COM 2 port, check port, then click on the Scan Baud Rate. It then cycles through the several rates, and then asks politely to try again.

I understand that this only happens if it is not in direct mode right? However I cannot be surer that it is in that mode! (Unless I pressed the wrong button or the lights are wrong)

I am running out of ideas, I could somehow replace the servo, however it has misteriously affected the rest of the servos aswell somehow! I think there are 2 different problems here:
- The servo ID[10] is confused, this can be easily solved with the WCK programmer
- The robobuilder does not respond to the WCK Programmer software. It must be a COM port issue, seeing that I have plugged/unplugged both the bluetooth and serial cables in every hole of my laptop. I will experiment further seeing if I can reset the COM ports in my computer. Also I will try installing the software in a different computer, to clarify the situation.

I can take a picture or even video of me doing the procedure, but its basically how I've described it above (Appart from the mess of cables)

Hope some miraculous solution comes around,

Alex
Right, lets do this step by step, see if I am doing something wrong:

- I connect the USB to serial port cable into my computer (Recognises it as COM 2), and plug it into the RoboBuilder.

- I turn the Robobuilder on, and download the 2.29 Firmware into it using the upgrade tool (Just to make sure it's there).

- When it's all done, I turn the robobuilder Off, then On again holding the PF2 Button, after 2 seconds the lights change from just the Green on the left, to just the Blue and Orange on the right. (This is PC Direct mode right?)

- I turn on the WCK programmer software, set the COM 2 port, check port, then click on the Scan Baud Rate. It then cycles through the several rates, and then asks politely to try again.

I understand that this only happens if it is not in direct mode right? However I cannot be surer that it is in that mode! (Unless I pressed the wrong button or the lights are wrong)

I am running out of ideas, I could somehow replace the servo, however it has misteriously affected the rest of the servos aswell somehow! I think there are 2 different problems here:
- The servo ID[10] is confused, this can be easily solved with the WCK programmer
- The robobuilder does not respond to the WCK Programmer software. It must be a COM port issue, seeing that I have plugged/unplugged both the bluetooth and serial cables in every hole of my laptop. I will experiment further seeing if I can reset the COM ports in my computer. Also I will try installing the software in a different computer, to clarify the situation.

I can take a picture or even video of me doing the procedure, but its basically how I've described it above (Appart from the mess of cables)

Hope some miraculous solution comes around,

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by l3v3rz » Wed Mar 03, 2010 11:45 pm

Post by l3v3rz
Wed Mar 03, 2010 11:45 pm

What you describe sounds perfectly correct - very strange. It does sound like a com port problem. The dc mode of orange and blue is correct.

Sorry if I'm asking dumb questions but do you have any servos connected ? Have you tried doing a read position against a servo id - rather than baud rate scan ? If you're in DC mode and no servos are connected - I'm not sure what wck programmer does.

Can you connect another device to the COM port and see if its working ? Mind you if RBC upload tool and motion builder tool works then com port must be ok. The motion builder wiil hold the com port - so make sure thats closed (again it must have been to upload the firmware - so that can't be problem). I think Motion builder use dc mode when you "test" a motion (or capture a position) - auto switching - so if that works theres no real problem with your set up.

Hope this helps and good luck !
What you describe sounds perfectly correct - very strange. It does sound like a com port problem. The dc mode of orange and blue is correct.

Sorry if I'm asking dumb questions but do you have any servos connected ? Have you tried doing a read position against a servo id - rather than baud rate scan ? If you're in DC mode and no servos are connected - I'm not sure what wck programmer does.

Can you connect another device to the COM port and see if its working ? Mind you if RBC upload tool and motion builder tool works then com port must be ok. The motion builder wiil hold the com port - so make sure thats closed (again it must have been to upload the firmware - so that can't be problem). I think Motion builder use dc mode when you "test" a motion (or capture a position) - auto switching - so if that works theres no real problem with your set up.

Hope this helps and good luck !
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by AlexanderHWUK » Thu Mar 04, 2010 12:12 am

Post by AlexanderHWUK
Thu Mar 04, 2010 12:12 am

It's ok to ask dumb questions, that's the easiest way to find problems :P

There is definetely a servo connected (I can control it with Motion Builder!).

I have restarted the computer and the first thing I have done is connect the cable and try wck, still nothing.

I will research on how to reset COM ports, tomorrow I'll try a different computer.

For now, I will eat ice cream and look at my defunct Robobuilder :cry:

Thank you very much for your support, your dedication is admirable

Alex
It's ok to ask dumb questions, that's the easiest way to find problems :P

There is definetely a servo connected (I can control it with Motion Builder!).

I have restarted the computer and the first thing I have done is connect the cable and try wck, still nothing.

I will research on how to reset COM ports, tomorrow I'll try a different computer.

For now, I will eat ice cream and look at my defunct Robobuilder :cry:

Thank you very much for your support, your dedication is admirable

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Post by badcommandorfilename » Thu Mar 04, 2010 12:55 am

Post by badcommandorfilename
Thu Mar 04, 2010 12:55 am

It sounds like you're having some strange problems - perhaps it is something to do with the bluetooth connection or some hardware fault.

There is another way to reset the ID of the wCKs, but it's a little more involved. You need to send the appropriate command directly to the servo using the RBC brick. This will involve you writing a short program and uploading it - it might be easier than trying to debug what is going on.

Here are the protocol specs for the wCK servos: http://robosavvy.com/RoboSavvyPages/Rob ... manual.pdf

There are some short code snippets, but basically you need to:
- Set your Tx0 baud rate to 11500,
- Make sure that only the servo you want to reprogram is connected,
- Send the following bytes to Tx0:
- 0xFF [header]
- (7<<5)|(OLDID) [OLDID is the current ID of the servo]
- NEWID
- NEWID [again]
- (byte1)^(byte2)^(byte3)^(byte4)&(0x7F) [checksum]

This is the packet which allows you to reprogram the IDs. You probably want to double check my work before you do anything. Also, if you can't work out what OLDID is, just try everything from 0-16 (but make sure only one servo is connected.

Good luck!
It sounds like you're having some strange problems - perhaps it is something to do with the bluetooth connection or some hardware fault.

There is another way to reset the ID of the wCKs, but it's a little more involved. You need to send the appropriate command directly to the servo using the RBC brick. This will involve you writing a short program and uploading it - it might be easier than trying to debug what is going on.

Here are the protocol specs for the wCK servos: http://robosavvy.com/RoboSavvyPages/Rob ... manual.pdf

There are some short code snippets, but basically you need to:
- Set your Tx0 baud rate to 11500,
- Make sure that only the servo you want to reprogram is connected,
- Send the following bytes to Tx0:
- 0xFF [header]
- (7<<5)|(OLDID) [OLDID is the current ID of the servo]
- NEWID
- NEWID [again]
- (byte1)^(byte2)^(byte3)^(byte4)&(0x7F) [checksum]

This is the packet which allows you to reprogram the IDs. You probably want to double check my work before you do anything. Also, if you can't work out what OLDID is, just try everything from 0-16 (but make sure only one servo is connected.

Good luck!
badcommandorfilename offline
Robot Builder
Robot Builder
Posts: 12
Joined: Fri Dec 11, 2009 11:34 am

Post by AlexanderHWUK » Thu Mar 04, 2010 1:30 am

Post by AlexanderHWUK
Thu Mar 04, 2010 1:30 am

Ok, so I can send the command directly without using the WCK programmer, that makes sense. Do you mean writing a small firmware program, upload it to the robobuilder and running it?
If so, I am afraid that I just started trying to program Robobuilder firmwares 2 days ago and it has not gone well. I am still quite new to the Robobuilder and unfortunately I have little time to dedicate to learn the code used for firmwares. Can I use a simple firmware from a C Source code example and include this code?

I understand your logic, but I don't even know where to start to write this program, or how to apply it. If tomorrow I can't solve this with a different computer, this will be my only option.

Thanks again for all the support,

Alex
Ok, so I can send the command directly without using the WCK programmer, that makes sense. Do you mean writing a small firmware program, upload it to the robobuilder and running it?
If so, I am afraid that I just started trying to program Robobuilder firmwares 2 days ago and it has not gone well. I am still quite new to the Robobuilder and unfortunately I have little time to dedicate to learn the code used for firmwares. Can I use a simple firmware from a C Source code example and include this code?

I understand your logic, but I don't even know where to start to write this program, or how to apply it. If tomorrow I can't solve this with a different computer, this will be my only option.

Thanks again for all the support,

Alex
AlexanderHWUK offline
Savvy Roboteer
Savvy Roboteer
Posts: 27
Joined: Tue Mar 02, 2010 4:54 pm

Next
Next
26 postsPage 1 of 21, 2
26 postsPage 1 of 21, 2
cron