Skip to content

Commit 3927ab2

Browse files
committed
robotPathPlannerDevice::pathPlannerCtrl fixed
1 parent 29f3de2 commit 3927ab2

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/navigationDevices/robotPathPlannerDevice/pathPlannerCtrl.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (C)2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
33
* Author: Marco Randazzo
44
* email: marco.randazzo@iit.it
@@ -29,6 +29,7 @@
2929
#include <yarp/os/PeriodicThread.h>
3030
#include <yarp/dev/IRangefinder2D.h>
3131
#include <yarp/dev/INavigation2D.h>
32+
#include <yarp/sig/LaserMeasurementData.h>
3233
#include <string>
3334

3435
#define _USE_MATH_DEFINES
@@ -75,7 +76,7 @@ bool PlannerThread::readLocalizationData()
7576
yCWarning(PATHPLAN_CTRL) << "Current map name ("<<m_current_map.getMapName()<<") != m_localization_data.map_id ("<< m_localization_data.map_id <<")";
7677
yCInfo(PATHPLAN_CTRL) << "Asking the map '"<< m_localization_data.map_id << "' to the MAP server";
7778
bool b = reloadCurrentMap();
78-
79+
7980
yarp::os::Time::delay(1.0);
8081
if (b){return true;}
8182
else { return true; //consider changing this to false
@@ -110,7 +111,7 @@ bool PlannerThread::internal_controller_t::readInnerNavigationStatus()
110111
{
111112
if (yarp::os::Time::now() - last_print_time > 1.0)
112113
{
113-
yCError(PATHPLAN_CTRL) << "Inner status = error";
114+
yCError(PATHPLAN_CTRL) << "Inner status = error";
114115
yarp::os::Time::delay(1.0);
115116
last_print_time = yarp::os::Time::now();
116117
}
@@ -121,7 +122,7 @@ bool PlannerThread::internal_controller_t::readInnerNavigationStatus()
121122

122123
void PlannerThread::readLaserData()
123124
{
124-
std::vector<LaserMeasurementData> scan;
125+
std::vector<yarp::sig::LaserMeasurementData> scan;
125126
bool ret = m_iLaser->getLaserMeasurement(scan);
126127

127128
if (ret)
@@ -180,7 +181,7 @@ bool prepare_image(IplImage* & image_to_be_prepared, const IplImage* template_im
180181
yCError(PATHPLAN_CTRL) << "PlannerThread::draw_map cannot copy an empty image!";
181182
return false;
182183
}
183-
if (image_to_be_prepared == 0)
184+
if (image_to_be_prepared == 0)
184185
{
185186
image_to_be_prepared = cvCloneImage(template_image);
186187
}
@@ -222,7 +223,7 @@ void PlannerThread::run()
222223
if (err == false)
223224
yCInfo(PATHPLAN_CTRL) << "robotPathPlanner running, ALL ok. Navigation status:" << this->getNavigationStatusAsString();
224225
}
225-
226+
226227
m_mutex.wait();
227228
//double check1 = yarp::os::Time::now();
228229
readLocalizationData();
@@ -582,7 +583,7 @@ void PlannerThread::run()
582583
b.addString(s.c_str());
583584
m_port_status_output.write();
584585
}
585-
586+
586587
m_mutex.post();
587588
}
588589

@@ -672,7 +673,7 @@ bool PlannerThread::getCurrentPath(yarp::dev::Nav2D::Map2DPath& current_path) c
672673
return false;
673674
}
674675

675-
bool PlannerThread::getOstaclesMap(MapGrid2D& obstacles_map)
676+
bool PlannerThread::getOstaclesMap(MapGrid2D& obstacles_map)
676677
{
677678
m_temporary_obstacles_map_mutex.lock();
678679
obstacles_map = m_temporary_obstacles_map;
@@ -759,7 +760,7 @@ bool PlannerThread::startPath()
759760
start.y = 150;//&&&&&
760761
#endif
761762
double t1 = yarp::os::Time::now();
762-
//clear the memory
763+
//clear the memory
763764
m_computed_path.clear();
764765
m_computed_simplified_path.clear();
765766
m_planner_status = navigation_status_thinking;

0 commit comments

Comments
 (0)