PotentialField component
- Ports
- Services
- GetIDS (attribute)
- SetDistanceToGoal (attribute)
- SetHitMaxDistance (attribute)
- SetHitMinDistance (attribute)
- SetHitMinZ (attribute)
- SetHitMaxZ (attribute)
- SetRepForceDistance (attribute)
- SetNu (attribute)
- SetPsi (attribute)
- SetAlpha (attribute)
- SetEpsilon (attribute)
- SetMaxSpeed (attribute)
- Stop (function)
- StopPublishOccupancyGrid (function)
- SetVerbose (function)
- PrintObstaclesMap (function)
- Init (activity)
- WriteSpeedInPort (activity)
- StartTrackTargetPort (activity)
- PublishOccupancyGrid (activity)
- Tasks
This is the PotentialField component, originally from the GenoM3 OSMOSIS show case, adapte to take also use a PointCloud.
Using a Pontential Field method. When the robot is located in the port Pose (in) current position, it produces a speed Cmd
in
port PFCmd (out) (linear and angular), trying to reach the port Target (in) position
.
It is thus attracted by its goal and pushed away from laser hit (obstacles) found in the port Scan (in) laser scan.
The implementation is strongly inspired from (and the matlab code provided by the authors).
@article{Guerra:2016kv,
author = {Guerra, M and Efimov, D and Zheng, G and Perruquetti, W},
title = {{Avoiding local minima in the potential field method using input-to-state stability}},
journal = {Control Engineering Practice},
year = {2016},
volume = {55},
number = {C},
pages = {174—184},
month = oct,
publisher = {Elsevier},
doi = {10.1016/j.conengprac.2016.07.008},
}
This implementation only consider one "composite" obstacle…
Ports
PCL (in)
Data structure
|
The PCL to check for the obstacles.
Scan (in)
Data structure
|
The laser scan to check for the obstacles.
Target (in)
Data structure
|
The position
to reach for now.
Pose (in)
Data structure
|
The current position
of the robot.
PFCmd (out)
Data structure
|
The speed command produced as the result (linear.x and angular.z).
PF_Att (out)
Data structure
|
Potential Field Attraction Force.
PF_Rep (out)
Data structure
|
Potential Field Repulsion Force.
PF_V (out)
Data structure
|
Potential Field V Force.
PF_Res (out)
Data structure
|
Potential Field Resulting Force.
OccupancyGrid (out)
Data structure
|
To visualise the map in rviz.
Services
GetIDS (attribute)
Outputs
|
Get the whole IDS (mostly useful for debuging).
SetDistanceToGoal (attribute)
Inputs
|
Set the distance at which we consider we have reached the goal.
SetHitMaxDistance (attribute)
Inputs
|
Set the maximum distance at which laser hits are considered
SetHitMinDistance (attribute)
Inputs
|
Set the minimum distance at which laser hits are considered
SetHitMinZ (attribute)
Inputs
|
Set the minimum z at which we consider hit (w.r.t. the sensor frame).
SetHitMaxZ (attribute)
Inputs
|
Set the maximum z at which we consider hit (w.r.t. the sensor frame).
SetRepForceDistance (attribute)
Inputs
|
Set the distance at which hits generate repulsive force
SetNu (attribute)
Inputs
|
Throws
|
Set the Nu potential field algo parameter.
SetPsi (attribute)
Inputs
|
Throws
|
Set Psi potential field algo parameter.
SetAlpha (attribute)
Inputs
|
Set Alpha potential field algo parameter.
SetEpsilon (attribute)
Inputs
|
Set Epsilon potential field algo parameter.
SetMaxSpeed (attribute)
Inputs
|
Throws
|
Set the max speed values (vx and wz).
Stop (function)
Context
|
Stop the tracking of the target port.
StopPublishOccupancyGrid (function)
Context
|
Stop the publishing of the OccupancyGrid port.
Init (activity)
Context
|
Initialise by first making sure we are stopped.
WriteSpeedInPort (activity)
Inputs
|
Throws
|
Context
|
Write in the port PFCmd (out) the speed passed as argument. This is a debugging activity, use at your own risk. This service does not terminate (unless stopped by the Stop (function) service) and will just loop writting the same speed.
StartTrackTargetPort (activity)
Throws
|
Context
|
Produce the port PFCmd (out) speed command to go and stay at the port Target (in), avoiding ostacles in the Scan (in) port. This service does not terminate (unless stopped by the Stop (function) service) and will servo control to stay at the Target (in) position.
PublishOccupancyGrid (activity)
Throws
|
Context
|
Output the OccupancyGrid port.