29 yCDebug(FAKENAVIGATION) <<
"config configuration: \n" << config.
toString().c_str();
31 std::string context_name =
"robotGoto";
32 std::string file_name =
"robotGoto_cer.ini";
34 if (config.
check(
"context")) {
37 if (config.
check(
"from")) {
46 std::string configFile = rf.
findFile(
"from");
47 if (configFile !=
"") {
50 yCDebug(FAKENAVIGATION) <<
"robotGotoDev configuration: \n" << p.
toString().c_str();
94 yCInfo(FAKENAVIGATION) <<
"gotoTargetByRelativeLocation not yet implemented";
100 yCInfo(FAKENAVIGATION) <<
"gotoTargetByRelativeLocation not yet implemented";
106 yCInfo(FAKENAVIGATION) <<
"applyVelocityCommand not yet implemented";
112 yCInfo(FAKENAVIGATION) <<
"getLastVelocityCommand not yet implemented";
143 yCInfo(FAKENAVIGATION) <<
"getAllNavigationWaypoints not yet implemented";
149 yCInfo(FAKENAVIGATION) <<
"getCurrentNavigationWaypoint not yet implemented";
155 yCInfo(FAKENAVIGATION) <<
"getCurrentNavigationMap not yet implemented";
167 target=m_absgoal_loc;
182 yCInfo(FAKENAVIGATION) <<
"getRelativeLocationOfCurrentTarget not yet implemented";
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.
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.
bool start()
Call this to start the thread.
void stop()
Call this to stop the thread, this call blocks until the thread is terminated (and releaseThread() ca...
A class for storing options and configuration information.
std::string toString() const override
Return a standard text representation of the content of the object.
void fromString(const std::string &txt, bool wipe=true)
Interprets a string as a list of properties.
bool fromConfigFile(const std::string &fname, bool wipe=true)
Interprets a file as a list of properties.
Helper class for finding config files and other external resources.
bool setDefaultContext(const std::string &contextName)
Sets the context for the current ResourceFinder object.
std::string findFile(const std::string &name)
Find the full path to a file.
bool setDefaultConfigFile(const std::string &fname)
Provide a default value for the configuration file (can be overridden from command line with the –fro...
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
virtual std::string asString() const
Get string value.
#define yCInfo(component,...)
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
@ navigation_status_moving
@ navigation_status_paused
For streams capable of holding different kinds of content, check what they actually have.