38 yCError(MOBVEL_NWC_YARP,
"open() error you have to provide a valid 'local' param");
44 yCError(MOBVEL_NWC_YARP,
"open() error you have to provide a valid 'navigation_server' param");
48 std::string local_rpc_1;
49 std::string remote_rpc_1;
56 yCError(MOBVEL_NWC_YARP,
"open() error could not open rpc port %s, check network", local_rpc_1.c_str());
62 ok = Network::connect(local_rpc_1, remote_rpc_1,
m_carrier);
65 yCError(MOBVEL_NWC_YARP,
"open() error could not connect to %s", remote_rpc_1.c_str());
71 yCError(MOBVEL_NWC_YARP,
"Error! Cannot attach the port as a client");
86 std::lock_guard <std::mutex> lg(
m_mutex);
90 yCError(MOBVEL_NWC_YARP,
"Unable to set transformation");
95 theta_vel =
ret.theta_vel;
101 std::lock_guard <std::mutex> lg(
m_mutex);
virtual bool applyVelocityCommandRPC(const double x_vel, const double y_vel, const double theta_vel, const double timeout)
virtual return_getLastVelocityCommand getLastVelocityCommandRPC()
std::string m_server_name
bool close() override
Close the DeviceDriver.
yarp::os::Port m_rpc_port
bool applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout=0.1) override
Apply a velocity command.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getLastVelocityCommand(double &x_vel, double &y_vel, double &theta_vel) override
Returns the last applied velocity command.
MobileBaseVelocityControlRPC m_RPC
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.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
A single value (typically within a Bottle).
virtual std::string asString() const
Get string value.
bool attachAsClient(yarp::os::UnbufferedContactable &port)
Tag this WireLink as a client, sending data via the specified port.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.