-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some code refactoring aimed to have obstacles.cpp as a common file in…
… navLib added device simpleVelocityNavigationWithLaser
- Loading branch information
Showing
13 changed files
with
341 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
app/simpleVelocityNavigationExamples/scripts/simpleVelocityNavigationExample2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<application> | ||
<name>simpleVelocityNavigation (with Laser) EXAMPLE2</name> | ||
|
||
<dependencies> | ||
</dependencies> | ||
|
||
<module> | ||
<name>yarpdev</name> | ||
<parameters>--device transformServer --ROS "(enable_ros_publisher 0)" "(enable_ros_subscriber 0)"</parameters> | ||
<node>console</node> | ||
</module> | ||
|
||
<module> | ||
<name>yarpdev</name> | ||
<parameters>--device fakeMotionControl --name /robot_2wheels/mobile_base --GENERAL::Joints 2</parameters> | ||
<node>console</node> | ||
</module> | ||
|
||
<module> | ||
<name>baseControl</name> | ||
<parameters>--context baseControl_SIM --from robot_2wheels.ini --skip_robot_interface_check</parameters> | ||
<node>console</node> | ||
</module> | ||
|
||
<module> | ||
<name>yarpdev</name> | ||
<parameters>--device localization2DServer --subdevice odomLocalizer --context simpleVelocityNavigationExamples --from localizationServer.ini</parameters> | ||
<node>console</node> | ||
</module> | ||
|
||
<module> | ||
<name>yarpdev</name> | ||
<parameters>--device map2DServer --mapCollectionContext mapsExample</parameters> | ||
<node>console</node> | ||
</module> | ||
|
||
<module> | ||
<name>yarpdev</name> | ||
<parameters>--device Rangefinder2DWrapper --subdevice fakeLaser --period 10 --name /robot_2wheels/laser:o --test use_mapfile --map_file C:\\software\\maps\\map_test.map</parameters> | ||
<node>console</node> | ||
</module> | ||
|
||
<module> | ||
<name>yarpdev</name> | ||
<parameters>--device navigation2DServer --subdevice simpleVelocityNavigationWithLaser --context simpleVelocityNavigationExamples --from simpleVelocityControl.ini</parameters> | ||
<node>console</node> | ||
</module> | ||
|
||
<connection> | ||
<from>/simpleVelocityNavigation/control:o</from> | ||
<to>/baseControl/control:i</to> | ||
<protocol>udp</protocol> | ||
</connection> | ||
|
||
<connection> | ||
<from>/baseControl/odometry:o</from> | ||
<to>/fakeLaser/location:i</to> | ||
<protocol>tcp</protocol> | ||
</connection> | ||
|
||
</application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
/* | ||
* Copyright (C)2018 ICub Facility - Istituto Italiano di Tecnologia | ||
* Author: Marco Randazzo | ||
* email: [email protected] | ||
* website: www.robotcub.org | ||
* Permission is granted to copy, distribute, and/or modify this program | ||
* under the terms of the GNU General Public License, version 2 or any | ||
* later version published by the Free Software Foundation. | ||
* | ||
* A copy of the license can be found at | ||
* http://www.robotcub.org/icub/license/gpl.txt | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
* Public License for more details | ||
• Copyright (C) 2019 Istituto Italiano di Tecnologia (IIT) | ||
• All rights reserved. | ||
• | ||
• This software may be modified and distributed under the terms of the | ||
• GPL-2+ license. See the accompanying LICENSE file for details. | ||
*/ | ||
|
||
#include <yarp/os/LogStream.h> | ||
|
@@ -133,19 +123,19 @@ void simpleVelocityNavigation::send_command(control_type control_data) | |
|
||
bool simpleVelocityNavigation::gotoTargetByAbsoluteLocation(yarp::dev::Map2DLocation loc) | ||
{ | ||
yError() << "gotoTargetByAbsoluteLocation() Not implemented by simpleVelocityNavigation"; | ||
yError() << "gotoTargetByAbsoluteLocation() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::gotoTargetByRelativeLocation(double x, double y) | ||
{ | ||
yError() << "gotoTargetByRelativeLocation() Not implemented by simpleVelocityNavigation"; | ||
yError() << "gotoTargetByRelativeLocation() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::gotoTargetByRelativeLocation(double x, double y, double theta) | ||
{ | ||
yError() << "gotoTargetByRelativeLocation() Not implemented by simpleVelocityNavigation"; | ||
yError() << "gotoTargetByRelativeLocation() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
|
@@ -167,54 +157,54 @@ bool simpleVelocityNavigation::getNavigationStatus(yarp::dev::NavigationStatusEn | |
|
||
bool simpleVelocityNavigation::stopNavigation() | ||
{ | ||
yError() << "stopNavigation() Not implemented by simpleVelocityNavigation"; | ||
yError() << "stopNavigation() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::getAbsoluteLocationOfCurrentTarget(yarp::dev::Map2DLocation& target) | ||
{ | ||
yError() << "getAbsoluteLocationOfCurrentTarget() Not implemented by simpleVelocityNavigation"; | ||
yError() << "getAbsoluteLocationOfCurrentTarget() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::getRelativeLocationOfCurrentTarget(double& x, double& y, double& theta) | ||
{ | ||
yError() << "getRelativeLocationOfCurrentTarget() Not implemented by simpleVelocityNavigation"; | ||
yError() << "getRelativeLocationOfCurrentTarget() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::getAllNavigationWaypoints(std::vector<yarp::dev::Map2DLocation>& waypoints) | ||
{ | ||
yError() << "getAllNavigationWaypoints() Not implemented by simpleVelocityNavigation"; | ||
yError() << "getAllNavigationWaypoints() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::getCurrentNavigationWaypoint(yarp::dev::Map2DLocation& curr_waypoint) | ||
{ | ||
yError() << "getCurrentNavigationWaypoint() Not implemented by simpleVelocityNavigation"; | ||
yError() << "getCurrentNavigationWaypoint() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::suspendNavigation(double time) | ||
{ | ||
yError() << "suspendNavigation() Not implemented by simpleVelocityNavigation"; | ||
yError() << "suspendNavigation() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::resumeNavigation() | ||
{ | ||
yError() << "resumeNavigation() Not implemented by simpleVelocityNavigation"; | ||
yError() << "resumeNavigation() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::recomputeCurrentNavigationPath() | ||
{ | ||
yError() << "recomputeCurrentNavigationPath() Not implemented by simpleVelocityNavigation"; | ||
yError() << "recomputeCurrentNavigationPath() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} | ||
|
||
bool simpleVelocityNavigation::getCurrentNavigationMap(yarp::dev::NavigationMapTypeEnum map_type, yarp::dev::MapGrid2D& map) | ||
{ | ||
yError() << "getCurrentNavigationMap() Not implemented by simpleVelocityNavigation"; | ||
yError() << "getCurrentNavigationMap() Not implemented by " << m_localName; | ||
return NOT_IMPLEMENTED; | ||
} |
Oops, something went wrong.