Skip to content

Latest commit

 

History

History
252 lines (166 loc) · 13.8 KB

File metadata and controls

252 lines (166 loc) · 13.8 KB

SmartCdlServer Component

SmartCdlServer-ComponentImage

The SmartCdlServer is based on the Curvature Distance Lookup (CDL) algorithm for fast local obstacle avoidance.

The CDL algorithm is an improvement of the dynamic window approach. It considers the dynamics and kinematics of the robot, as well as its polygonal shape. It consumes raw laser scans or other sensor perceptions transformed into occupancy grids. The basic idea is that a robot moves along different curvatures (v, w combinations) which represent trajectories built up by circular arcs. The huge number of possible v, w combinations is reduced based on the observation that only a few curvatures are safely selectable given the current state and kinematics of the robot. Curvatures leading to a collision are discarded. High performance advantages are achieved by precalculating lookup tables. The final selection along the remaining admissible v, w combinations is done by an objective function, which trades off speed, goal-directedness and remaining distance until collision.

This objective function together with its weighting factors build different strategies, such as reactive driving, joystick navigation, rotating or approaching goals. The strategies are used for the selection of the best-fitting curvature with respect to the purpose of the strategy. Example strategies are passing over intermediate waypoints, approaching a goal given by a path-planner or following a person.

The SmartCdlServer will read files which contain precalculated lookup tables generated by cdlCalculate (included in SmartSoft). They contain the kinematics of the robot.

SmartCdlServer supports differential drive, synchro drive and omnidrive if neglecting lateral velocity.

Note: This component is used in Tutorials (e.g. Lesson 1).

See also: Christian Schlegel. Fast local obstacle avoidance under kinematic and dynamic constraints for a mobile robot. In Proc. Int. Conf. on Intelligent Robots and Systems (IROS), p. 594-599, Victoria, Canada, 1998.

Metaelement Documentation
License LGPL
Hardware Requirements -
Purpose Navigation

Coordination Port CoordinationPort

States

See States for descriptions of possible states and their meaning.

MainState Name MainState Description
Neutral The robot will not move in state neutral. No navigation velocities will be commanded by the component. When changed to neutral, the CDL will stop the base to avoid an emergency stop. This is necessary since some mobile platforms perform an emergency stop if no new velocity command was sent within a timeout specified in firmware (e.g. Pioneer P3DX).
MoveRobot The robot will only move when in state moverobot.

DynamicWiring

Slave part of wiring pattern. It is responsible for changing the port connections within the component.

Parameter

Service Ports

NavVelSendServer

Typically connected to the robot base (e.g. SmartPioneerBaseServer). This port sends navigation commands v, w.

LaserClient

The laser scans that the CDL algorithm uses for obstacle avoidance, e.g. from SmartLaserLMS200Server.

LaserClient2

Goals from planner (e.g. smartPlannerBreathFirstSearch) can be sent to this port.

TrackingClient

Goals from tracking can be sent to this port. (e.g. smartLaserPersonTracker)

NavVelSendClient

Navigation commands v and w sent via this port will be considered when chosing a trajectory. Can be used to send navigation commands from a joystick (e.g. SmartExampleJoystickNavigationClient) while the CDL ensures a collision free navigation. Accepts input if strategy JOYSTICK is set, ignores otherwise. See strategy JOYSTICK.

GoalEventServer

Register with event state CDL_GOAL_NOT_REACHED to be notified when the stateful event switches to event state CDL_GOAL_REACHED. The CDL_GOAL_REACHED will be sent only once per activation. CDL_GOAL_REACHED: Is sent when a goal was reached (the robot is within goal distance or angle error). - Depending on the strategy.

Component Parameters SmartCdlServerParams

InternalParameter PathNav

Attribute Name Attribute Type Description
pathNavPredictedGoalPose_controll1_dist Double
pathNavPredictedGoalPose_controll1_speed Double
pathNavPredictedGoalPose_controll2_dist Double
pathNavPredictedGoalPose_controll2_speed Double
pathNavPredictedGoalPose_controll3_dist Double
pathNavPredictedGoalPose_controll3_speed Double
pathNavPredictedGoalPose_minDist Double
pathNavRecover_max_dist Double
robotBlocked_event_timeout UInt16 timout for robot beeing block in secons

InternalParameter Cdl

Attribute Name Attribute Type Description
dataDir String
curvature_default_file String File with the curvature indices as produced by cdlCalculate. Relative to current dir or absolute. See also parameter LOOKUPTABLE().
lookup_default_file String File with the distance values as produced by cdlCalculate. Relative to current dir or absolute. See also parameter LOOKUPTABLE().
lookup_default_file_compressed Boolean
accel_default_file String File with the allowed accelerations as produced by cdlCalculate. Relative to current dir or absolute. See also parameter LOOKUPTABLE().
curvature_second_file String File with the curvature indices as produced by cdlCalculate. Relative to current dir or absolute. See also parameter LOOKUPTABLE().
lookup_second_file String File with the distance values as produced by cdlCalculate. Relative to current dir or absolute. See also parameter LOOKUPTABLE().
lookup_second_file_compressed Boolean
accel_second_file String File with the allowed accelerations as produced by cdlCalculate. Relative to current dir or absolute. See also parameter LOOKUPTABLE().
translation_acc Double Translational acceleration. [mm/s^2]
rotation_acc Double Rotational acceleration. [deg/s^2]
delta_t_calc Double CDL predicts the robot motion deltacalc timesteps into the future. (10Hz was 0.7 now with 20Hz 0.35 Matthias)
delta_t_trigger Double The time steps for the CDL execution cycle. Defines the rate in which the CDL task is executed.
followHysteresis Boolean In following mode: if true, the robot will only follow the person if the person moved a considerably distance.
contour_default_file String
contour_second_file String
use_obstacle_history Boolean
freeBehaviorDist Double
freeBehaviorDist_second Double

InternalParameter CdlRotate

Attribute Name Attribute Type Description
error Double Define allowed error for in place rotation [deg]. Similar to goalregion for rotation.

InternalParameter Server

Attribute Name Attribute Type Description
plannerInit Boolean
trackerInit Boolean
laserClient2Init Boolean
irClientInit Boolean
pathNavInit Boolean
baseClientInit Boolean

ParameterSetInstance CdlParameter

TriggerInstance SETSTRATEGY

active = false

Set the CDL strategy. Available strategies:

  • REACTIVE: Reactive driving. The robot tries to maximize its speed by avoiding any obstacles. It will drive into the direction which allows the highest translational velocity and provides the largest remaining travel distance. This is the default value.
  • JOYSTICK: The robot can be controlled with a joystick. The CDL takes input from the port navigationVelocitySendServer and choses a trajectory closest to the v, w commands given by the joystick. See also server port navigationVelocitySendServer.
  • APPROACH_HALT: Approach a goal and halt when reached. Will send a CDL_GOAL_REACHED event via the cdlGoalEventServer when the goal is reached. Possible goal modes: ABSOLUTE, PLANNER.
  • APPROACH: Approach a target but switch to REACTIVE when the goal is reached rather than stopping as in strategy APPROACH_HALT. Will send a CDL_GOAL_REACHED event via the cdlGoalEventServer when the goal is reached. Can be used to achieve smooth movement when using intermediate goal points. Goal modes: ABSOLUTE, PLANNER.
  • ROTATE: Rotate into the given direction and report this by the CDL_GOAL_REACHED event. The heading can be given by absolute position, absolute angle or relative angle. Goal modes: ABSOLUTE, ANGLEABSOLUTE, ANGLERELATIVE.
  • FOLLOW: Drive into the given direction with the given translational velocity. Takes goals from the trackingClient port. Used e.g. by the smartLaserPersonTracker. Goal modes: PERSON.
  • BACKWARD: Move blindly backwards and stop as soon as the given distance has been covered. The distance is calculated to a previously saved position (parameter SAVECURPOS()). Note that this is blind driving. This strategy can be used if a mobile platform has no laser scanner mounted that points backwards. Fires CDL_GOAL_REACHED when distance has been covered.
  • PATH_NAV: TODO

ParameterInstance FREEBEHAVIOR

Activate or deactivate the free behavior in stalled situations. If activated, the robot will turn in a free direction in stalled situations. Values: ACTIVATE, DEACTIVATE

Attribute Name Attribute Type Description
free InlineEnumeration

ParameterInstance PATHNAVFREEBEHAVIOR

Attribute Name Attribute Type Description
free InlineEnumeration

ParameterInstance LOOKUPTABLE

Changes the lookup table. Lookup tables are precalculated in files and contain the kinematics and shape of the robot. Two lookup files can be specified in the ini configuration. This parameter allows to switch between these lookup tables at runtime. Note that you can use this parameter only in state neutral. Values: DEFAULT, SECOND. See Ini-Configuration.

Attribute Name Attribute Type Description
lt InlineEnumeration

ParameterInstance TRANSVEL

Set translation velocity ?vmin, ?vmax in [mm/s]. The values are thresholded by the robot's vmin and vmax inputs to calculate the lookup tables in cdlCalculate (CDL_V_TRA_).

Attribute Name Attribute Type Description
vmin Double
vmax Double

ParameterInstance ROTVEL

Set rotation velocity minimum/maximum values ?wmin, ?wmax in [deg/s]. The values are thresholded by the robot's wmin and wmax inputs to calculate the lookup tables in cdlCalculate (CDL_V_ROT_).

Attribute Name Attribute Type Description
wmin Double
wmax Double

ParameterInstance GOALMODE

Set goal type and goal source. Available modes:

  • ABSOLUTE: Use absolute goal position. Can only be used for goals that do not require path planning, as the CDL cannot handle local minimas. See strategies. Goal can be set with parameter GOALREGION(?x)(?y)(?a)(?id), while ?a is ignored. Used to approach a goal exactly.
  • PLANNER: Goal specification from planner, port plannerClient. Typically used with path planners (e.g. smartPlannerBreathFirstSearch).
  • PERSON: Optimized parameters for person approaching, port trackingClient (e.g. smartLaserPersonTracker).
  • SAVED: Used for backward driving (strategy BACKWARD) as a point of reference to calculate the driven distance. The reference point must be saved with SAVECURPOS() first.
  • ANGLEABSOLUTE: Heading is given by an absolute angle [deg]. Used with strategy ROTATE as a reference. Goal direction first must be set with parameter GOALREGION(?x)(?y)(?a)(?id) while ?x and ?y are ignored.
  • ANGLERELATIVE: Heading is given by an angle [deg] relative to robot. Used with strategy ROTATE as a reference. Goal direction must be set with parameter GOALREGION(?x)(?y)(?a)(?id) while ?x and ?y are ignored. Rotates then relative to this saved position.
  • PATH_NAV: TODO
Attribute Name Attribute Type Description
gm InlineEnumeration

ParameterInstance GOALREGION

Set goal: ?x, ?y, angle ?a, id ?id. Sends an event CDL_GOAL_NOT_REACHED once a new goal is set. CDL_GOAL_REACHED is sent as soon as the goal is reached. All values must be set while ?x/?y or ?a may be ignored depending on the strategy and goalmode.

Attribute Name Attribute Type Description
goalX Double
goalY Double
goalA Double

TriggerInstance SETGOALREGION

active = false

ParameterInstance APPROACHDIST

Set goal approach distance [mm]. The robot will approach until goal is within this distance.

Attribute Name Attribute Type Description
approachDistance Double

ParameterInstance ID

Set CDL_ID. Used to synchronize components, for example with smartMapperGridMap and smartPlannerBreathFirstSearch.

Attribute Name Attribute Type Description
id Int32

TriggerInstance SAVECURPOS

active = false

Save the current robot pose as ?id (for relative movements).

ParameterInstance SAFETYCL

Set global CDL safety clearance distance [mm]. Robot will keep this distance from obstacles when approaching.

Attribute Name Attribute Type Description
safetyClearance Int32