subsumption question

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

subsumption question

Postby kenbo » Fri Mar 21, 2008 4:26 pm

I'm developing code for the NXT to drive forward, avoiding obstacles
with the sonar sensor. At period intervals, it uses the sonar to
update an occupancy grid map of the world it is exploring.

Right now, I have implemented several behaviors in a subsumption
manner.

Is there a way to stop the entire task at some finish point?
For example, I have a driveforward task and a seewall task.
I'd like to run the two together to avoid obstacles. But,
after moving ahead a set distance, I'd like the set of tasks
to end and control move onto some other task serially.

So, in main I'd set up df and sw. I run the arby method
to start them up. I'd like to have code after this to
run at some point.

Is this possible? Or, if horribly unclear, I can try to clarify :-)

thanks,
kenny
kenbo
New User
 
Posts: 6
Joined: Fri Mar 21, 2008 4:22 pm

Re: subsumption question

Postby roger » Fri Mar 21, 2008 8:25 pm

kenbo wrote:after moving ahead a set distance, I'd like the set of tasks
to end and control move onto some other task serially.

So, in main I'd set up df and sw. I run the arby method
to start them up. I'd like to have code after this to
run at some point.
You could put this other code in a behavior of lowest priority.
When the other behaviors complete their actions and return false to takeControl() , the lowest priority behavior will run.
Roger
roger
Moderator
 
Posts: 359
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff