ALNavigation API

Overview | API


Namespace : AL

#include <alproxies/alnavigationproxy.h>

Method list

As any module, this module inherits methods from ALModule API. It also has the following specific methods:

class ALNavigationProxy

Methods

bool ALNavigationProxy::moveTo(const float& x, const float& y, const float& theta)

There are two overloads of this function:

Like ALMotionProxy::moveTo(), makes the robot move to the given pose in the ground plane, relative to FRAME_ROBOT. Unlike ALMotionProxy::moveTo(), the robot stops as soon as it has detected an obstacle in its security area. This is a blocking call.

For now bumpers and sonars are used to detect obstacles.

Parameters:
  • x – Distance along the X axis in meters.
  • y – Distance along the Y axis in meters.
  • theta – Rotation around the Z axis in radians [-3.1415 to 3.1415].
Returns:

True if the robot reached the target, False if the robot was stopped by an obstacle.

bool ALNavigationProxy::moveTo(const float& x, const float& y, const float& theta, const AL::ALValue& moveConfig)

Like ALMotionProxy::moveTo(), makes the robot move to the given pose in the ground plane, relative to FRAME_ROBOT, with custom move configuration. Unlike ALMotionProxy::moveTo(), the robot stops as soon as it has detected an obstacle in its security area. This is a blocking call.

For now bumpers and sonars are used to detect obstacles.

Parameters:
  • x – Distance along the X axis in meters.
  • y – Distance along the Y axis in meters.
  • theta – Rotation around the Z axis in radians [-3.1415 to 3.1415].
  • moveConfig – An ALValue with the custom move configuration.
Returns:

True if the robot reached the target, False if the robot was stopped by an obstacle.

void ALNavigationProxy::setSecurityDistance(const float& distance)

Defines the security distance used by ALNavigationProxy::moveTo().

Parameters:
  • distance – distance in meters. Defines the security area in which any object detection stops the robot. Default value: 0.40 m.