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

understanding movements and triggers

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

understanding movements and triggers

Post by plingboot » Thu Nov 02, 2006 12:13 pm

Post by plingboot
Thu Nov 02, 2006 12:13 pm

This might be a darft question, but nevertheless.

Is it possible to create a more continuous flow of movements when controling RN1? From my limited (4 days) experience it seems, one movement is executed, press a button and another movement is executed etc.

My hope is that i can "repeat xxx move as long as xxx condition is true"

xxx move could be walking, punching etc
xxx condition could be button pressed, RC control in a particular position or a simle continuous loop of a movement.

Furthermore, is it possible to overide a current movement when a particular situation becomes true/false?

ie: if the tilt sensor indicates a fall or if the sonar indicates close proximity of something - in which case i'd want to automatically stop the current movement and perform either an auto stand-up or in the case of the proximity sensor stop and turn or throw a punch.

As you can see i've got big plans for my RN1 (think wannabe king kizer). My tilt sensor and sonar arrived this moring and i'm making a trip to my LHS for digi servos, ali plate (brackets for hips) and lipoly cells at lunch time.
This might be a darft question, but nevertheless.

Is it possible to create a more continuous flow of movements when controling RN1? From my limited (4 days) experience it seems, one movement is executed, press a button and another movement is executed etc.

My hope is that i can "repeat xxx move as long as xxx condition is true"

xxx move could be walking, punching etc
xxx condition could be button pressed, RC control in a particular position or a simle continuous loop of a movement.

Furthermore, is it possible to overide a current movement when a particular situation becomes true/false?

ie: if the tilt sensor indicates a fall or if the sonar indicates close proximity of something - in which case i'd want to automatically stop the current movement and perform either an auto stand-up or in the case of the proximity sensor stop and turn or throw a punch.

As you can see i've got big plans for my RN1 (think wannabe king kizer). My tilt sensor and sonar arrived this moring and i'm making a trip to my LHS for digi servos, ali plate (brackets for hips) and lipoly cells at lunch time.
plingboot
Savvy Roboteer
Savvy Roboteer
Posts: 108
Joined: Thu Oct 26, 2006 1:00 am
Location: the gutter, south west london

Post by Pev » Thu Nov 02, 2006 11:51 pm

Post by Pev
Thu Nov 02, 2006 11:51 pm

Can only comment on my personal experience. I use a bluesmirf to control my RN1 via a VB.net pocket PC app I wrote. I can load the blusmirf buffer with a bunch of commands that are executed one after the other. Have also altered the walking code etc to be continuious (sic) by checking to see if the next movement is the same as the current active movement.

Hope this is useful

Pev
Can only comment on my personal experience. I use a bluesmirf to control my RN1 via a VB.net pocket PC app I wrote. I can load the blusmirf buffer with a bunch of commands that are executed one after the other. Have also altered the walking code etc to be continuious (sic) by checking to see if the next movement is the same as the current active movement.

Hope this is useful

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 beermat » Fri Nov 03, 2006 3:44 am

Post by beermat
Fri Nov 03, 2006 3:44 am

If you search around the forums, you'll see some implementations on here that go part way to what you want. For instance, I use the square button in the middle of the remote arrow keys as a 'counter' - press it 6 times to queue up 6 repeats. I have then modified several subs (forward walk, backwards walk etc) to basically loop the number of times the counter indicates. At the end of each pass through the routine, I check the tilt sensor to make sure RN is still upright. If it isn't, then the tilt routine will stand him up and set an 'abort' flag to stop the loop continuing. Others have done almost the same thing on here, and posted the code, too. This (sort of) meets your "repeat xxx move as long as xxx condition is true" criteria.

The single-threaded nature of the RN language severely limits the ability to do what you really want, though, which is to potentially interupt the routine in the middle of whatever it does. Checking the IR sensor between each MOVE statement would be cumbersome code-wise and, I think, dramatically reduce the performance of the routine due to how slow the code executes. To me, this is the biggest frustration I have with respect to the RN-1, in that its brains are pretty dumb :)
If you search around the forums, you'll see some implementations on here that go part way to what you want. For instance, I use the square button in the middle of the remote arrow keys as a 'counter' - press it 6 times to queue up 6 repeats. I have then modified several subs (forward walk, backwards walk etc) to basically loop the number of times the counter indicates. At the end of each pass through the routine, I check the tilt sensor to make sure RN is still upright. If it isn't, then the tilt routine will stand him up and set an 'abort' flag to stop the loop continuing. Others have done almost the same thing on here, and posted the code, too. This (sort of) meets your "repeat xxx move as long as xxx condition is true" criteria.

The single-threaded nature of the RN language severely limits the ability to do what you really want, though, which is to potentially interupt the routine in the middle of whatever it does. Checking the IR sensor between each MOVE statement would be cumbersome code-wise and, I think, dramatically reduce the performance of the routine due to how slow the code executes. To me, this is the biggest frustration I have with respect to the RN-1, in that its brains are pretty dumb :)
beermat
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 137
Joined: Sun Jul 23, 2006 1:00 am


3 postsPage 1 of 1
3 postsPage 1 of 1