36 yCError(LOCALIZATION2D_NWC_YARP,
"open() error you have to provide a valid 'local' param");
42 yCError(LOCALIZATION2D_NWC_YARP,
"open() error you have to provide valid 'remote' param");
49 remote_streaming_name,
59 yCError(LOCALIZATION2D_NWC_YARP,
"open() error could not open rpc port %s, chlocal_streaming_nameeck network", local_rpc.c_str());
74 ok = Network::connect(local_rpc, remote_rpc);
77 yCError(LOCALIZATION2D_NWC_YARP,
"open() error could not connect to %s", remote_rpc.c_str());
83 yCError(LOCALIZATION2D_NWC_YARP,
"Error! Cannot attach the port as a client");
92 std::lock_guard <std::mutex> lg(
m_mutex);
98 if (cov.
rows() != 3 || cov.
cols() != 3)
100 yCError(LOCALIZATION2D_NWC_YARP) <<
"Covariance matrix is expected to have size (3,3)";
104 std::lock_guard <std::mutex> lg(
m_mutex);
110 std::lock_guard <std::mutex> lg(
m_mutex);
114 yCError(LOCALIZATION2D_NWC_YARP,
"Unable to set transformation");
123 std::lock_guard <std::mutex> lg(
m_mutex);
127 yCError(LOCALIZATION2D_NWC_YARP,
"Unable to set transformation");
136 std::lock_guard <std::mutex> lg(
m_mutex);
140 yCError(LOCALIZATION2D_NWC_YARP,
"Unable to set transformation");
150 std::lock_guard <std::mutex> lg(
m_mutex);
154 yCError(LOCALIZATION2D_NWC_YARP,
"Unable to set transformation");
163 std::lock_guard <std::mutex> lg(
m_mutex);
167 yCError(LOCALIZATION2D_NWC_YARP,
"Unable to set transformation");
176 std::lock_guard <std::mutex> lg(
m_mutex);
182 std::lock_guard <std::mutex> lg(
m_mutex);
virtual return_get_estimated_poses get_estimated_poses_RPC()
virtual return_get_current_position1 get_current_position1_RPC()
virtual bool start_localization_service_RPC()
virtual return_get_estimated_odometry get_estimated_odometry_RPC()
virtual return_get_localization_status get_localization_status_RPC()
virtual bool set_initial_pose1_RPC(const yarp::dev::Nav2D::Map2DLocation &loc)
virtual return_get_current_position2 get_current_position2_RPC()
virtual bool set_initial_pose2_RPC(const yarp::dev::Nav2D::Map2DLocation &loc, const yarp::sig::Matrix &cov)
virtual bool stop_localization_service_RPC()
ILocalization2DMsgs m_RPC
bool stopLocalizationService() override
Stops the localization service.
bool getEstimatedPoses(std::vector< yarp::dev::Nav2D::Map2DLocation > &poses) override
Gets a set of pose estimates computed by the localization algorithm.
std::string m_remote_name
bool getCurrentPosition(yarp::dev::Nav2D::Map2DLocation &loc) override
Gets the current position of the robot w.r.t world reference frame.
yarp::os::Port m_rpc_port_localization_server
bool getEstimatedOdometry(yarp::dev::OdometryData &odom) override
Gets the estimated odometry the robot, including its velocity expressed in the world and in the local...
bool close() override
Close the DeviceDriver.
bool startLocalizationService() override
Starts the localization service.
bool setInitialPose(const yarp::dev::Nav2D::Map2DLocation &loc) override
Sets the initial pose for the localization algorithm which estimates the current position of the robo...
bool getLocalizationStatus(yarp::dev::Nav2D::LocalizationStatusEnum &status) override
Gets the current status of the localization task.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
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 Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
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.
size_t cols() const
Return number of columns.
size_t rows() const
Return number of rows.
#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.