Option go_to_point_avoid_obstacles

Parameters of that option:
ParameterTypeMeasureRangeDescription
go_to_point_avoid_obstacles.xdecimalmm-3000..3000
go_to_point_avoid_obstacles.ydecimalmm-3000..3000
go_to_point_avoid_obstacles.tolerancedecimalmm
go_to_point_avoid_obstacles.speeddecimalmm/swalking speed

State Machine

This browser can't display the SVG file svg/option_go_to_point_avoid_obstacles.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html

State walk_forward

If that state is active,
 >  The option go_to_point_forward is executed. Parameters:
    go_to_point_forward.x  =  @go_to_point_avoid_obstacles.x ;
    go_to_point_forward.y  =  @go_to_point_avoid_obstacles.y ;
    go_to_point_forward.speed  =  @go_to_point_avoid_obstacles.speed ;
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_point_avoid_obstacles_state_walk_forward.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( selfloc.distance_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) < 500)
{
  
goto stop_final;
}
else
{
  
/** */
if ( abs( selfloc.angle_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) ) > 45)
{
  
stay;
}
else
{
  
/** */
if ( obstacle.obstacle_distance.ahead() < @go_to_point_avoid_obstacles.tolerance)
{
  
/** */
if (
(obstacle.obstacle_distance.right() > @go_to_point_avoid_obstacles.tolerance)
&& 
(obstacle.obstacle_distance.left() > @go_to_point_avoid_obstacles.tolerance)
)
{
  
/** */
if ( obstacle.obstacle_distance.left() < obstacle.obstacle_distance.right() )
{
  
goto walk_right;
}
else
{
  
/** */
if ( obstacle.obstacle_distance.left() > obstacle.obstacle_distance.right() )
{
  
goto walk_left;
}
else
{
  
/** */
if ( selfloc.angle_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) < 0)
{
  
goto walk_right;
}
else
{
  
goto walk_left;
}
}
}
}
else
{
  
/** */
if ( obstacle.obstacle_distance.right() > @go_to_point_avoid_obstacles.tolerance)
{
  
goto walk_right;
}
else
{
  
/** */
if ( obstacle.obstacle_distance.left() > @go_to_point_avoid_obstacles.tolerance)
{
  
goto walk_left;
}
else
{
  
goto wait;
}
}
}
}
else
{
  
stay;
}
}
}

State walk_left

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
-100
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
300
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_point_avoid_obstacles_state_walk_left.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( selfloc.distance_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) < 500)
{
  
goto stop_final;
}
else
{
  
/** */
if ( obstacle.obstacle_distance.left() < @go_to_point_avoid_obstacles.tolerance)
{
  
goto wait;
}
else
{
  
/** */
if ( state_time > 500)
{
  
goto walk_forward;
}
else
{
  
stay;
}
}
}

State walk_right

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
-100
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
-300
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_point_avoid_obstacles_state_walk_right.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( selfloc.distance_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) < 500)
{
  
goto stop_final;
}
else
{
  
/** */
if ( obstacle.obstacle_distance.right() < @go_to_point_avoid_obstacles.tolerance)
{
  
goto wait;
}
else
{
  
/** */
if ( state_time > 500)
{
  
goto walk_forward;
}
else
{
  
stay;
}
}
}

State wait

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_point_avoid_obstacles_state_wait.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( selfloc.distance_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) < 500)
{
  
goto stop_final;
}
else
{
  
/** */
if ( state_time < 600)
{
  
stay;
}
else
{
  
/** */
if ( obstacle.obstacle_distance.ahead() > @go_to_point_avoid_obstacles.tolerance)
{
  
goto walk_forward;
}
else
{
  
/** */
if ( obstacle.obstacle_distance.left() > @go_to_point_avoid_obstacles.tolerance)
{
  
goto walk_left;
}
else
{
  
/** */
if ( obstacle.obstacle_distance.right() > @go_to_point_avoid_obstacles.tolerance)
{
  
goto walk_right;
}
else
{
  
goto backup;
}
}
}
}
}

State backup

If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.walk
 >  This decimal output symbol is set:
    motion.walk_speed.x  = 
-100
 >  This decimal output symbol is set:
    motion.walk_speed.y  = 
0
 >  This decimal output symbol is set:
    motion.walk_speed.rot  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_point_avoid_obstacles_state_backup.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( selfloc.distance_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) < 500)
{
  
goto stop_final;
}
else
{
  
/** */
if ( state_time < 600)
{
  
stay;
}
else
{
  
goto walk_forward;
}
}

State stop_final

This state is a target state.



If that state is active,
 >  This enumerated output symbol is set:
    motion.type  = 
motion.type.stand
 
The decision tree:
  This browser can't display the SVG file svg/option_go_to_point_avoid_obstacles_state_stop_final.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if ( selfloc.distance_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) < 500)
{
  
goto stop_final;
}
else
{
  
/** */
if ( selfloc.distance_to( @go_to_point_avoid_obstacles.x , @go_to_point_avoid_obstacles.y ) > 800)
{
  
goto walk_forward;
}
else
{
  
stay;
}
}