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

RN1 and maths routines.

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
14 postsPage 1 of 1
14 postsPage 1 of 1

RN1 and maths routines.

Post by DirtyRoboto » Tue Sep 19, 2006 6:38 pm

Post by DirtyRoboto
Tue Sep 19, 2006 6:38 pm

My RN1 is on order but this topic interests me.

I am looking to use maths algorithms to suppliment the servo control, by the answers to some posts it looks like I would have to go custom :(

My main focus is elasticity emulation. I wish to give the servos some elastic properties so the pose is arrived at via force calculated elastic bounce.

I wish to use mass and velocity to calculate muscle and joint give for any given motion and replicate this in the RN1 or similar bipedal platform.

I guess that using math mods is not available unless....

If I were to model the RN1 on my PC and apply the math to compile a set of instructions, then the math modded instruction set would then run on the RN1 platform as a preset routine.

This would be great for what I am looking to do. Is this a done thing or is it so hard that I may aswell build my own control board?

Thx all (my first post)

Marcus.
My RN1 is on order but this topic interests me.

I am looking to use maths algorithms to suppliment the servo control, by the answers to some posts it looks like I would have to go custom :(

My main focus is elasticity emulation. I wish to give the servos some elastic properties so the pose is arrived at via force calculated elastic bounce.

I wish to use mass and velocity to calculate muscle and joint give for any given motion and replicate this in the RN1 or similar bipedal platform.

I guess that using math mods is not available unless....

If I were to model the RN1 on my PC and apply the math to compile a set of instructions, then the math modded instruction set would then run on the RN1 platform as a preset routine.

This would be great for what I am looking to do. Is this a done thing or is it so hard that I may aswell build my own control board?

Thx all (my first post)

Marcus.
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by DirtyRoboto » Tue Sep 19, 2006 8:54 pm

Post by DirtyRoboto
Tue Sep 19, 2006 8:54 pm

Looks like the amount of views vs the amount of replies = non starter.

I must be on the cusp of knowing that I am going to have to hack the firmware, tssk! not what I needed.

So I take it that you cannot impliment envelopes on individual servos?
or if you can then they are very basic envelopes.

Is the lack of response to this query through ignorance or insight?
ie. you dont know what I want to achive or you have tried and failed!

I am looking at creating custom envelopes governed by maths to apply to the control of servos.
Is this possible with the RN1 platform or not?
Has anyone tried?
Has anyone tried and failed? why?

Is the use of dynamic expression restricted by the control language and is there any way of supplimenting the control language with pure code?

In short, can I interface with my RN1 on a direct basis getting it to run routines based on math results?
Looks like the amount of views vs the amount of replies = non starter.

I must be on the cusp of knowing that I am going to have to hack the firmware, tssk! not what I needed.

So I take it that you cannot impliment envelopes on individual servos?
or if you can then they are very basic envelopes.

Is the lack of response to this query through ignorance or insight?
ie. you dont know what I want to achive or you have tried and failed!

I am looking at creating custom envelopes governed by maths to apply to the control of servos.
Is this possible with the RN1 platform or not?
Has anyone tried?
Has anyone tried and failed? why?

Is the use of dynamic expression restricted by the control language and is there any way of supplimenting the control language with pure code?

In short, can I interface with my RN1 on a direct basis getting it to run routines based on math results?
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by DirtyRoboto » Tue Sep 19, 2006 9:08 pm

Post by DirtyRoboto
Tue Sep 19, 2006 9:08 pm

Ok, let just say I want all servos above the waist to run a 2hz sine wave and I want all servos below waist to run a 1.5 hz sine wave.
Is this possible?
Then would it be possible to modulate the sine waves in question?

Could I take an audio input and get the frequecies to trigger preset moves that are modulated by the rhythm vs frequency to make the RN1 execute a list of moves based on the audio input.
I know this is possible, but is it possible with the RN1?
Ok, let just say I want all servos above the waist to run a 2hz sine wave and I want all servos below waist to run a 1.5 hz sine wave.
Is this possible?
Then would it be possible to modulate the sine waves in question?

Could I take an audio input and get the frequecies to trigger preset moves that are modulated by the rhythm vs frequency to make the RN1 execute a list of moves based on the audio input.
I know this is possible, but is it possible with the RN1?
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by Bullit » Tue Sep 19, 2006 9:18 pm

Post by Bullit
Tue Sep 19, 2006 9:18 pm

Check this http://trixie.eecs.berkeley.edu/raptor/Publications/GettingStartedUsingRoboBASIC.pdf#search=%22robonova%20sine%20wave%22

Robobasic has it limitations in realtime control. You can however compute complex motions on your PC and program them into the control for complete playback. The ATMega128 in the RN-1 is limited to robobasic for the moment but some folks here like ibot are reverse engineerng that code to hopefully allow us to build our own C code at some point. As an alternative there are other controllers. Its just difficult to replace all the functioanlity that the robobasic application offers such as catch and play - the ability to read back the positions of the HSR-8498's or gyro correction.
Check this http://trixie.eecs.berkeley.edu/raptor/Publications/GettingStartedUsingRoboBASIC.pdf#search=%22robonova%20sine%20wave%22

Robobasic has it limitations in realtime control. You can however compute complex motions on your PC and program them into the control for complete playback. The ATMega128 in the RN-1 is limited to robobasic for the moment but some folks here like ibot are reverse engineerng that code to hopefully allow us to build our own C code at some point. As an alternative there are other controllers. Its just difficult to replace all the functioanlity that the robobasic application offers such as catch and play - the ability to read back the positions of the HSR-8498's or gyro correction.
Image
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by DirtyRoboto » Tue Sep 19, 2006 9:28 pm

Post by DirtyRoboto
Tue Sep 19, 2006 9:28 pm

By my understanding, RoboBasic is a high level language. Not suited for a fast uncomplied run.

It would seem to me that just poking the correct registers with the values requried would be the perfect solution.

I take it from the information that I have so far attained that the regestry locations of the control board have yet to be discovered!

So if i know the servo 05 takes its information for a unknown location that i discover to be $wxyx then I can poke my math into $wxyz and expect the servo to read the string of info (from my math) into a real movment?
By my understanding, RoboBasic is a high level language. Not suited for a fast uncomplied run.

It would seem to me that just poking the correct registers with the values requried would be the perfect solution.

I take it from the information that I have so far attained that the regestry locations of the control board have yet to be discovered!

So if i know the servo 05 takes its information for a unknown location that i discover to be $wxyx then I can poke my math into $wxyz and expect the servo to read the string of info (from my math) into a real movment?
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by DirtyRoboto » Tue Sep 19, 2006 9:42 pm

Post by DirtyRoboto
Tue Sep 19, 2006 9:42 pm

could this information.....

HIGHSPEED SETON
SPEED 15
MOVE G24, 74, 66, 142, 108, 140, , 189, 92, 97, , , , 158, 23, 50, , , , 89, 69, 144, 106, 91,

not be condensed into pure code (ie. machinecode) negating the compile. and the be modified by a realtime math subroutine pokeing the modified values straight into the controller?
could this information.....

HIGHSPEED SETON
SPEED 15
MOVE G24, 74, 66, 142, 108, 140, , 189, 92, 97, , , , 158, 23, 50, , , , 89, 69, 144, 106, 91,

not be condensed into pure code (ie. machinecode) negating the compile. and the be modified by a realtime math subroutine pokeing the modified values straight into the controller?
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by Bullit » Tue Sep 19, 2006 10:11 pm

Post by Bullit
Tue Sep 19, 2006 10:11 pm

No. Not within robobasic. The compiled robobasic is an intermediate code. When downloaded to the robot its put in the mr-c3024's serial eeprom chip. It executes directly from the serial eeprom on the mr-c3024. The ATMega128 actually only has 4k of ram. Its robobasic applicaton executes almost completely from flash.
No. Not within robobasic. The compiled robobasic is an intermediate code. When downloaded to the robot its put in the mr-c3024's serial eeprom chip. It executes directly from the serial eeprom on the mr-c3024. The ATMega128 actually only has 4k of ram. Its robobasic applicaton executes almost completely from flash.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by DirtyRoboto » Wed Sep 20, 2006 5:33 am

Post by DirtyRoboto
Wed Sep 20, 2006 5:33 am

So I have bought the wrong platform :(

Never mind. I have some balance issues that I need to explore and a bipedal robot is what I was looking for. I am just a bit dissapointed that the programming is not as involved as I wanted.

thx Marcus.
So I have bought the wrong platform :(

Never mind. I have some balance issues that I need to explore and a bipedal robot is what I was looking for. I am just a bit dissapointed that the programming is not as involved as I wanted.

thx Marcus.
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by XenoEvil » Wed Sep 20, 2006 9:26 am

Post by XenoEvil
Wed Sep 20, 2006 9:26 am

Even if you compute the complex motion control on the PC and turn it into a set of motions, you are at best just generating a complex set of positions. Albeit they may be a far better quality of positions supported by the kinematic model.

The standard robonova control is however positional control only and you will not be able to run dynamic calculations through it without modifying.

I had an idea of adding a basic stamp or PIC as a dynamic filter/mixer. You could put it inline with servos. ie read the servo pulse code coming from the nova (the position control) and modify this based on additonal sensors, gyros, filters etc and output a modified pulse (dynamic control)to the servo.

That way you could still have the friendy functions of Robobasic but let the secondry processor worry about maintaining balance, disturdance, gyro damping and a whole host of other functions.
Even if you compute the complex motion control on the PC and turn it into a set of motions, you are at best just generating a complex set of positions. Albeit they may be a far better quality of positions supported by the kinematic model.

The standard robonova control is however positional control only and you will not be able to run dynamic calculations through it without modifying.

I had an idea of adding a basic stamp or PIC as a dynamic filter/mixer. You could put it inline with servos. ie read the servo pulse code coming from the nova (the position control) and modify this based on additonal sensors, gyros, filters etc and output a modified pulse (dynamic control)to the servo.

That way you could still have the friendy functions of Robobasic but let the secondry processor worry about maintaining balance, disturdance, gyro damping and a whole host of other functions.
XenoEvil
Robot Builder
Robot Builder
User avatar
Posts: 15
Joined: Tue Jul 18, 2006 1:00 am

Post by limor » Wed Sep 20, 2006 11:36 am

Post by limor
Wed Sep 20, 2006 11:36 am

So you want to simulate elasticity and muscles taking into consideration mass of body parts.. wow!

Some flexing and suspension effects can be seen here:
http://robosavvy.com/Builders/limor/KHR2-flex.wmv
http://www.majingaa.com/movies/2006


You could measure the current consumption and shaft position on each servo.
Current and torque in motor control are usually linear.
Knowing the torque and position and supposed you knew also the intertia tensor of each moving part, together with accelerometer data you could then build a model representing the robot part's dynamics.
measuring current consumption can be done for example by measuring the voltage across a resistor thats put in parrallel to the power line and feeding this to an A/D port on the atmega.

Maybe a simpler way is to put a few accelerometers on the robot and from their data build the robot dynamics model.

From this model you can then determine how you want the servos to react to various impacts... in a flex/muscle kind of way.

RoboBasic is an interpreted language like Basic, Java and .NET but very very basic and it will be difficult to do the flex tricks without low level code.
So you could use a fresh Atmega128 on your RN1 controler that will allow you to program it with a C compiler. (unfortunately we haven't cracked a way to flash the RN1's controler with proprietry code yet).

Alternatively use another controler board that has 16 servo outputs (Robostix (gumstix.com) may be ok but i'm not sure if it supports 16 servos and several others were mentioned in this forum).
So you want to simulate elasticity and muscles taking into consideration mass of body parts.. wow!

Some flexing and suspension effects can be seen here:
http://robosavvy.com/Builders/limor/KHR2-flex.wmv
http://www.majingaa.com/movies/2006


You could measure the current consumption and shaft position on each servo.
Current and torque in motor control are usually linear.
Knowing the torque and position and supposed you knew also the intertia tensor of each moving part, together with accelerometer data you could then build a model representing the robot part's dynamics.
measuring current consumption can be done for example by measuring the voltage across a resistor thats put in parrallel to the power line and feeding this to an A/D port on the atmega.

Maybe a simpler way is to put a few accelerometers on the robot and from their data build the robot dynamics model.

From this model you can then determine how you want the servos to react to various impacts... in a flex/muscle kind of way.

RoboBasic is an interpreted language like Basic, Java and .NET but very very basic and it will be difficult to do the flex tricks without low level code.
So you could use a fresh Atmega128 on your RN1 controler that will allow you to program it with a C compiler. (unfortunately we haven't cracked a way to flash the RN1's controler with proprietry code yet).

Alternatively use another controler board that has 16 servo outputs (Robostix (gumstix.com) may be ok but i'm not sure if it supports 16 servos and several others were mentioned in this forum).
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by DirtyRoboto » Wed Sep 20, 2006 8:47 pm

Post by DirtyRoboto
Wed Sep 20, 2006 8:47 pm

XenoEvil... I had an idea of adding a basic stamp or PIC as a dynamic filter/mixer. You could put it inline with servos. ie read the servo pulse code coming from the nova (the position control) and modify this based on additonal sensors, gyros, filters etc and output a modified pulse (dynamic control)to the servo.

Inline elctronics seems like a good fix untill you consider feedback issues. You would need a seperate control board to govern the inlines.
------
limor... So you want to simulate elasticity and muscles taking into consideration mass of body parts..

I want to teach the hidden factor of material dynamics to a robotical simulation of what a humans body does for it autonomically.

What happens when you are running and need to slow down?
Imagine what the body does to achieve this slowing down from a fast pace!

A lot of the energy is taken by a rear tilt and short absorbing (gradual bending of the joints, allowing the limb to power through the motion) steps that use a curve related to balance to bring the body upright at the end of the slow down. This curve depends on force feedback applied to the surface through the feet by the angle of rear tilt.
The legs operation and angle of mass in this action is critical by robot standards but a thing of insignificance for 99% of people.

I am really intersted in defining a basic set of physics rules that a given system has to operate in, i look to manifesting this in bipedal robots to aid old people.


Thx Marcus
XenoEvil... I had an idea of adding a basic stamp or PIC as a dynamic filter/mixer. You could put it inline with servos. ie read the servo pulse code coming from the nova (the position control) and modify this based on additonal sensors, gyros, filters etc and output a modified pulse (dynamic control)to the servo.

Inline elctronics seems like a good fix untill you consider feedback issues. You would need a seperate control board to govern the inlines.
------
limor... So you want to simulate elasticity and muscles taking into consideration mass of body parts..

I want to teach the hidden factor of material dynamics to a robotical simulation of what a humans body does for it autonomically.

What happens when you are running and need to slow down?
Imagine what the body does to achieve this slowing down from a fast pace!

A lot of the energy is taken by a rear tilt and short absorbing (gradual bending of the joints, allowing the limb to power through the motion) steps that use a curve related to balance to bring the body upright at the end of the slow down. This curve depends on force feedback applied to the surface through the feet by the angle of rear tilt.
The legs operation and angle of mass in this action is critical by robot standards but a thing of insignificance for 99% of people.

I am really intersted in defining a basic set of physics rules that a given system has to operate in, i look to manifesting this in bipedal robots to aid old people.


Thx Marcus
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by XenoEvil » Thu Sep 21, 2006 8:54 am

Post by XenoEvil
Thu Sep 21, 2006 8:54 am

I'd have to say the exact opersite. Having the inline processor would enable you to receive feedback from sensors/servos far better than trying to do it from RoboNova's board. (Given that you spec enough i/o ports) The RoboNova's board does no read the servo positions at all during motion. It is open loop control at the robobasic level.

You would effectively be encapsulating a control loop within another, which is exactly what you said. What we do naturaly, we do not have to think about, it is a low level control function.

Also you are talking about disipating the momentum during slowing down using a series elastic principle like humans do with springy tendons. This is not linear control equation. Check the CLAWAR web site for white papers on this subject. Also google for series elastic actuation and check out the maths.

Interested to here how you progress.
I'd have to say the exact opersite. Having the inline processor would enable you to receive feedback from sensors/servos far better than trying to do it from RoboNova's board. (Given that you spec enough i/o ports) The RoboNova's board does no read the servo positions at all during motion. It is open loop control at the robobasic level.

You would effectively be encapsulating a control loop within another, which is exactly what you said. What we do naturaly, we do not have to think about, it is a low level control function.

Also you are talking about disipating the momentum during slowing down using a series elastic principle like humans do with springy tendons. This is not linear control equation. Check the CLAWAR web site for white papers on this subject. Also google for series elastic actuation and check out the maths.

Interested to here how you progress.
XenoEvil
Robot Builder
Robot Builder
User avatar
Posts: 15
Joined: Tue Jul 18, 2006 1:00 am

Post by DirtyRoboto » Thu Sep 21, 2006 6:01 pm

Post by DirtyRoboto
Thu Sep 21, 2006 6:01 pm

Thankyou XenoEvil. just what I wanted to know about the inline hack. I sat and thought about it more and after reading some posts started to like the idea.

XenoEvil said "This is not linear control equation. Check the CLAWAR web site for white papers on this subject. Also google for series elastic actuation and check out the maths. "

Ok, the simulation I am looking at is of the action i described but not the resolution that you are hinting at. I do not want to produce a human action verbatim but get the robot to get the same end result using basic math to produce the servo action needed to achive the goal of slowing and stopping from a positive (forward) running stance.

Marcus.
Thankyou XenoEvil. just what I wanted to know about the inline hack. I sat and thought about it more and after reading some posts started to like the idea.

XenoEvil said "This is not linear control equation. Check the CLAWAR web site for white papers on this subject. Also google for series elastic actuation and check out the maths. "

Ok, the simulation I am looking at is of the action i described but not the resolution that you are hinting at. I do not want to produce a human action verbatim but get the robot to get the same end result using basic math to produce the servo action needed to achive the goal of slowing and stopping from a positive (forward) running stance.

Marcus.
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

Post by CaptKill4Fun » Sat Sep 23, 2006 11:55 pm

Post by CaptKill4Fun
Sat Sep 23, 2006 11:55 pm

DirtyRoboto wrote:could this information.....

HIGHSPEED SETON
SPEED 15
MOVE G24, 74, 66, 142, 108, 140, , 189, 92, 97, , , , 158, 23, 50, , , , 89, 69, 144, 106, 91,

not be condensed into pure code (ie. machinecode) negating the compile. and the be modified by a realtime math subroutine pokeing the modified values straight into the controller?



8) Hi,

I don't see why not ... the CPU in any computer just crunches the code it sees so if you can find the program start address and memory blocks for each servo, then you could write a CR-3024 machine-language program to send data from your own array of moves to the servos ... but I wouldn't expect the bit or byte level documentation of the controller board to be public ... although it should be open to end-user open-source programming ...

I guess the ideal system would be a capture app on the PC that captures streaming data of movements from the RoboNova-1 servos as you move it about ... and a simulator on the PC that allows editing and "cleaning" the code to be sent back to the RoboNova-1 as a "routine" itself ... when invoked the one big routine would be streaming data to the servos for fluid like motion ...

The current step-by-step motion capture is much more tedious but can be used to create larger smooth movements ... it's just a lot of hands-on work ...

DirtyRoboto wrote:could this information.....

HIGHSPEED SETON
SPEED 15
MOVE G24, 74, 66, 142, 108, 140, , 189, 92, 97, , , , 158, 23, 50, , , , 89, 69, 144, 106, 91,

not be condensed into pure code (ie. machinecode) negating the compile. and the be modified by a realtime math subroutine pokeing the modified values straight into the controller?



8) Hi,

I don't see why not ... the CPU in any computer just crunches the code it sees so if you can find the program start address and memory blocks for each servo, then you could write a CR-3024 machine-language program to send data from your own array of moves to the servos ... but I wouldn't expect the bit or byte level documentation of the controller board to be public ... although it should be open to end-user open-source programming ...

I guess the ideal system would be a capture app on the PC that captures streaming data of movements from the RoboNova-1 servos as you move it about ... and a simulator on the PC that allows editing and "cleaning" the code to be sent back to the RoboNova-1 as a "routine" itself ... when invoked the one big routine would be streaming data to the servos for fluid like motion ...

The current step-by-step motion capture is much more tedious but can be used to create larger smooth movements ... it's just a lot of hands-on work ...

:
"http://www.OPECoftheWest.com/"
Purveyors of Autonomous & R/C Robot Games ...
:
CaptKill4Fun
Savvy Roboteer
Savvy Roboteer
Posts: 100
Joined: Sat May 27, 2006 1:00 am
Location: Tucson


14 postsPage 1 of 1
14 postsPage 1 of 1