YARP
Yet Another Robot Platform
fakeNavigationDev.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#include <yarp/os/Network.h>
7#include <yarp/os/RFModule.h>
8#include <yarp/os/Time.h>
9#include <yarp/os/Port.h>
13#include <math.h>
14
15
18{
19public:
20 fakeNavigationThread(double _period, yarp::os::Searchable& _cfg);
21 virtual bool threadInit() override;
22 virtual void threadRelease() override;
23 virtual void run() override;
24};
25
36{
37private:
40
41public:
43
44public:
45 virtual bool open(yarp::os::Searchable& config) override;
46
48
49 //module cleanup
50 virtual bool close() override;
51
52public:
53 //methods inherited from INavigation2Dxxx interfaces
55 bool gotoTargetByRelativeLocation(double x, double y, double theta) override;
56 bool gotoTargetByRelativeLocation(double x, double y) override;
58 bool getRelativeLocationOfCurrentTarget(double& x, double& y, double& theta) override;
60 bool stopNavigation() override;
61 bool suspendNavigation(double time) override;
62 bool resumeNavigation() override;
66 bool recomputeCurrentNavigationPath() override;
67 bool applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout = 0.1) override;
68 bool getLastVelocityCommand(double& x_vel, double& y_vel, double& theta_vel) override;
69};
define control board standard interfaces
virtual void threadRelease() override
Release method.
fakeNavigationThread(double _period, yarp::os::Searchable &_cfg)
virtual void run() override
Loop function.
virtual bool threadInit() override
Initialization method.
fakeNavigation: Documentation to be added
bool resumeNavigation() override
Resume a previously suspended navigation task.
virtual bool close() override
Close the DeviceDriver.
bool getNavigationStatus(yarp::dev::Nav2D::NavigationStatusEnum &status) override
Gets the current status of the navigation task.
bool getCurrentNavigationWaypoint(yarp::dev::Nav2D::Map2DLocation &curr_waypoint) override
Returns the current waypoint pursued by the navigation algorithm.
bool getLastVelocityCommand(double &x_vel, double &y_vel, double &theta_vel) override
Returns the last applied velocity command.
bool getRelativeLocationOfCurrentTarget(double &x, double &y, double &theta) override
Gets the last navigation target in the robot reference frame.
bool stopNavigation() override
Terminates the current navigation task.
bool suspendNavigation(double time) override
Ask to the robot to suspend the current navigation task for a defined amount of time.
bool applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout=0.1) override
Apply a velocity command.
bool gotoTargetByRelativeLocation(double x, double y, double theta) override
Ask the robot to reach a position defined in the robot reference frame.
virtual bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool recomputeCurrentNavigationPath() override
Forces the navigation system to recompute the path from the current robot position to the current goa...
bool getAbsoluteLocationOfCurrentTarget(yarp::dev::Nav2D::Map2DLocation &target) override
Gets the last navigation target in the world reference frame.
fakeNavigationThread * navThread
bool gotoTargetByAbsoluteLocation(yarp::dev::Nav2D::Map2DLocation loc) override
Ask the robot to reach a position defined in the world reference frame.
bool getAllNavigationWaypoints(yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath &waypoints) override
Returns the list of waypoints generated by the navigation algorithm.
bool getCurrentNavigationMap(yarp::dev::Nav2D::NavigationMapTypeEnum map_type, yarp::dev::Nav2D::MapGrid2D &map) override
Returns the current navigation map processed by the navigation algorithm.
Interface implemented by all device drivers.
Definition: DeviceDriver.h:30
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
Definition: Searchable.h:56