Exploring the Environment

Microsoft Robotics

Glossary Item Box

Microsoft Robotics Developer StudioSend feedback on this topic

Exploring the Environment

The obstacle avoidance is not sufficient to exploring the environment. To do this, you want to use the same NxtDrive two more times.  Right-click on the NxtDrive and select Copy.


Paste two times, use Ctrl-V or Edit/Paste from the menu. Since you copied the drive, instead of dragging a new instance from the services window, this will allow us to issue more commands to the same drive.


Expand the, If, block by clicking on the '+' in the lower left corner.  Add a new condition: Distance < 90.


Drag a connection from the second condition, Distance < 90, to the second NxtDrive.


This time, select SetDrivePower and enter, 0.3, for LeftWheelPower and 0.6, for RightWheelPower.  When an obstacle is between 50 and 90 cm, this will cause the Tribot to drive in an arc to the left.


Finally connect the, Else, pin to the third NxtDrive.  In the Connections dialog, select, SetDrivePower, again.


When no objects are less than 90 cm from the Tribot, blast straight ahead at 80% power.




© 2012 Microsoft Corporation. All Rights Reserved.