Author Topic: WebbotLib Gait Designer  (Read 10078 times)

0 Members and 1 Guest are viewing this topic.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
WebbotLib Gait Designer
« on: April 23, 2010, 01:40:10 PM »
Am currently working on a Gait Designer.

The Gait Designer is another pc app that allows you to create a gait file; containing one or more animations (eg Walk, Squat, etc).
Each animation has multiple 'key frames' where you can set the position of each servo/limb.
I produce all the positions in-between the key frames auto-magically.

The Gait Designer can be used 'stand alone' or you can 'Connect' to your Axon. If connected (and you've downloaded the hex file below) then the Axon moves the limbs on the fly. You can also 'play' an animation to make your robot move.

Here is the pc application
http://webbot.org.uk/webbotlib/GaitDesigner.jnlp

and here is an example HEX file for the Axon or Axon II which allows one or two servos. It assumes the servos are connected to E7 and H2 respectively. Yep - only two servos for now. But this HEX file was created with a future release of WebbotLib - once released you will be able to create any number of servos/motors on any pins you like.
http://webbot.org.uk/webbotlib/GaitDesignerAxon.hex

The 'future' step will be to record the gait to EEPROM etc and WebbotLib will then allow you to play gaits with no pc involved - even controlling the speed of 'playback'.

But for now: give it a try - and let me know what you think.

EDIT: To add a frame - right click inside the graph



« Last Edit: April 23, 2010, 06:46:56 PM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
WebbotLib Gait Designer
« Reply #1 on: April 23, 2010, 08:02:49 PM »
Just in case you missed the thread

http://www.societyofrobots.com/robotforum/index.php?topic=10982.0

There seems to be a bug in the uart code somewhere.

Details in that thread.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
WebbotLib Gait Designer
« Reply #2 on: April 24, 2010, 11:59:04 PM »
Info to all folk interested in Gait Designer.

Just in case you missed the thread

http://www.societyofrobots.com/robotforum/index.php?topic=10982.0

There seems to be a bug in the uart code somewhere.

Details in that thread.


Thats a different topic - and actually caused by an error in the users own code (not WebbotLib) - so don't let it stop you from giving Gait Designer a try.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Ryltar

  • Full Member
  • ***
  • Posts: 74
  • Helpful? 1
    • GlitchTech Science
WebbotLib Gait Designer
« Reply #3 on: April 25, 2010, 07:04:49 AM »
Am currently working on a Gait Designer....

I downloaded the file but no dice. When it runs, I get a gray screen with a rectangle at the bottom. The drop down menu in the upper left seems to work, but no matter what I do I cannot get any reaction from the gray screen. Running Ubuntu 9.10. I'll try it on my windows machine later.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
WebbotLib Gait Designer
« Reply #4 on: April 25, 2010, 07:39:45 AM »
Info to all folk interested in Gait Designer.


Thats a different topic - and actually caused by an error in the users own code (not WebbotLib) - so don't let it stop you from giving Gait Designer a try.

Why don't you start a new thread for the gait designer if you are worried about debug posts on webbotlib confusing people?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: WebbotLib Gait Designer
« Reply #5 on: April 28, 2010, 09:43:52 AM »
Topic split as requested.

When I get more time I'll have a look at this Gait Designer, too. I'll definitely have thoughts! (read: demands to make it better :P)

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #6 on: April 28, 2010, 01:13:29 PM »
Am currently working on a Gait Designer....

I downloaded the file but no dice. When it runs, I get a gray screen with a rectangle at the bottom. The drop down menu in the upper left seems to work, but no matter what I do I cannot get any reaction from the gray screen. Running Ubuntu 9.10. I'll try it on my windows machine later.

How did you get on with your Windows machine?

The Gait Designer, like my other Designers, are Java based - so your machine will need a Java Runtime installed (JRE).

The Gait Designer also needs to access the serial ports and this means including some native libraries (ie a DLL for Windows or a SO for Unix) to allow that.

I only have Windows so the Unix side is impossible for me to test and it may mean I have to use certain naming conventions for Solaris/Linux/32bit/64bit etc. Have spent ages searching the web to no avail.

The serial library I use is called RXTX (http://rxtx.qbang.org/wiki/index.php/Download) and it includes 'native libraries' for lots of platforms. For Unix flavors these are all called "librxtxSerial.so" files. I include one in my distribution but whether its the "correct" one, or if its named correctly, I'm not sure.

The web page above gives a download that includes the Unix native libraries. As far as I can tell its just a question of copying the 'correct' SO file to your <Java>/jre/bin folder.

Any help from Unix folk appreciated.

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #7 on: April 28, 2010, 07:12:36 PM »
Ok - have done some 'jiggery pokery' that may help Linux users.

Click on the cross-platform download ie http://webbot.org.uk/webbotlib/GaitDesigner.jnlp

You should get a window with a menu: File, View, Window, Help etc.
If you don't have Java installed yet, then it will try to download it (but it takes a while). So if you prefer - then download Java first.

Select: File, New

You should now see a new project window. But if you don't - then the Designer can't load your O/S native serial drivers. Click View, Log and you should see loads of stuff like:-
Code: [Select]
AWT-EventQueue-0)[INFO] awt.toolkit=sun.awt.windows.WToolkit
(AWT-EventQueue-0)[INFO] deployment.browser.path=C:\Program Files\Internet Explorer\iexplore.exe
(AWT-EventQueue-0)[INFO] deployment.browser.vm.iexplorer=true
(AWT-EventQueue-0)[INFO] deployment.browser.vm.mozilla=true
(AWT-EventQueue-0)[INFO] deployment.cache.enabled=true
(AWT-EventQueue-0)[INFO] deployment.cache.jarcompression=0
(AWT-EventQueue-0)[INFO] deployment.cache.max.size=505
(AWT-EventQueue-0)[INFO] deployment.capture.mime.types=false
(AWT-EventQueue-0)[INFO] deployment.console.startup.mode=DISABLE
(AWT-EventQueue-0)[INFO] deployment.control.panel.log=false
(AWT-EventQueue-0)[INFO] deployment.javapi.cache.update=false
(AWT-EventQueue-0)[INFO] deployment.javapi.lifecycle.exception=true
(AWT-EventQueue-0)[INFO] deployment.javapi.log.filename=
(AWT-EventQueue-0)[INFO] deployment.javapi.runtime.type=0
(AWT-EventQueue-0)[INFO] deployment.javapi.stop.timeout=200
(AWT-EventQueue-0)[INFO] deployment.javapi.trace.filename=
etc
(AWT-EventQueue-0)[INFO] os.arch=x86
(AWT-EventQueue-0)[INFO] os.name=Windows XP
etc

Cut and paste all of this gumph into a PM for me - and it will help to find out whats going on!!!


Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #8 on: April 28, 2010, 07:32:24 PM »
Here's a quick vid of the Gait Designer in action.
Of course its not a real "walk" gait - but just a quick flavour blur


http://www.youtube.com/watch?v=llzWNdH2se8&hd=1
« Last Edit: April 28, 2010, 08:43:02 PM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: WebbotLib Gait Designer
« Reply #9 on: April 28, 2010, 10:31:54 PM »
How is data outputted?

For my own gait designer (which works through hyperterminal and is more crude might I note), it'll output an array of points, in array form, that I can just copy/paste into my code.

Also, I'd need the ability to view the positions on my robot as I select points of the gait.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #10 on: April 28, 2010, 11:24:28 PM »
How is data outputted?

For my own gait designer (which works through hyperterminal and is more crude might I note), it'll output an array of points, in array form, that I can just copy/paste into my code.

The plan is to write the gait to EEPROM directly from the Gait Designer. Since the Gaits can also be saved to the pc then you can always re-open the file and re-save to EEPROM.


Also, I'd need the ability to view the positions on my robot as I select points of the gait.

Yep - it does that....

You just click the 'Connect' button and it connects via UART to Axon(etc) running a WebbotLib program that uses the up'n'coming 'gaitDesigner' function.
Then as you move each limb on the pc the servo changes in real time.
Since the WebbotLib stuff hasn't been released yet then I've placed a hex file here http://webbot.org.uk/webbotlib/GaitDesigner.hex which supports 2 servos on E7 and H2. So load that onto your Axon and then connect it to your PC via UART1 at 115200 baud.
You can then control them from Gait Designer both in 'real time' and during a 'play'.




Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Ryltar

  • Full Member
  • ***
  • Posts: 74
  • Helpful? 1
    • GlitchTech Science
Re: WebbotLib Gait Designer
« Reply #11 on: April 29, 2010, 09:55:10 AM »
Am currently working on a Gait Designer....

I downloaded the file but no dice. When it runs, I get a gray screen with a rectangle at the bottom. The drop down menu in the upper left seems to work, but no matter what I do I cannot get any reaction from the gray screen. Running Ubuntu 9.10. I'll try it on my windows machine later.

How did you get on with your Windows machine?

The Gait Designer, like my other Designers, are Java based - so your machine will need a Java Runtime installed (JRE).

The Gait Designer also needs to access the serial ports and this means including some native libraries (ie a DLL for Windows or a SO for Unix) to allow that.

I only have Windows so the Unix side is impossible for me to test and it may mean I have to use certain naming conventions for Solaris/Linux/32bit/64bit etc. Have spent ages searching the web to no avail.

The serial library I use is called RXTX (http://rxtx.qbang.org/wiki/index.php/Download) and it includes 'native libraries' for lots of platforms. For Unix flavors these are all called "librxtxSerial.so" files. I include one in my distribution but whether its the "correct" one, or if its named correctly, I'm not sure.

The web page above gives a download that includes the Unix native libraries. As far as I can tell its just a question of copying the 'correct' SO file to your <Java>/jre/bin folder.

Any help from Unix folk appreciated.



It works just fine on the windows machine (XP, SP3), but I don't know too much about Java so I am afraid I cannot help you much. My linux machine didn't report any errors when running...

Offline klims

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: WebbotLib Gait Designer
« Reply #12 on: June 21, 2010, 03:36:17 AM »
Hi guys,

I'm trying to get the webbotlib Gait Designer working with my biped and am having some issues.
I am running the Axon and 16 software pwm controlled servos.

I have copied the code shown in the webbotlib documentation pdf and managed to compile, but I am getting a connection timeout error from within the program.

This is the main bit of code:
Code: [Select]
// Connect to terminal program via this uart at 115200 baud
#define UART1_RX_BUFFER_SIZE 40

#include "sys/Axon.h"
#include "Gait/GaitDesigner.h"
#include "servos.h"
#include "rprintf.h"
#include "uart.h"

// Define servos for my robot
#include "../../AAA_WebbotLib/hardware.c"

// Create the list - remember the place an & at the start of each servo name
SERVO_LIST right_arm[] = {&right_collar, &right_shoulder, &right_elbow};
SERVO_LIST left_arm[] = {&left_collar, &left_shoulder, &left_elbow};
SERVO_LIST right_leg[] = {&right_foot, &right_ankle, &right_knee, &right_thigh, &right_hip};
SERVO_LIST left_leg[] = {&left_foot, &left_ankle, &left_knee, &left_thigh, &left_hip};

// Create a driver for the list of servos
SERVO_DRIVER bank1 = MAKE_SERVO_DRIVER(right_arm);
SERVO_DRIVER bank2 = MAKE_SERVO_DRIVER(left_arm);
SERVO_DRIVER bank3 = MAKE_SERVO_DRIVER(right_leg);
SERVO_DRIVER bank4 = MAKE_SERVO_DRIVER(left_leg);

// Create a list of ALL servos across ALL banks
// The ordering in this list is the ordeing used by hte teminal program
ACTUATOR_LIST body[] =
{&right_foot.actuator, &right_ankle.actuator, &right_knee.actuator, &right_thigh.actuator,
&right_hip.actuator, &right_collar.actuator, &right_shoulder.actuator, &right_elbow.actuator,
&left_foot.actuator, &left_ankle.actuator, &left_knee.actuator, &left_thigh.actuator,
&left_hip.actuator, &left_collar.actuator, &left_shoulder.actuator, &left_elbow.actuator};

GAIT_DESIGNER gait = MAKE_GAIT_DESIGNER(body, UART1, (BAUD_RATE)115200);

void appInitHardware(void)
{
// Initialise the servo controller
servosInit(&bank1, TIMER1);
servosInit(&bank2, TIMER3);
servosInit(&bank3, TIMER4);
servosInit(&bank4, TIMER5);

rprintfInit(&uart1SendByte);
}

TICK_COUNT appInitSoftware(TICK_COUNT loopStart)
{
return 0;
}

// This is hte main loop
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart)
{
gaitDesignerProcess(&gait);
return 0;
}
Maybe someone sees something obviously wrong? I can't work it out.

I couldn't even get servosCenter to do anything useful! It seems as though I am missing something simple with the UART since I got the Hello World code working.

Any suggestions would be much appreciated.
Andrew

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #13 on: June 21, 2010, 06:36:08 AM »
In appInitHardware you are missing the following line:-

Code: [Select]
gaitDesignerInit(&gait);
Which initialises the UART and the gait system - so its rather key !

EDIT: when using servosCenter rather than gait you will need to initialise the uart yourself in appInitHardware ie uartInit(UART1, 115200);
« Last Edit: June 21, 2010, 06:47:10 AM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline klims

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: WebbotLib Gait Designer
« Reply #14 on: June 22, 2010, 02:57:38 AM »
Code: [Select]
gaitDesignerInit(&gait);Which initialises the UART and the gait system - so its rather key !
Champion! Thanks for that. Worked a treat.

Absolutely love what you have done. Much better to use than my hyperterminal method I hacked up a while back.

A team of us made something similar for our final year uni project last year for our humanoid Bioloid robot. We did some usability testing and what not so hopefully some of that feedback will be useful here.

1. Would be great if you could build the servosCenter into this program. Its a much nicer interface to use  :)
2. It really needs the ability to fine adjust servos. The slider is good to get a rough measure but not too precise.
       I think if I could manually enter a value I would be happy.
       It would also serve to fix my need to see some numbers on the screen. They can be useful when troubleshooting a motion.
3. Would be nice if I could group servos, say "Right Side" and "Left Side" , and minimise them when I'm not using. While this is not an issue when you have 6 servos it gets hard to use when you have 16+ servos.

Gaits need a lead in and lead out sequence.
Say for example in walking I need a lead in to start walking and then a bit that loops to continue walking and then a lead out to stop walking.
At the moment your program only loops from start to end. To be useful creating nice motions I would need the ability to set a lead in and lead out along with a repeat section. We probably found this the most difficult part of the gait creating software as depending on how your interpolation works you may run into some issues.


Once again fantastic job on software. Hope my feedback was useful.
Andrew.

Edit: also, the program chews up 100% of my CPU!
« Last Edit: June 22, 2010, 04:34:22 AM by klims »

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #15 on: June 22, 2010, 06:29:58 AM »
Thanks for the feedback - glad you got it all going.

As it says on the website - it is still 'work in progress' as its always good to get feedback to make sure I'm doing something useful !

Quote
Would be great if you could build the servosCenter into this program. Its a much nicer interface to use
The left hand panel, in the 'Servo' box, there is a 'Config' button. You must be connected when you click on it. It then does nothing !? It currently reads the servo center/range info (which is why you need to be connected) but I haven't yet done the window to let you tweak the values.

Quote
I think if I could manually enter a value I would be happy.
Each slider shows its current numeric value underneath as a percentage: ie in the range -100 to +100. So I may allow you to edit it or just have a spinner control to allow you to increment/decrement the values. The spinner is easier as I don't have to worry with stuff like input validation and range checking.

Quote
Would be nice if I could group servos ... and minimise
Good idea.
I was also thinking of allowing you to select more than one servo at a time so that you move several sliders at the same time.
I trust that you have also discovered that you can change the name of the servo from say 'Servo 1' to 'Left Ankle'

Quote
At the moment your program only loops from start to end.
The 'Repeat' drop down on the left allows you to choose 'Cycle' or 'Side To Side'. This is really only relevant to the design stage as once the standalone runtime is written then it will be up to you how you play the gait as well as the speed.

Quote
Gaits need a lead in and lead out sequence
I've been thinking about the best way to do this for a while now.
It could be done by having separate animations for the lead in and the lead out ie 3 animations in total.
OR when you are adding frames into the animation then you could set one as the end of the lead-in and another as the start of the lead-out. So it will play the lead in frames once, repeat the middle frames, and finish with the lead-out frames.

My only issue here is that it means you can only go into the 'lead-out' phase from the end of the main animation. But for an emergency stop when walking then you want to go straight into the lead-out from any given point - even from the lead-in.

So as an alternative I was thinking of having an 'idle pose' - ie standing upright. All animations could then start and end at the 'idle pose'. The lead-in could then automatically interpolate from the idle pose to the first frame in the animation. And the lead-out could be an automatic interpolation from the current servo positions to the idle pose.

CPU usage - it probably peaks when playing the animation as there is a lot of computation going on as well as trying to send out the serial data as fast as it can in order to maximise the frames per second.

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #16 on: June 22, 2010, 12:56:20 PM »
I've released a new version of Gait Designer with some of these changes in. See http://webbot.org.uk/iPoint/35.page

Next time you run the app it will auto-magically download the new version.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline klims

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: WebbotLib Gait Designer
« Reply #17 on: June 22, 2010, 03:02:53 PM »
I'll write a better reply tonight (I'm doing this from my phone).

In my experience of designing gaits with repeat points the best way to do it is to have a single motion with a lead in and lead out in it. Exactly as you mentioned with the idle stance between all motions. But that special 'emergency stop' is a pain in the behind. It has the tendancy to make a biped fall over. I think maybe a better way to go about it would be to have certain points in the motion that are like safe exits, predetermined stances in the motion that will not crash the robot if an emergency stop is needed.

So for example if I was designing a motion that had 10 stances:
1-2-3-4-5-6-7-8-9-10

1-3 might be the lead in, making 4 the repeat start. 8-10 is the lead out, making 7 the repeat end. So that means the cycled stances are 4-7.
There a couple stances that need to be exactly the same but I need to think about it for a sec.
It's probably worth mentioning that this is exactly how Bioloid were driving their robot. 

That's all I have for now but I'll post some more detailed thoughts tonight and give the new gait designer a go!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: WebbotLib Gait Designer
« Reply #18 on: June 22, 2010, 03:13:36 PM »
You really should have your biped balance sensors modify your gait in real time to improve balance.

You still have the same gait, but given various IMU values have it tweak the gait in real time, perhaps step further or not as far, etc.

I spoke with Webbot about this earlier, basically you're having dynamic balance issues, but the gait designer only works for static balance.

But yea, the transition phase is hard. What I do for my robot fish (it uses complex gaits) is have two gaits, and then interpolate between them for the transition. It works great for vectoring water thrust, but I don't have balance issues so its probably harder on a biped . . .

Offline klims

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: WebbotLib Gait Designer
« Reply #19 on: June 23, 2010, 12:00:10 AM »
Each slider shows its current numeric value underneath as a percentage: ie in the range -100 to +100. So I may allow you to edit it or just have a spinner control to allow you to increment/decrement the values. The spinner is easier as I don't have to worry with stuff like input validation and range checking.
I'm a little confused by this. Does it increment as a percentage or by +-1?
Lets say in my servo set up I say I want a range of +-500 is this being scaled to a percentage? Or have I lost some of my movement since I'm restricted to +-100???
I like your slider for rough adjustment but I really need the ability to do fine adjustments.

You really should have your biped balance sensors modify your gait in real time to improve balance.

You still have the same gait, but given various IMU values have it tweak the gait in real time, perhaps step further or not as far, etc.
Most definitely, but this is no easy feat. I tried with an accelerometer but you really need both an accelerometer and a gyro. One for stabilising motion and one for detecting inclines and what not.

The biggest problem I have come across in designing gaits is that if you want a motion to look natural and be relatively fast not all of the stances in the motion will be statically stable. I hacked up a solution that 'worked' but would love to hear some ideas.

I was also thinking of allowing you to select more than one servo at a time so that you move several sliders at the same time.
Personally I don't think this will be any use in my situation. Would just make it more of a pain to change between servos.
May be useful for other people though.

I trust that you have also discovered that you can change the name of the servo from say 'Servo 1' to 'Left Ankle'
Most definitely. This has been super handy.

The 'Repeat' drop down on the left allows you to choose 'Cycle' or 'Side To Side'. This is really only relevant to the design stage as once the standalone runtime is written then it will be up to you how you play the gait as well as the speed.
I have to admit I didn't really understand what was happening with this. I didn't immediately understand it so I gave up :-P

From what I can see this program only works if you are using the microcontroller as the servo controller. I am going to buy a dedicated servo controller for my robot so I was wondering how I might get it working with the Gait Designer.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #20 on: June 23, 2010, 04:59:54 AM »
Quote
I'm a little confused by this. Does it increment as a percentage or by +-1?
Lets say in my servo set up I say I want a range of +-500 is this being scaled to a percentage? Or have I lost some of my movement since I'm restricted to +-100???
I like your slider for rough adjustment but I really need the ability to do fine adjustments.
The percentage from the slider is interpolated to the range. So if your range is +-500us then +100%=>center+500us, 0%=>center and -100%=>center-500us. So a 1% step (the minimum step in the designer) will result in a step of 5us to the servo and you have 200 such distinct steps - most servos struggle to provide 90 different steps.

Quote
From what I can see this program only works if you are using the microcontroller as the servo controller. I am going to buy a dedicated servo controller for my robot so I was wondering how I might get it working with the Gait Designer.
WebbotLib already supports the Devantech SD21 servo controller. If you look this up in the WebbotLib documentation you will see that you only have to make a couple of changes to your program to use it. Gait Designer will then talk to your microcontroller and your microcontroller will send the commands out to the servo controller.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline klims

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: WebbotLib Gait Designer
« Reply #21 on: June 24, 2010, 02:23:46 AM »
The percentage from the slider is interpolated to the range.
I guess this is fine for the way servos are configured now (See my question at the end)

WebbotLib already supports the Devantech SD21 servo controller.
I would most likely get this controller. http://www.pololu.com/catalog/product/1356
This is one I can get in Aus, plus I like it better. I was having a read through the webbotlib documentation and I may be able to reuse the code from the Pololu motor driver.

I love the changes you have made to the program. I need a bigger screen to see all the information!!!
The only change I would suggest for the minute is maybe moving the location of the selection of the groups to the 'servos' section. Would be awesome if you could make it its own box like a servo, and it was always present just before the first servo. Its a pain to move the mouse so far to have to change groups.

CPU usage - it probably peaks when playing the animation as there is a lot of computation going on as well as trying to send out the serial data as fast as it can in order to maximise the frames per second.
My computer peaks as soon as I connect. I haven't really played any motions yet.
I'm running Gait Designer on a P4 2.8GHz. Thought that would have been plenty for this type of thing...


I have a problem with the way servos are defined/initialised with the webbotlib.
My robot is setup in such a way that is representative of the human body. For example the knee servo is at its maximum position when my robot is standing upright. This is a problem for me when I have to define a servo with a center value and a range that represents +- travel.
Ideally I would like to define a servo with a center, max, min.


Webbot: Have you had any thoughts about the gait?
I'll try to explain how I have been designing my gaits.

Lets say I was designing my 'walk forward' gait it would be made of the following key stances:

1. home position
2. lean left with right foot off the ground
3. right foot forward
4. lean right with left foot off the ground
5. left foot forward
6. lean left with right foot off the ground
7. right foot down.
8. home position

So lets say I wanted to walk forward 2 steps I would just run from 1-8.
If I wanted to walk continuously I would go from 1-6, then loop from 3-6 till I was ready to stop in which time I would go through to 8.

I'm pretty confident this is the easiest way to do it with what you have already written. Would just need the ability to plug in some repeat points for me to test my gait properly.
« Last Edit: June 24, 2010, 02:25:33 AM by klims »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: WebbotLib Gait Designer
« Reply #22 on: June 24, 2010, 07:03:16 AM »
Quote
My computer peaks as soon as I connect. I haven't really played any motions yet.
I'm running Gait Designer on a P4 2.8GHz. Thought that would have been plenty for this type of thing...
Somethings up, as Project Designer takes up 30% of my resources as well even when I'm not doing anything. It'll be fine until I load up a board. I'm suspecting its a related problem . . .

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #23 on: June 24, 2010, 08:25:15 AM »
My computer peaks as soon as I connect. I haven't really played any motions yet.
I'm running Gait Designer on a P4 2.8GHz. Thought that would have been plenty for this type of thing...
As soon as you click the connect button then it starts sending out commands and listening for responses over the serial port. Since I can't use interrupts on the PC then it has to constantly poll the serial port. Hence the CPU goes right up. I'm running on a 1.8Ghz P4 which works fine.
Admin: your 'problem' is different (as the Project Designer doesn't use the serial port on the PC) and as I've said before I think this caused by the timer event to flash the selected headers on the image.


I have a problem with the way servos are defined/initialised with the webbotlib.
My robot is setup in such a way that is representative of the human body. For example the knee servo is at its maximum position when my robot is standing upright. This is a problem for me when I have to define a servo with a center value and a range that represents +- travel.
Ideally I would like to define a servo with a center, max, min.
I wont be changing the servo set up. You may be assuming that the standing position requires all servos to be in the center position which isn't the case. Just set the knee joints to be at 100%.

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: WebbotLib Gait Designer
« Reply #24 on: June 24, 2010, 08:36:18 AM »
Quote
As soon as you click the connect button then it starts sending out commands and listening for responses over the serial port. Since I can't use interrupts on the PC then it has to constantly poll the serial port. Hence the CPU goes right up. I'm running on a 1.8Ghz P4 which works fine.
Admin: your 'problem' is different (as the Project Designer doesn't use the serial port on the PC) and as I've said before I think this caused by the timer event to flash the selected headers on the image.
Hmmm but Hyperterminal doesn't use 100% . . . maybe its a java thing, but it sounds a bit odd to me . . .

Why so much processing power to make things flash once per second?

This is a major issue for those with a laptop and without access to a wall outlet, such as at a robot competition . . . this will quickly drain a battery.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #25 on: June 24, 2010, 08:55:31 AM »
On my 1.8GHz laptop I can't get the CPU to go above about 8% in Project Designer even with lots of things flashing. Other than during intense periods like loading and saving files, auto route and code generation.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: WebbotLib Gait Designer
« Reply #26 on: June 24, 2010, 09:26:06 AM »
On my 1.8GHz laptop I can't get the CPU to go above about 8% in Project Designer even with lots of things flashing. Other than during intense periods like loading and saving files, auto route and code generation.
Got a Dell Inspiron 9400 running, at 1.6GHz (if I remember right) and 4gb RAM, on XP. 30% gets used as soon as I load up a project file. No problem at all on my work PC, also XP.

Offline klims

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: WebbotLib Gait Designer
« Reply #27 on: June 24, 2010, 07:59:33 PM »
As soon as you click the connect button then it starts sending out commands and listening for responses over the serial port. Since I can't use interrupts on the PC then it has to constantly poll the serial port. Hence the CPU goes right up.
I figured as much. Is there no way to set up some kind of event listener? Or maybe you could somehow cap the refresh rate.

Just saw the new feed from your website. Thanks for the mention!  ;D

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib Gait Designer
« Reply #28 on: June 24, 2010, 08:25:07 PM »
Can I use an event listener? Well believe me there are loads of listeners in the app - all very quick and non-obtrusive. The app is in Java so that it works, ideally, on PC, Mac, Unix etc. But Java has no inherent serial comms - so I use the 3rd party RxTx libs as used by loads of other people privately and commercially (including the Arduino IDE). This uses input and output streams but means that I can only detect incoming chars by polling - there is no 'wait until a character arrives' kinda function or event.

Are we looking at a 'non problem' here. ie when connected to the robot you need to send commands as fast as possible, to stop jerkiness, but that obviously requires CPU. If you are disconnected from the robot then you can still make changes and the CPU usage is almost zero.  What other apps are you running that need lots of CPU whilst the PC is controlling your humanoid?

Of course if you are familiar with RxTx libs in Java then I'd welcome any suggestions.

« Last Edit: June 24, 2010, 08:27:35 PM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline klims

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Re: WebbotLib Gait Designer
« Reply #29 on: June 24, 2010, 09:24:29 PM »
What other apps are you running that need lots of CPU whilst the PC is controlling your humanoid?
I don't know why this made me laugh, but it did  ;D I still use my pc for pc purposes like web browsing, music playing etc. I guess its mainly a pain because the computer becomes unresponsive. When I try to save my progress without disconnecting everything locks up.

I am by no means an experienced Java programmer. I had to do some in uni but that's about it. Some of my mates may be though so I'll ask around.

I agree that this is a 'non-problem' and your time is better spent on other features. If I come up with anything I'll be sure to let you know

 


Get Your Ad Here

data_list