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
 Ask the robot to reach a position defined in the world reference frame. More...
 
bool gotoTargetByRelativeLocation (double x, double y, double theta) override
 Ask the robot to reach a position defined in the robot reference frame. More...
 
bool gotoTargetByRelativeLocation (double x, double y) override
 Ask the robot to reach a position defined in the robot reference frame. More...
 
bool getAbsoluteLocationOfCurrentTarget (yarp::dev::Nav2D::Map2DLocation &target) override
 Gets the last navigation target in the world reference frame. More...
 
bool getRelativeLocationOfCurrentTarget (double &x, double &y, double &theta) override
 Gets the last navigation target in the robot reference frame. More...
 
bool getNavigationStatus (yarp::dev::Nav2D::NavigationStatusEnum &status) override
 Gets the current status of the navigation task. More...
 
bool stopNavigation () override
 Terminates the current navigation task. More...
 
bool suspendNavigation (double time) override
 Ask to the robot to suspend the current navigation task for a defined amount of time. More...
 
bool resumeNavigation () override
 Resume a previously suspended 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...
 
bool applyVelocityCommand (double x_vel, double y_vel, double theta_vel, double timeout=0.1) override
 Apply a velocity command. More...
 
bool getLastVelocityCommand (double &x_vel, double &y_vel, double &theta_vel) override
 Returns the last applied velocity command. More...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
 ~DeviceDriver () override
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. More...
 
virtual std::string id () const
 Return the id assigned to the PolyDriver. More...
 
virtual void setId (const std::string &id)
 Set the id for this device. 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 open (Searchable &config)
 Initialize the object. More...
 
virtual bool close ()
 Shut the object down. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DTargetActions
virtual ~INavigation2DTargetActions ()
 Destructor. More...
 
virtual bool gotoTargetByAbsoluteLocation (yarp::dev::Nav2D::Map2DLocation loc)=0
 Ask the robot to reach a position defined in the world reference frame. More...
 
virtual bool getAbsoluteLocationOfCurrentTarget (yarp::dev::Nav2D::Map2DLocation &loc)=0
 Gets the last navigation target in the world reference frame. More...
 
virtual bool gotoTargetByRelativeLocation (double x, double y)=0
 Ask the robot to reach a position defined in the robot reference frame. More...
 
virtual bool gotoTargetByRelativeLocation (double x, double y, double theta)=0
 Ask the robot to reach a position defined in the robot reference frame. More...
 
virtual bool getRelativeLocationOfCurrentTarget (double &x, double &y, double &theta)=0
 Gets the last navigation target in the robot reference frame. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DControlActions
virtual ~INavigation2DControlActions ()
 Destructor. More...
 
virtual bool getNavigationStatus (NavigationStatusEnum &status)=0
 Gets the current status of the navigation task. More...
 
virtual bool stopNavigation ()=0
 Terminates the current navigation task. More...
 
virtual bool suspendNavigation (const double time_s=std::numeric_limits< double >::infinity())=0
 Ask to the robot to suspend the current navigation task for a defined amount of time. More...
 
virtual bool resumeNavigation ()=0
 Resume a previously suspended navigation task. More...
 
virtual bool recomputeCurrentNavigationPath ()=0
 Forces the navigation system to recompute the path from the current robot position to the current goal. More...
 
virtual bool getAllNavigationWaypoints (yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath &waypoints)=0
 Returns the list of waypoints generated by the navigation algorithm. More...
 
virtual bool getCurrentNavigationWaypoint (yarp::dev::Nav2D::Map2DLocation &curr_waypoint)=0
 Returns the current waypoint pursued by the navigation algorithm. More...
 
virtual bool getCurrentNavigationMap (yarp::dev::Nav2D::NavigationMapTypeEnum map_type, yarp::dev::Nav2D::MapGrid2D &map)=0
 Returns the current navigation map processed by the navigation algorithm. More...
 
- Public Member Functions inherited from yarp::dev::Nav2D::INavigation2DVelocityActions
virtual ~INavigation2DVelocityActions ()
 Destructor. More...
 
virtual bool applyVelocityCommand (double x_vel, double y_vel, double theta_vel, double timeout=0.1)=0
 Apply a velocity command. More...
 
virtual bool getLastVelocityCommand (double &x_vel, double &y_vel, double &theta_vel)=0
 Returns the last applied velocity command. 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::INavigation2DVelocityActions.

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 loc)
overridevirtual

Gets the last navigation target in the world reference frame.

Parameters
locthe location of the robot
Returns
true/false

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

Definition at line 165 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
trajectory_typespecifies if we are requesting the waypoints of the global trajectory or the waypoints of the local trajectory
waypointsthe list of waypoints generated by the navigation algorithm
Returns
true/false

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

Definition at line 141 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 153 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 147 of file fakeNavigationDev.cpp.

◆ getLastVelocityCommand()

bool fakeNavigation::getLastVelocityCommand ( double &  x_vel,
double &  y_vel,
double &  theta_vel 
)
overridevirtual

Returns the last applied velocity command.

Parameters
x[m/s]
y[m/s]
theta[deg/s]
Returns
true/false

Implements yarp::dev::Nav2D::INavigation2DVelocityActions.

Definition at line 110 of file fakeNavigationDev.cpp.

◆ getNavigationStatus()

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

Gets the current status of the navigation task.

Returns
true/false

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

Definition at line 159 of file fakeNavigationDev.cpp.

◆ getRelativeLocationOfCurrentTarget()

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

Gets the last navigation target in the robot reference frame.

Parameters
x
y
theta
Returns
true/false

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

Definition at line 180 of file fakeNavigationDev.cpp.

◆ gotoTargetByAbsoluteLocation()

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

Ask the robot to reach a position defined in the world reference frame.

Parameters
locthe location to be reached
Returns
true/false

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

Definition at line 82 of file fakeNavigationDev.cpp.

◆ gotoTargetByRelativeLocation() [1/2]

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

Ask the robot to reach a position defined in the robot reference frame.

The final orientation of the goal is unspecified.

Parameters
x
y
Returns
true/false

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

Ask the robot to reach a position defined in the robot reference frame.

Parameters
x
y
theta
Returns
true/false

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 171 of file fakeNavigationDev.cpp.

◆ resumeNavigation()

bool fakeNavigation::resumeNavigation ( )
overridevirtual

Resume a previously suspended navigation task.

Returns
true/false

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

Definition at line 132 of file fakeNavigationDev.cpp.

◆ stopNavigation()

bool fakeNavigation::stopNavigation ( )
overridevirtual

Terminates the current navigation task.

Cannot be resumed.

Returns
true/false

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

Definition at line 116 of file fakeNavigationDev.cpp.

◆ suspendNavigation()

bool fakeNavigation::suspendNavigation ( double  time_s)
overridevirtual

Ask to the robot to suspend the current navigation task for a defined amount of time.

Can be resumed by resume().

Parameters
time_s
Returns
true/false

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

Definition at line 123 of file fakeNavigationDev.cpp.

Member Data Documentation

◆ navThread

fakeNavigationThread* fakeNavigation::navThread =nullptr

Definition at line 42 of file fakeNavigationDev.h.


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