YARP
Yet Another Robot Platform

fakeNavigation: Documentation to be added More...

#include <fakeNavigationDevice/fakeNavigationDev.h>

+ Inheritance diagram for fakeNavigation:

Public Member Functions

virtual bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
 fakeNavigation ()
 
virtual bool close () override
 Close the DeviceDriver. More...
 
bool gotoTargetByAbsoluteLocation (yarp::dev::Nav2D::Map2DLocation loc) override
 Sets a new navigation target, expressed in the absolute (map) coordinate frame. More...
 
bool gotoTargetByRelativeLocation (double x, double y, double theta) override
 //Sets a new relative target, expressed in local (robot) coordinate frame. More...
 
bool gotoTargetByRelativeLocation (double x, double y) override
 //Sets a new relative target, expressed in local (robot) coordinate frame. More...
 
bool getAbsoluteLocationOfCurrentTarget (yarp::dev::Nav2D::Map2DLocation &target) override
 //Gets the last target set through a setNewAbsTarget() command. More...
 
bool getRelativeLocationOfCurrentTarget (double &x, double &y, double &theta) override
 //Gets the last target set through a setNewRelTarget command, expressed in absolute coordinates. More...
 
bool getNavigationStatus (yarp::dev::Nav2D::NavigationStatusEnum &status) override
 //Gets the status of the current navigation task. More...
 
bool stopNavigation () override
 //Stops the current navigation task. More...
 
bool suspendNavigation (double time) override
 //Pauses the current navigation task. More...
 
bool resumeNavigation () override
 //Resumes a previously paused navigation task. More...
 
bool getAllNavigationWaypoints (yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath &waypoints) override
 Returns the list of waypoints generated by the navigation algorithm. More...
 
bool getCurrentNavigationWaypoint (yarp::dev::Nav2D::Map2DLocation &curr_waypoint) override
 Returns the current waypoint pursued by the navigation algorithm. More...
 
bool getCurrentNavigationMap (yarp::dev::Nav2D::NavigationMapTypeEnum map_type, yarp::dev::Nav2D::MapGrid2D &map) override
 Returns the current navigation map processed by the navigation algorithm. More...
 
bool recomputeCurrentNavigationPath () override
 Forces the navigation system to recompute the path from the current robot position to the current goal. More...
 
virtual bool applyVelocityCommand (double x_vel, double y_vel, double theta_vel, double timeout=0.1) override
 Apply a velocity command. More...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 ~DeviceDriver () override=default
 Destructor. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DTargetActions
virtual ~INavigation2DTargetActions ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DControlActions
virtual ~INavigation2DControlActions ()
 Destructor. More...
 

Public Attributes

fakeNavigationThreadnavThread =nullptr
 

Detailed Description

fakeNavigation: Documentation to be added

Definition at line 31 of file fakeNavigationDev.h.

Constructor & Destructor Documentation

◆ fakeNavigation()

fakeNavigation::fakeNavigation ( )

Definition at line 67 of file fakeNavigationDev.cpp.

Member Function Documentation

◆ applyVelocityCommand()

bool fakeNavigation::applyVelocityCommand ( double  x_vel,
double  y_vel,
double  theta_vel,
double  timeout = 0.1 
)
overridevirtual

Apply a velocity command.

velocities are expressed in the robot reference frame

Parameters
x[m/s]
y[m/s]
theta[deg/s]
timeoutThe velocity command expires after the specified amount of time (by default 0.1 seconds)
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 104 of file fakeNavigationDev.cpp.

◆ close()

bool fakeNavigation::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 73 of file fakeNavigationDev.cpp.

◆ getAbsoluteLocationOfCurrentTarget()

bool fakeNavigation::getAbsoluteLocationOfCurrentTarget ( yarp::dev::Nav2D::Map2DLocation target)
overridevirtual

//Gets the last target set through a setNewAbsTarget() command.

Returns
a Map2DLocation containing data of the current target.
true if a target is currently available, false otherwise (in this case returned target is invalid)

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 159 of file fakeNavigationDev.cpp.

◆ getAllNavigationWaypoints()

bool fakeNavigation::getAllNavigationWaypoints ( yarp::dev::Nav2D::TrajectoryTypeEnum  trajectory_type,
yarp::dev::Nav2D::Map2DPath waypoints 
)
overridevirtual

Returns the list of waypoints generated by the navigation algorithm.

Parameters
waypointsthe list of waypoints generated by the navigation algorithm
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 135 of file fakeNavigationDev.cpp.

◆ getCurrentNavigationMap()

bool fakeNavigation::getCurrentNavigationMap ( yarp::dev::Nav2D::NavigationMapTypeEnum  map_type,
yarp::dev::Nav2D::MapGrid2D map 
)
overridevirtual

Returns the current navigation map processed by the navigation algorithm.

Parameters
map_typethe map to be requested (e.g. global, local, etc.)
mapthe map, currently used by the navigation algorithm
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 147 of file fakeNavigationDev.cpp.

◆ getCurrentNavigationWaypoint()

bool fakeNavigation::getCurrentNavigationWaypoint ( yarp::dev::Nav2D::Map2DLocation curr_waypoint)
overridevirtual

Returns the current waypoint pursued by the navigation algorithm.

Parameters
curr_waypointthe current waypoint pursued by the navigation algorithm
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 141 of file fakeNavigationDev.cpp.

◆ getNavigationStatus()

bool fakeNavigation::getNavigationStatus ( yarp::dev::Nav2D::NavigationStatusEnum status)
overridevirtual

//Gets the status of the current navigation task.

Typically stored into navigation_status variable.

Returns
the current navigation status expressed as NavigationStatusEnum.

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 153 of file fakeNavigationDev.cpp.

◆ getRelativeLocationOfCurrentTarget()

bool fakeNavigation::getRelativeLocationOfCurrentTarget ( double &  x,
double &  y,
double &  theta 
)
overridevirtual

//Gets the last target set through a setNewRelTarget command, expressed in absolute coordinates.

Parameters
aMap2DLocation containing data of the current target.
Returns
true if a target is currently available, false otherwise (in this case returned target is invalid)

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 174 of file fakeNavigationDev.cpp.

◆ gotoTargetByAbsoluteLocation()

bool fakeNavigation::gotoTargetByAbsoluteLocation ( yarp::dev::Nav2D::Map2DLocation  loc)
overridevirtual

Sets a new navigation target, expressed in the absolute (map) coordinate frame.

Parameters
locthe location to be reached
Returns
true/false if the command is accepted

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 82 of file fakeNavigationDev.cpp.

◆ gotoTargetByRelativeLocation() [1/2]

bool fakeNavigation::gotoTargetByRelativeLocation ( double  x,
double  y 
)
overridevirtual

//Sets a new relative target, expressed in local (robot) coordinate frame.

Parameters
va three-element vector (x,y,theta) representing the location to be reached
Returns
true/false if the command is accepted

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 98 of file fakeNavigationDev.cpp.

◆ gotoTargetByRelativeLocation() [2/2]

bool fakeNavigation::gotoTargetByRelativeLocation ( double  x,
double  y,
double  theta 
)
overridevirtual

//Sets a new relative target, expressed in local (robot) coordinate frame.

Parameters
va three-element vector (x,y,theta) representing the location to be reached
Returns
true/false if the command is accepted

Implements yarp::dev::Nav2D::INavigation2DTargetActions.

Definition at line 92 of file fakeNavigationDev.cpp.

◆ open()

bool fakeNavigation::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 25 of file fakeNavigationDev.cpp.

◆ recomputeCurrentNavigationPath()

bool fakeNavigation::recomputeCurrentNavigationPath ( )
overridevirtual

Forces the navigation system to recompute the path from the current robot position to the current goal.

If no goal has been set, the command has no effect.

Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 165 of file fakeNavigationDev.cpp.

◆ resumeNavigation()

bool fakeNavigation::resumeNavigation ( )
overridevirtual

//Resumes a previously paused navigation task.

Returns
true/false if the command is executed successfully.

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 126 of file fakeNavigationDev.cpp.

◆ stopNavigation()

bool fakeNavigation::stopNavigation ( )
overridevirtual

//Stops the current navigation task.

Returns
true/false if the command is executed successfully.

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 110 of file fakeNavigationDev.cpp.

◆ suspendNavigation()

bool fakeNavigation::suspendNavigation ( double  time)
overridevirtual

//Pauses the current navigation task.

Returns
true/false if the command is executed successfully.

Implements yarp::dev::Nav2D::INavigation2DControlActions.

Definition at line 117 of file fakeNavigationDev.cpp.

Member Data Documentation

◆ navThread

fakeNavigationThread* fakeNavigation::navThread =nullptr

Definition at line 41 of file fakeNavigationDev.h.


The documentation for this class was generated from the following files: