Drivebase.rule

From Rsewiki

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)

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

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.

Rules

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

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)