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

newbie programming issue, need help

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
8 postsPage 1 of 1
8 postsPage 1 of 1

newbie programming issue, need help

Post by metfoo » Wed Oct 28, 2009 5:47 pm

Post by metfoo
Wed Oct 28, 2009 5:47 pm

I am in need of help. I started the programming for my first humanoid using a zigbee and the boomerrang remote. I based my code of the included examples, so my motions are good. I am having an issue with the loop. It will read the remote and kick into the action. At that point it will keep doing the action, despite returning to the main loop.
I am in need of help. I started the programming for my first humanoid using a zigbee and the boomerrang remote. I based my code of the included examples, so my motions are good. I am having an issue with the loop. It will read the remote and kick into the action. At that point it will keep doing the action, despite returning to the main loop.
metfoo
Newbie
Newbie
Posts: 6
Joined: Tue Oct 13, 2009 11:45 pm

Post by limor » Wed Oct 28, 2009 9:35 pm

Post by limor
Wed Oct 28, 2009 9:35 pm

welcome to the forum!
you will have to provide more technical information about your setup and code otherwise it is very difficult to guess what is wrong with your setup
welcome to the forum!
you will have to provide more technical information about your setup and code otherwise it is very difficult to guess what is wrong with your setup
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by metfoo » Wed Oct 28, 2009 10:42 pm

Post by metfoo
Wed Oct 28, 2009 10:42 pm

my code is:

Start
Call Initialize Motors
Call Initial Action

//Loop
If rx remote cont data arrived = 0 then jump loop
Load Data <- rx remote cont data
if (data = 1 ) Then jump forward walk
elseif (data = 2 ) Then jump backward walk
elseif (data = 4 ) Then jump turn left
elseif (data = 8 ) Then jump turn right
Jump Loop

The routines are copied from the examples. I want to initially get the robot working as a remote control based bot, then start working with sensors.
my code is:

Start
Call Initialize Motors
Call Initial Action

//Loop
If rx remote cont data arrived = 0 then jump loop
Load Data <- rx remote cont data
if (data = 1 ) Then jump forward walk
elseif (data = 2 ) Then jump backward walk
elseif (data = 4 ) Then jump turn left
elseif (data = 8 ) Then jump turn right
Jump Loop

The routines are copied from the examples. I want to initially get the robot working as a remote control based bot, then start working with sensors.
metfoo
Newbie
Newbie
Posts: 6
Joined: Tue Oct 13, 2009 11:45 pm

Post by arekku » Tue Nov 03, 2009 3:54 pm

Post by arekku
Tue Nov 03, 2009 3:54 pm

How do you know it returns to the main loop?
How do you know it returns to the main loop?
arekku
Robot Builder
Robot Builder
Posts: 17
Joined: Tue Sep 22, 2009 1:20 pm

Post by i-Bot » Tue Nov 03, 2009 4:55 pm

Post by i-Bot
Tue Nov 03, 2009 4:55 pm

Where do you clear "rx remote control data arrived" ?
Where do you clear "rx remote control data arrived" ?
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by metfoo » Tue Nov 03, 2009 5:01 pm

Post by metfoo
Tue Nov 03, 2009 5:01 pm

i inserted a printline for debuging, so i know its returning. I didnt clear it because i didnt know i had to. I will see what I can do.
i inserted a printline for debuging, so i know its returning. I didnt clear it because i didnt know i had to. I will see what I can do.
metfoo
Newbie
Newbie
Posts: 6
Joined: Tue Oct 13, 2009 11:45 pm

Post by i-Bot » Tue Nov 03, 2009 5:14 pm

Post by i-Bot
Tue Nov 03, 2009 5:14 pm

Maybe it clears automatically when you load rx remote data ?

did you try the thing in the example with MOTION(0) to stop motion ?
Maybe it clears automatically when you load rx remote data ?

did you try the thing in the example with MOTION(0) to stop motion ?
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Suicidal.Banana » Wed Nov 04, 2009 3:45 pm

Post by Suicidal.Banana
Wed Nov 04, 2009 3:45 pm

from behaviour control i recall you having to use RETURN at the end of a 'function' that you call to make it go back into its LOOP, im not sure if this applys to roboplus and wich of the two your using, but if you didnt try it already, its worth the shot.
from behaviour control i recall you having to use RETURN at the end of a 'function' that you call to make it go back into its LOOP, im not sure if this applys to roboplus and wich of the two your using, but if you didnt try it already, its worth the shot.
Suicidal.Banana
Savvy Roboteer
Savvy Roboteer
Posts: 78
Joined: Tue Jun 16, 2009 12:54 pm


8 postsPage 1 of 1
8 postsPage 1 of 1