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

Head Turning Question

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

Head Turning Question

Post by viper1 » Thu May 17, 2007 12:43 pm

Post by viper1
Thu May 17, 2007 12:43 pm

Ok, thanks to RoboSavvy and all you guys that have helped me with all my questions, I am pretty much finished with my RN1, Now I have to come up with a name.

I was able to cram a very small Futaba Servo inside his head with a little, well actually alot of scraping and melting away plastic, but it looks like it was supposed to be. I'll post some pictures soon

My question is now that His head is able to move, Is there a way to set up a program within the template to make his hed randomly move? Nothing erratic just some smoth movements left and rite but not the exact movement every time. Just to add a little more life and personalitl to him.
Ok, thanks to RoboSavvy and all you guys that have helped me with all my questions, I am pretty much finished with my RN1, Now I have to come up with a name.

I was able to cram a very small Futaba Servo inside his head with a little, well actually alot of scraping and melting away plastic, but it looks like it was supposed to be. I'll post some pictures soon

My question is now that His head is able to move, Is there a way to set up a program within the template to make his hed randomly move? Nothing erratic just some smoth movements left and rite but not the exact movement every time. Just to add a little more life and personalitl to him.
viper1
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Thu May 10, 2007 2:55 pm

Post by Humanoido » Sat May 19, 2007 11:28 am

Post by Humanoido
Sat May 19, 2007 11:28 am

Congratulations on the head mod and looking forward to seeing the pics. You probably won't have catch and play function with the futaba servo so that's why specific software is needed to move it. Good news - RoboBASIC has a random number generator. You can vary the randomness of the head motions. A flowchart to do what you want is something like this.

Generate random number
Set number range of random number
Divide ranges into sets
If number is within set 1 then move head left
If number is within set 2 then move head right
If number is within set 3 then move head home
If number is within set 4 then subroutine A
subroutine A:
move head 1/4 range left
pause 2 seconds
move head 1/2 right
pause 4 seconds
move head home
return
End

For getting the basic move code, check this thread:
http://robosavvy.com/forum/viewtopic.ph ... cd&start=0

According to Pev
Basically added a servo (Hitec HS300) in place of Robonova's head and attached the sonar to it. The servo is attached to port 9 and accessed using the servo command, format SERVO 9, {degree} where {degree} is a value from 10 to 190.

hope this helps,

humanoido
Congratulations on the head mod and looking forward to seeing the pics. You probably won't have catch and play function with the futaba servo so that's why specific software is needed to move it. Good news - RoboBASIC has a random number generator. You can vary the randomness of the head motions. A flowchart to do what you want is something like this.

Generate random number
Set number range of random number
Divide ranges into sets
If number is within set 1 then move head left
If number is within set 2 then move head right
If number is within set 3 then move head home
If number is within set 4 then subroutine A
subroutine A:
move head 1/4 range left
pause 2 seconds
move head 1/2 right
pause 4 seconds
move head home
return
End

For getting the basic move code, check this thread:
http://robosavvy.com/forum/viewtopic.ph ... cd&start=0

According to Pev
Basically added a servo (Hitec HS300) in place of Robonova's head and attached the sonar to it. The servo is attached to port 9 and accessed using the servo command, format SERVO 9, {degree} where {degree} is a value from 10 to 190.

hope this helps,

humanoido
Humanoido
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia

Head Turning Question

Post by viper1 » Tue Jun 05, 2007 10:00 pm

Post by viper1
Tue Jun 05, 2007 10:00 pm

I'm having problems with RN1 walking after I changed the code to make his head servo turn. It seems to affect his walking as if he hesitates slightly whenever his head turns. is there anyway I can correct this, why would that affect his walking? I have the head servo plugged into S16.
Here's the code I'm using:

forward_walk:

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


SPEED 14
'left up
MOVE24 90, 107, 105, 105, 114, 60, 90, 40, 80, , , , 100, 40, 80, , 72, , 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, , 53, , 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, , 163, , 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, , 152, , 113, 78, 142, 105, 90, 60,

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


'---------------------------------------
PRINT FORMAT (RC1,DEC)

RC1 = RCIN(3)
IF RC1>PMAX THEN GOTO FWD_CONT

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

RETURN
I'm having problems with RN1 walking after I changed the code to make his head servo turn. It seems to affect his walking as if he hesitates slightly whenever his head turns. is there anyway I can correct this, why would that affect his walking? I have the head servo plugged into S16.
Here's the code I'm using:

forward_walk:

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


SPEED 14
'left up
MOVE24 90, 107, 105, 105, 114, 60, 90, 40, 80, , , , 100, 40, 80, , 72, , 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, , 53, , 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, , 163, , 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, , 152, , 113, 78, 142, 105, 90, 60,

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


'---------------------------------------
PRINT FORMAT (RC1,DEC)

RC1 = RCIN(3)
IF RC1>PMAX THEN GOTO FWD_CONT

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

RETURN
viper1
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Thu May 10, 2007 2:55 pm


3 postsPage 1 of 1
3 postsPage 1 of 1