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

What is he doing??

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

What is he doing??

Post by Entrastic » Sun Jan 20, 2008 9:12 pm

Post by Entrastic
Sun Jan 20, 2008 9:12 pm

Guys,

I found couple of old servos in my room and wanted to test them. So I connected them to my Robonova and was messing aroudn with the values for all the servos in the 'standard pose' to figure out the servo number.

below is the code I was using.


DIM A AS BYTE
DIM A16 AS BYTE

DIM v AS BYTE


PTP SETON
PTP ALLON

'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,1,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0

'== motor start position read ===================
GETMOTORSET G6A,1,1,1,1,1,0
GETMOTORSET G6B,1,1,1,0,0,0
GETMOTORSET G6C,1,1,1,0,0,0
GETMOTORSET G6D,1,1,1,1,1,0

SPEED 5

'== motor power on =============================
MOTOR G24

GOSUB standard_pose

'================================================
MAIN:



' MOVE G24, ,90, , , , , , , , , , , , , , , , , , , , , ,


'================================================
standard_pose:
MOVE G6A,100, 76, 145, 93, 100, 50
MOVE G6D,100, 76, 145, 93, 100, 50
MOVE G6B,100, 30, 80, 160,160, 160
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN
'================================================
'

As I was testign a single line in the program, I didnt include anythign in the main. Then later I uploaed the entire program to my robonova and this is what he did. Please note that my hand is there in the video just to make sure he doesnt fall off. Can some one tell me why he is doing this ritual everytime i turn him on without me programming it. Am I doing something stupid. Is there any simple explanation??

http://www.youtube.com/watch?v=JpOX29FwWlg


Code: Select all
[media]http://www.youtube.com/watch?v=JpOX29FwWlg&rel=1[/media]
Guys,

I found couple of old servos in my room and wanted to test them. So I connected them to my Robonova and was messing aroudn with the values for all the servos in the 'standard pose' to figure out the servo number.

below is the code I was using.


DIM A AS BYTE
DIM A16 AS BYTE

DIM v AS BYTE


PTP SETON
PTP ALLON

'== motor diretion setting ======================
DIR G6A,1,0,0,1,0,0
DIR G6B,1,1,1,1,1,1
DIR G6C,0,0,0,0,0,0
DIR G6D,0,1,1,0,1,0

'== motor start position read ===================
GETMOTORSET G6A,1,1,1,1,1,0
GETMOTORSET G6B,1,1,1,0,0,0
GETMOTORSET G6C,1,1,1,0,0,0
GETMOTORSET G6D,1,1,1,1,1,0

SPEED 5

'== motor power on =============================
MOTOR G24

GOSUB standard_pose

'================================================
MAIN:



' MOVE G24, ,90, , , , , , , , , , , , , , , , , , , , , ,


'================================================
standard_pose:
MOVE G6A,100, 76, 145, 93, 100, 50
MOVE G6D,100, 76, 145, 93, 100, 50
MOVE G6B,100, 30, 80, 160,160, 160
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN
'================================================
'

As I was testign a single line in the program, I didnt include anythign in the main. Then later I uploaed the entire program to my robonova and this is what he did. Please note that my hand is there in the video just to make sure he doesnt fall off. Can some one tell me why he is doing this ritual everytime i turn him on without me programming it. Am I doing something stupid. Is there any simple explanation??

http://www.youtube.com/watch?v=JpOX29FwWlg


Code: Select all
[media]http://www.youtube.com/watch?v=JpOX29FwWlg&rel=1[/media]
Entrastic
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Fri Oct 05, 2007 7:43 am

Post by Entrastic » Sun Jan 20, 2008 9:19 pm

Post by Entrastic
Sun Jan 20, 2008 9:19 pm

oops... the video didnt get embedded here. Let me try it again. Btw, if this doesnt work, please click on the you tube link i have posted in the last video

Code: Select all
<embed src="http://www.youtube.com/v/JpOX29FwWlg&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>


<embed src="http://www.youtube.com/v/JpOX29FwWlg&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>
oops... the video didnt get embedded here. Let me try it again. Btw, if this doesnt work, please click on the you tube link i have posted in the last video

Code: Select all
<embed src="http://www.youtube.com/v/JpOX29FwWlg&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>


<embed src="http://www.youtube.com/v/JpOX29FwWlg&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>
Entrastic
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Fri Oct 05, 2007 7:43 am

Post by Pev » Sun Jan 20, 2008 11:03 pm

Post by Pev
Sun Jan 20, 2008 11:03 pm

I think you are missing a goto main in the code - so instead of waiting for a command he is just cycling through all the motions in the file. Try putting a goto main in the code here :


SPEED 5

'== motor power on =============================
MOTOR G24

GOSUB standard_pose

'================================================
MAIN:



' MOVE G24, ,90, , , , , , , , , , , , , , , , , , , , , ,

Goto MAIN
'================================================
standard_pose:
MOVE G6A,100, 76, 145, 93, 100, 50
MOVE G6D,100, 76, 145, 93, 100, 50
MOVE G6B,100, 30, 80, 160,160, 160
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN

Obviously in the code sample you have shown that will just get him to stand up and then do nothing. The standard templates have the code for the main loop with the IR and everything.

Hope that helps and check the syntax as I am doing that from memory :)

Pev
I think you are missing a goto main in the code - so instead of waiting for a command he is just cycling through all the motions in the file. Try putting a goto main in the code here :


SPEED 5

'== motor power on =============================
MOTOR G24

GOSUB standard_pose

'================================================
MAIN:



' MOVE G24, ,90, , , , , , , , , , , , , , , , , , , , , ,

Goto MAIN
'================================================
standard_pose:
MOVE G6A,100, 76, 145, 93, 100, 50
MOVE G6D,100, 76, 145, 93, 100, 50
MOVE G6B,100, 30, 80, 160,160, 160
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN

Obviously in the code sample you have shown that will just get him to stand up and then do nothing. The standard templates have the code for the main loop with the IR and everything.

Hope that helps and check the syntax as I am doing that from memory :)

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by Entrastic » Mon Jan 21, 2008 3:44 am

Post by Entrastic
Mon Jan 21, 2008 3:44 am

Pev wrote: he is just cycling through all the motions in the file.


Hi Pev,

That is exactly the weird thing. I have no other motions in the file. What I have pasted in my first post is all that is there in the file that I uploaded to the robonova. He was supposed to just standup and do nothing. Instead he started doing all that moves out of no where.
Pev wrote: he is just cycling through all the motions in the file.


Hi Pev,

That is exactly the weird thing. I have no other motions in the file. What I have pasted in my first post is all that is there in the file that I uploaded to the robonova. He was supposed to just standup and do nothing. Instead he started doing all that moves out of no where.
Entrastic
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Fri Oct 05, 2007 7:43 am

Post by Midas » Mon Jan 21, 2008 7:35 am

Post by Midas
Mon Jan 21, 2008 7:35 am

Try adding
FILL 255,10000
to the top of the program.
Try adding
FILL 255,10000
to the top of the program.
Midas
Robot Builder
Robot Builder
User avatar
Posts: 12
Joined: Fri Dec 14, 2007 2:29 pm
Location: Moscow, Russia

Post by Pev » Mon Jan 21, 2008 9:04 am

Post by Pev
Mon Jan 21, 2008 9:04 am

Ah I see. Well it obviously has not cleared all the other memory and has dropped past your code to previous code. Try putting a goto main after the standard pose routine. It is not a fix just a test as this will make the code you have written loopand thus not drop out past it.

Also I have a vague recollection that the roboBasic interface has a clear memory menu option (I may be mistaken it been a while since I ran it up (bloody work)).

Pev
Ah I see. Well it obviously has not cleared all the other memory and has dropped past your code to previous code. Try putting a goto main after the standard pose routine. It is not a fix just a test as this will make the code you have written loopand thus not drop out past it.

Also I have a vague recollection that the roboBasic interface has a clear memory menu option (I may be mistaken it been a while since I ran it up (bloody work)).

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by Entrastic » Mon Jan 21, 2008 9:37 am

Post by Entrastic
Mon Jan 21, 2008 9:37 am

thanx Pev and Midas.

But bad news guys...I tried clearing the memory and it didnt make a difference. He continued doing the same thing.

Then I tried using the Fill command as suggest by Midas. Only difference in the performace was that he waited for few secodns before doing his crazy moves.

This is really interesting. So it is not because of any garbage in the memory. So what can this be due to?
thanx Pev and Midas.

But bad news guys...I tried clearing the memory and it didnt make a difference. He continued doing the same thing.

Then I tried using the Fill command as suggest by Midas. Only difference in the performace was that he waited for few secodns before doing his crazy moves.

This is really interesting. So it is not because of any garbage in the memory. So what can this be due to?
Entrastic
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Fri Oct 05, 2007 7:43 am

Post by i-Bot » Mon Jan 21, 2008 10:41 am

Post by i-Bot
Mon Jan 21, 2008 10:41 am

As Pev described the fix for this is to make the correction to the code by adding the "GOTO main", or just "done: GOTO done" if you don't want to repeat

Without this you are hitting the return at the end of the standard_pose, when you never made a gosub. You are pulling an invalid return address of the stack and jumping to somewhere undefined.

The download of a program only writes the region where the program actually resides, so old programs are not always overwritten. The clear memory, only clears the header at the bottom of memory.

The FILL will not fix the problem, in fact it is probably part ot the reason for odd effects, since it leaves more code in high memory, with a lot of NOP in front. Don't use FILL in normal programs unless you need it, it just wastes space and make downloads longer.
As Pev described the fix for this is to make the correction to the code by adding the "GOTO main", or just "done: GOTO done" if you don't want to repeat

Without this you are hitting the return at the end of the standard_pose, when you never made a gosub. You are pulling an invalid return address of the stack and jumping to somewhere undefined.

The download of a program only writes the region where the program actually resides, so old programs are not always overwritten. The clear memory, only clears the header at the bottom of memory.

The FILL will not fix the problem, in fact it is probably part ot the reason for odd effects, since it leaves more code in high memory, with a lot of NOP in front. Don't use FILL in normal programs unless you need it, it just wastes space and make downloads longer.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am


8 postsPage 1 of 1
8 postsPage 1 of 1