164 return std::string(
"navigation_status_idle");
166 return std::string(
"navigation_status_moving");
168 return std::string(
"navigation_status_waiting_obstacle");
170 return std::string(
"navigation_status_goal_reached");
172 return std::string(
"navigation_status_aborted");
174 return std::string(
"navigation_status_failing");
176 return std::string(
"navigation_status_paused");
178 return std::string(
"navigation_status_preparing_before_move");
180 return std::string(
"navigation_status_thinking");
182 return std::string(
"navigation_status_error");
184 return std::string(
"navigation_status_error");
187void Navigation2D_nws_yarp::updateStatusPort(std::string& status)
define control board standard interfaces
contains the definition of a map type
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
void setInterfaces(yarp::dev::Nav2D::INavigation2DTargetActions *iNav_target, yarp::dev::Nav2D::INavigation2DControlActions *iNav_ctrl, yarp::dev::Nav2D::INavigation2DVelocityActions *iNav_vel)
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string m_GENERAL_name
std::string m_rpcPortName
virtual void run() override
Loop function.
virtual bool detach() override
Detach the object (you must have first called attach).
virtual bool open(yarp::os::Searchable &prop) override
Open the DeviceDriver.
yarp::dev::Nav2D::INavigation2DControlActions * iNav_ctrl
std::string m_statusPortName
bool initialize_YARP(yarp::os::Searchable &config)
virtual bool close() override
Close the DeviceDriver.
yarp::dev::Nav2D::NavigationStatusEnum m_navigation_status
virtual bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
Navigation2D_nws_yarp()
Default module constructor.
virtual bool attach(yarp::dev::PolyDriver *drv) override
Attach to another object.
yarp::dev::Nav2D::INavigation2DVelocityActions * iNav_vel
yarp::dev::Nav2D::INavigation2DTargetActions * iNav_target
yarp::os::Port m_statusPort
std::string m_prev_navigation_status
bool view(T *&x)
Get an interface to the device driver.
virtual bool getNavigationStatus(NavigationStatusEnum &status)=0
Gets the current status of the navigation task.
A container for a device driver.
bool isValid() const
Check if device is valid.
bool detachAll() final
Detach the object (you must have first called attach).
A simple collection of objects that can be described and transmitted in a portable way.
A mini-server for performing network communication in the background.
An interface for reading from a network connection.
An abstraction for a periodic thread.
bool setPeriod(double period)
Set the (new) period of the thread.
bool isRunning() const
Returns true when the thread is started, false otherwise.
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...
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
void setReader(PortReader &reader) override
Set an external reader for port data.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base class for nested structures that can be searched.
#define yCInfo(component,...)
#define yCError(component,...)
#define yCTrace(component,...)
#define yCWarning(component,...)
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
@ navigation_status_error
@ navigation_status_preparing_before_move
@ navigation_status_aborted
@ navigation_status_failing
@ navigation_status_goal_reached
@ navigation_status_thinking
@ navigation_status_moving
@ navigation_status_paused
@ navigation_status_waiting_obstacle
For streams capable of holding different kinds of content, check what they actually have.
double now()
Return the current time in seconds, relative to an arbitrary starting point.
An interface to the operating system, including Port based communication.