SafetyPilot component
- Ports
- Services
- GetIDS (attribute)
- SetHitMinDistance (attribute)
- SetStopDistance (attribute)
- SetStopLateralDistance (attribute)
- SetMaxSpeed (attribute)
- SetMinHit (attribute)
- SetMinGenHit (attribute)
- Stop (function)
- SetVerbose (function)
- SpeedMergeAndStopIfObstacle (activity)
- JoystickOn (activity)
- WriteSpeedInPort (activity)
- Tasks
This is the SafetyPilot component from the GenoM3 OSMOSIS show case.
It can also be used with minnie
by using a PointCloud instead of Laserscan.
It produces a speed Cmd
in port Cmd (out) (linear and angular) from:
-
port Joystick (in) if present and active, or
-
port PFCmd (in) (PotentialField) if present and there are no obstacle, found in the port Scan (in) laser scan,
-
a null speed if a too close obstacle is found in Scan (in).
Note that when we use Joystick (in), we do not check Scan (in) so it can be used to tak control back and move the robot away from an obstacle. |
Ports
Cmd (out)
Data structure
|
The speed command produced (linear.x and angular.z).
Scan (in)
Data structure
|
The laser to check for the closest obstacle.
PCL (in)
Data structure
|
The pcl to check for the closest obstacle.
PFCmd (in)
Data structure
|
The speed command produced by the Potential Field component.
Services
GetIDS (attribute)
Outputs
|
Get the whole IDS (mostly useful for debuging).
SetHitMinDistance (attribute)
Inputs
|
Set the minimum distance at which laser hits are considered
SetStopLateralDistance (attribute)
Inputs
|
Set the stop_lateral_distance
.
SetMaxSpeed (attribute)
Inputs
|
Throws
|
Set the max speed values (vx and wz).
Stop (function)
Context
|
SpeedMergeAndStopIfObstacle (activity)
Throws
|
Context
|
This activity starts the SafetyPilot. It first checks the availability of the ports.
Then it loops until it is stopped. If the port Joystick (in) is active (somebody uses the JoyStick),
it skips the check_obstable
codel.
Otherwise, it get a fresh port Scan (in) or PCL (in), then checks for obstacle and if none are found passes the PFCmd (in).
It then writes the speed in port Cmd (out).
The stop
codel sets and writes a null linear and angular speed in Cmd (out).
JoystickOn (activity)
Throws
|
Context
|
This activity starts pure Joystick control. It first checks the availability of the port.
Then it loops until it is stopped, by grabbing the speed from the Joystick only.
It then writes the speed in port Cmd (out).
The stop
codel sets and writes a null linear and angular speed in Cmd (out).
WriteSpeedInPort (activity)
Inputs
|
Throws
|
Context
|
Write in the port Cmd (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.