YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Odometry2DServerImpl.cpp
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
7#include <yarp/os/LogStream.h>
9
12using namespace yarp::os;
13using namespace yarp::dev;
14using namespace yarp::dev::Nav2D;
15using namespace std;
16
17#define DEFAULT_THREAD_PERIOD 0.01
18
19#ifndef M_PI
20#define M_PI 3.14159265358979323846
21#endif
22
23namespace {
24YARP_LOG_COMPONENT(ODOM2D_RPC, "yarp.device.map2D_nws_yarp.IMap2DRPCd")
25}
26
27#define CHECK_POINTER(xxx) {if (xxx==nullptr) {yCError(ODOM2D_RPC, "Invalid interface"); return false;}}
28
30{
31 std::lock_guard <std::mutex> lg(m_mutex);
32
33 auto ret = m_iOdom->resetOdometry();
34 if (!ret)
35 {
36 yCError(ODOM2D_RPC, "Unable to resetOdometry");
37 }
38 return ret;
39}
bool ret
yarp::dev::ReturnValue reset_odometry_RPC() override
virtual yarp::dev::ReturnValue resetOdometry()=0
Resets the odometry of the robot to zero.
A mini-server for performing network communication in the background.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
STL namespace.
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.