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

Ultimate Side Step Code

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

Ultimate Side Step Code

Post by DirtyRoboto » Thu Jan 25, 2007 10:53 pm

Post by DirtyRoboto
Thu Jan 25, 2007 10:53 pm

Here is some code i whizzed up to do a fast side step. It may not work with your bot as mine has rubber soles on its feet for extra grip. Also my zero may not be the same as yours.
Use the L/R cursor keys on the remcon.

please report any findings.


' Ultimate side step
' Dirtyroboto@btinternet.com
' Jan 2007
'== template ====================================

DIM A AS BYTE
DIM x 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:

A = REMOCON(1)
IF A < 13 AND A > 14 THEN GOTO main

IF A = 13 THEN GOSUB side_step_r
IF A = 14 THEN GOSUB side_step_l
GOSUB standard_pose

GOTO MAIN

'========================================
side_step_r:
SPEED 10
'leg out
MOVE G6A, 88, 76, 145, 93, 119, 100
WAIT
'legs together
MOVE G6D, 90, 76, 145, 93, 100, 100
MOVE G6A,100, 76, 145, 93, 100, 100

WAIT
RETURN
'=======================================
side_step_l:
SPEED 8
'leg out
MOVE G6D, 88, 76, 145, 93, 119, 100
'legs together
MOVE G6A, 90, 76, 145, 93, 100, 100
MOVE G6D,100, 76, 145, 93, 100, 100

WAIT
RETURN
'=======================================

standard_pose:

MOVE G6A,100, 76, 145, 93, 100, 100
MOVE G6D,100, 76, 145, 93, 100, 100
MOVE G6B,100, 30, 80, 100, 100, 100
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN
'================================================
Here is some code i whizzed up to do a fast side step. It may not work with your bot as mine has rubber soles on its feet for extra grip. Also my zero may not be the same as yours.
Use the L/R cursor keys on the remcon.

please report any findings.


' Ultimate side step
' Dirtyroboto@btinternet.com
' Jan 2007
'== template ====================================

DIM A AS BYTE
DIM x 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:

A = REMOCON(1)
IF A < 13 AND A > 14 THEN GOTO main

IF A = 13 THEN GOSUB side_step_r
IF A = 14 THEN GOSUB side_step_l
GOSUB standard_pose

GOTO MAIN

'========================================
side_step_r:
SPEED 10
'leg out
MOVE G6A, 88, 76, 145, 93, 119, 100
WAIT
'legs together
MOVE G6D, 90, 76, 145, 93, 100, 100
MOVE G6A,100, 76, 145, 93, 100, 100

WAIT
RETURN
'=======================================
side_step_l:
SPEED 8
'leg out
MOVE G6D, 88, 76, 145, 93, 119, 100
'legs together
MOVE G6A, 90, 76, 145, 93, 100, 100
MOVE G6D,100, 76, 145, 93, 100, 100

WAIT
RETURN
'=======================================

standard_pose:

MOVE G6A,100, 76, 145, 93, 100, 100
MOVE G6D,100, 76, 145, 93, 100, 100
MOVE G6B,100, 30, 80, 100, 100, 100
MOVE G6C,100, 30, 80, 100, 100, 100
WAIT
RETURN
'================================================
DirtyRoboto
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 412
Joined: Tue Sep 19, 2006 1:00 am
Location: London

1 postPage 1 of 1
1 postPage 1 of 1