This is where you talk about the NXJ software itself, installation issues, and programming talk.
Moderators: roger, 99jonathan, imaqine
I am considering using behaviour control for my robot.
The robot is presently executed two simple behaviours, one to move forward and the other to take action when the ultrasonar detects an obstacle.
Since the avoid behaviour will suppress the forward behaviour I have set a loop while (!suppressed) so that the forward behaviour will stop when a suppresion signal is received.
Would you kindly confirm that since there are no more behaviours which can suppress the avoid, the action part of the avoid behaviour do not need to have the while loop.
- New User
- Posts: 7
- Joined: Sun Nov 25, 2012 12:14 am
True, the behavior that has the highest priority will never respond to the suppress() method. If you are sure that you will never add a behavior of higher priority than avoid, there is no need to for its action method to test the suppressed flag. But you might want to code your robot to allow for future additional behaviors.
- Posts: 308
- Joined: Fri Jun 01, 2007 4:31 am
- Location: Berkeley, CA
Return to NXJ Software
Who is online
Users browsing this forum: Google [Bot] and 0 guests