Drivebase.rule

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Rules)
(driveInit)
 
Line 28: Line 28:
 
=====driveInit=====
 
=====driveInit=====
  
Defines the global variable with default values:
+
Defines the global variable with default values, e.g:
  
      global.drive.mapDest[2] = 0.0 # destination in map coordinates
 
      global.drive.utmDest[2] = 0.0 # destination in UTM coordinates
 
      global.drive.odoDest[2] = 0.0 # destination in ODO coordinates
 
      global.drive.lastMapDest[2] = 0.0 # last destination in map coordinates
 
      global.drive.lastUtmDest[2] = 0.0 # last destination in UTM coordinates
 
      global.drive.lastOdoDest[2] = 0.0 # last destination in ODO coordinates
 
      global.drive.refCoord = -1  # 0=odo, 1=UTM, 2=map
 
      global.drive.newDest = 0
 
 
       global.drive.pause = false
 
       global.drive.pause = false
 
       global.drive.waitHere = true  # waits in a state with low RPM
 
       global.drive.waitHere = true  # waits in a state with low RPM
      global.drive.gettingClose = false
 
 
       global.drive.skipDestination = false
 
       global.drive.skipDestination = false
      global.drive.compasHeading = false # heading in compas degrees if true (else math)
 
      global.drive.radians = true # heading in radians if true, else in degrees (math heading only)
 
 
       global.drive.continueDist = 1 # continues when closer than this from next node
 
       global.drive.continueDist = 1 # continues when closer than this from next node
 
       global.drive.holdLine = true # try hold line from last waypoint, else go direct
 
       global.drive.holdLine = true # try hold line from last waypoint, else go direct
Line 51: Line 40:
 
       odoPose.tripTimeB= 0
 
       odoPose.tripTimeB= 0
 
       odoPose.tripB= 0
 
       odoPose.tripB= 0
      global.drive.distToTgt = 0
+
 
      global.drive.fromPose[2] = 0.0 # last used source pose
+
The mentioned 'global.drive.XXX' variables can be set by the mission as appropriate,
  
 
(more to come)
 
(more to come)

Latest revision as of 09:50, 6 November 2009

Contents

[edit] Introduction

The drivebase rule implements a number of rules to allow a HAKO like implementation of mobotware to execute missions. The mission itself should be formed as a rule describing the mission waypoints, and may be supplemented by additional rules defining special behaviour - like speed or tool action - in e.g. geographic areas.

This description reflects the drivebase version 2.777 (6 nov 2009)

[edit] Drivebase

The drivebase is placed in the distribution at:

.../bin/conf_hako2/drivebase.rule

or it can be seen (in the 2.777 version) here

[edit] Description

The basic principle is that the mission describes the next waypoint as a target pose - in one of the allowed coordinate systems. The allowed coordinate systems are odometry, UTM (zone 33), map coordinates (that relates to the UTM coordinates with an origin in UTM coordinates).

The drivebase then converts (if needed) to odometry coordinates and requests a manoeuvre to get the robot to the requested pose. This may involve obstacle avoidance - if allowed.

The process can be paused by setting a pause flag, and a waypoint can be skipped by setting another flag.

If the waypoint is far away (typically more than 10-15m) then a carrot point is inserted about 10m from current position, but on the line described by the desired waypoint pose.

[edit] Rules

The (sub) rules implementing this behavior is as follows:

[edit] driveInit

Defines the global variable with default values, e.g:

     global.drive.pause = false
     global.drive.waitHere = true   # waits in a state with low RPM
     global.drive.skipDestination = false
     global.drive.continueDist = 1 # continues when closer than this from next node
     global.drive.holdLine = true # try hold line from last waypoint, else go direct
     global.drive.engineRPM= 1900;
     global.mission.name= 'none'
     global.mission.leg= 0
     odoPose.tripTimeB= 0
     odoPose.tripB= 0

The mentioned 'global.drive.XXX' variables can be set by the mission as appropriate,

(more to come)

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox