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

extra walking steps?

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

extra walking steps?

Post by tinman1 » Tue Feb 13, 2007 3:51 am

Post by tinman1
Tue Feb 13, 2007 3:51 am

Okay, I have spent the last hour staring at the walking code and I have a question. Could I simply add a second "GOSUB forward_walk" to make the RN-1 take four steps instead of the default two steps when the forward arrow key is pressed?
GOSUB forward_walk
GOSUB forward_walk
GOSUB standard_pose
GOTO main_exit
Would this work by executing the subroutine twice in succession? Or am I totally out in left field?
Tinman
Okay, I have spent the last hour staring at the walking code and I have a question. Could I simply add a second "GOSUB forward_walk" to make the RN-1 take four steps instead of the default two steps when the forward arrow key is pressed?
GOSUB forward_walk
GOSUB forward_walk
GOSUB standard_pose
GOTO main_exit
Would this work by executing the subroutine twice in succession? Or am I totally out in left field?
Tinman
Tell me again. What happens when these 2 wires touch?
tinman1
Savvy Roboteer
Savvy Roboteer
Posts: 38
Joined: Wed Jan 24, 2007 1:00 am
Location: Vail Az.

Post by tinman1 » Tue Feb 13, 2007 4:16 am

Post by tinman1
Tue Feb 13, 2007 4:16 am

Well, I answered my own question. :lol:
Yes. It executes the subroutine twice making the bot take a total of four steps. However there is a hesitation between the two subs executing instead of one continuous gait. Hmmmm....
How to get rid of the pause?
Hey this IS fun!
tinman :)
Well, I answered my own question. :lol:
Yes. It executes the subroutine twice making the bot take a total of four steps. However there is a hesitation between the two subs executing instead of one continuous gait. Hmmmm....
How to get rid of the pause?
Hey this IS fun!
tinman :)
Tell me again. What happens when these 2 wires touch?
tinman1
Savvy Roboteer
Savvy Roboteer
Posts: 38
Joined: Wed Jan 24, 2007 1:00 am
Location: Vail Az.

Post by DirtyRoboto » Tue Feb 13, 2007 6:43 am

Post by DirtyRoboto
Tue Feb 13, 2007 6:43 am

A FOR/NEXT loop should do the trick.


DIM Y AS BYTE
FOR Y = 1 to 4

[forward walk code]


NEXT Y
A FOR/NEXT loop should do the trick.


DIM Y AS BYTE
FOR Y = 1 to 4

[forward walk code]


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

forward walk

Post by engineer » Tue Feb 13, 2007 7:37 am

Post by engineer
Tue Feb 13, 2007 7:37 am

or search the forum for long walk_pushup
or search the forum for long walk_pushup
engineer
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 129
Joined: Wed Aug 09, 2006 1:00 am
Location: northern california

Post by Pev » Tue Feb 13, 2007 11:42 am

Post by Pev
Tue Feb 13, 2007 11:42 am

Below is a slightly modified walk that details how you can get rid of the pause . Basically everything before the FWD_CONT: starts the walk from standing still.
Once you get to comment 'Loop to FWD_CONT to continue walking you either loop to FWD_CONT to walk 2 more steps with no hestitation or continue to stop walking and return to a stable standing positon.

The loop could be a for next as suggested above or could be due to some sort of controller input. I use a varient of this with my bluetooth controller for continual walking.

Hope this helps

Pev


forward_walk:

SPEED 5
MOVE24 85, 71, 152, 91, 112, 60, 100, 40, 80, , , , 100, 40, 80, , , , 112, 76, 145, 93, 92, 60,

SPEED 14
'left up
MOVE24 90, 107, 105, 105, 114, 60, 90, 40, 80, , , , 100, 40, 80, , , , 114, 76, 145, 93, 90, 60,

FWD_CONT:

'---------------------------------------
'left down
MOVE24 90, 56, 143, 122, 114, 60, 80, 40, 80, , , , 105, 40, 80, , , , 113, 80, 145, 90, 90, 60,
MOVE24 90, 46, 163, 112, 114, 60, 80, 40, 80, , , , 105, 40, 80, , , , 112, 80, 145, 90, 90, 60,

SPEED 10
'left center
MOVE24 100, 66, 141, 113, 100, 100, 90, 40, 80, , , , 100, 40, 80, , , , 100, 83, 156, 80, 100, 100,
MOVE24 113, 78, 142, 105, 90, 60, 100, 40, 80, , , , 100, 40, 80, , , , 90, 102, 136, 85, 114, 60,

SPEED 14
'right up
MOVE24 113, 76, 145, 93, 90, 60, 100, 40, 80, , , , 90, 40, 80, , , , 90, 107, 105, 105, 114, 60,

'right down
MOVE24 113, 80, 145, 90, 90, 60, 105, 40, 80, , , , 80, 40, 80, , , , 90, 56, 143, 122, 114, 60,
MOVE24 112, 80, 145, 90, 90, 60, 105, 40, 80, , , , 80, 40, 80, , , , 90, 46, 163, 112, 114, 60,

SPEED 10
'right center
MOVE24 100, 83, 156, 80, 100, 100, 100, 40, 80, , , , 90, 40, 80, , , , 100, 66, 141, 113, 100, 100,
MOVE24 90, 102, 136, 85, 114, 60, 100, 40, 80, , , , 100, 40, 80, , , , 113, 78, 142, 105, 90, 60,

SPEED 14
'left up
MOVE24 90, 107, 105, 105, 114, 60, 90, 40, 80, , , , 100, 40, 80, , , , 113, 76, 145, 93, 90, 60,
'---------------------------------------

'Loop to FWD_CONT to continue walking

SPEED 5
MOVE24 85, 71, 152, 91, 112, 60, 100, 40, 80, , , , 100, 40, 80, , , , 112, 76, 145, 93, 92, 60,

SPEED 5
MOVE24 85, 71, 152, 91, 112, 60, 100, 40, 80, , , , 100, 40, 80, , , , 112, 76, 145, 93, 92, 60,

RETURN
Below is a slightly modified walk that details how you can get rid of the pause . Basically everything before the FWD_CONT: starts the walk from standing still.
Once you get to comment 'Loop to FWD_CONT to continue walking you either loop to FWD_CONT to walk 2 more steps with no hestitation or continue to stop walking and return to a stable standing positon.

The loop could be a for next as suggested above or could be due to some sort of controller input. I use a varient of this with my bluetooth controller for continual walking.

Hope this helps

Pev


forward_walk:

SPEED 5
MOVE24 85, 71, 152, 91, 112, 60, 100, 40, 80, , , , 100, 40, 80, , , , 112, 76, 145, 93, 92, 60,

SPEED 14
'left up
MOVE24 90, 107, 105, 105, 114, 60, 90, 40, 80, , , , 100, 40, 80, , , , 114, 76, 145, 93, 90, 60,

FWD_CONT:

'---------------------------------------
'left down
MOVE24 90, 56, 143, 122, 114, 60, 80, 40, 80, , , , 105, 40, 80, , , , 113, 80, 145, 90, 90, 60,
MOVE24 90, 46, 163, 112, 114, 60, 80, 40, 80, , , , 105, 40, 80, , , , 112, 80, 145, 90, 90, 60,

SPEED 10
'left center
MOVE24 100, 66, 141, 113, 100, 100, 90, 40, 80, , , , 100, 40, 80, , , , 100, 83, 156, 80, 100, 100,
MOVE24 113, 78, 142, 105, 90, 60, 100, 40, 80, , , , 100, 40, 80, , , , 90, 102, 136, 85, 114, 60,

SPEED 14
'right up
MOVE24 113, 76, 145, 93, 90, 60, 100, 40, 80, , , , 90, 40, 80, , , , 90, 107, 105, 105, 114, 60,

'right down
MOVE24 113, 80, 145, 90, 90, 60, 105, 40, 80, , , , 80, 40, 80, , , , 90, 56, 143, 122, 114, 60,
MOVE24 112, 80, 145, 90, 90, 60, 105, 40, 80, , , , 80, 40, 80, , , , 90, 46, 163, 112, 114, 60,

SPEED 10
'right center
MOVE24 100, 83, 156, 80, 100, 100, 100, 40, 80, , , , 90, 40, 80, , , , 100, 66, 141, 113, 100, 100,
MOVE24 90, 102, 136, 85, 114, 60, 100, 40, 80, , , , 100, 40, 80, , , , 113, 78, 142, 105, 90, 60,

SPEED 14
'left up
MOVE24 90, 107, 105, 105, 114, 60, 90, 40, 80, , , , 100, 40, 80, , , , 113, 76, 145, 93, 90, 60,
'---------------------------------------

'Loop to FWD_CONT to continue walking

SPEED 5
MOVE24 85, 71, 152, 91, 112, 60, 100, 40, 80, , , , 100, 40, 80, , , , 112, 76, 145, 93, 92, 60,

SPEED 5
MOVE24 85, 71, 152, 91, 112, 60, 100, 40, 80, , , , 100, 40, 80, , , , 112, 76, 145, 93, 92, 60,

RETURN
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 tinman1 » Tue Feb 13, 2007 5:03 pm

Post by tinman1
Tue Feb 13, 2007 5:03 pm

Thanks guys!
I'm going to have alot to play with now. To me the whole walking aspect of this bot is the most interesting, unfortunately the last time I wrote any code was when Reagan first took office! :roll:
But this is a great way to get back into it.
Tinman
Thanks guys!
I'm going to have alot to play with now. To me the whole walking aspect of this bot is the most interesting, unfortunately the last time I wrote any code was when Reagan first took office! :roll:
But this is a great way to get back into it.
Tinman
Tell me again. What happens when these 2 wires touch?
tinman1
Savvy Roboteer
Savvy Roboteer
Posts: 38
Joined: Wed Jan 24, 2007 1:00 am
Location: Vail Az.


6 postsPage 1 of 1
6 postsPage 1 of 1