Skip to content

Commit 2adc83a

Browse files
committed
navigation adapter implemented. Receives requests and handles service requests to the navigation stack using priorities.
1 parent 48b3f58 commit 2adc83a

36 files changed

+655
-48
lines changed

arc_behaviour/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,18 @@ include_directories(
192192

193193
## Add folders to be run by python nosetests
194194
# catkin_add_nosetests(test)
195-
add_executable(arc_base src/arc_base_node.cpp src/ArcBase.cpp src/ArcBase.h)
195+
add_executable(arc_base src/arc_base_node.cpp src/ArcBase.cpp include/ArcBase.h)
196196

197197
target_link_libraries(arc_base
198198
${catkin_LIBRARIES}
199199
)
200200

201201
#PERCEPTUAL SCHEMAS
202-
add_executable(detect_marker_ps src/DetectMarkerPS.cpp src/DetectMarkerPS.h src/detect_marker_ps_node.cpp)
203-
add_executable(detect_robot_ps src/detect_robot_ps_node.cpp src/DetectRobotPS.cpp src/DetectRobotPS.h)
204-
add_executable(detect_debris_ps src/detect_debris_ps_node.cpp src/DetectDebrisPS.cpp src/DetectDebrisPS.h)
205-
add_executable(detect_victim_ps src/detect_victim_ps_node.cpp src/DetectVictimPS.cpp src/DetectVictimPS.h)
206-
add_executable(navigation_adapter src/NavigationAdapter.cpp src/NavigationAdapter.h src/navigation_adapter_node.cpp)
202+
add_executable(detect_marker_ps src/DetectMarkerPS.cpp include/DetectMarkerPS.h src/detect_marker_ps_node.cpp)
203+
add_executable(detect_robot_ps src/detect_robot_ps_node.cpp src/DetectRobotPS.cpp include/DetectRobotPS.h)
204+
add_executable(detect_debris_ps src/detect_debris_ps_node.cpp src/DetectDebrisPS.cpp include/DetectDebrisPS.h)
205+
add_executable(detect_victim_ps src/detect_victim_ps_node.cpp src/DetectVictimPS.cpp include/DetectVictimPS.h)
206+
add_executable(navigation_adapter src/NavigationAdapter.cpp include/NavigationAdapter.h src/navigation_adapter_node.cpp)
207207

208208
target_link_libraries(detect_victim_ps ${catkin_LIBRARIES} )
209209
target_link_libraries(detect_marker_ps ${catkin_LIBRARIES} )
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

arc_behaviour/src/NavigationAdapter.h renamed to arc_behaviour/include/NavigationAdapter.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseCl
2222
namespace arc_behaviour {
2323
class NavigationAdapter{
2424
private:
25+
const int DEFAULT_NAVIGATION_PRIORITY = 0;
2526
ros::NodeHandle global_handle;
2627

2728
ros::NodeHandle local_handle;
@@ -40,6 +41,17 @@ namespace arc_behaviour {
4041
* Whether or not the navigation stack is currently being used to reach a goal.
4142
*/
4243
bool goal_active;
44+
/**
45+
* When goal is active, we have some priority that was specified with the navigation request.
46+
* If any further requests are made to change the navigation, the priority must be higher than the value specified here.
47+
*/
48+
int current_nav_priority;
49+
50+
/**
51+
* Process navigation request and send it to be handled by navigation stack.
52+
* @param req: The accepted navigation request.
53+
*/
54+
void sendGoal(arc_msgs::NavigationRequest::Request &req);
4355

4456
public:
4557
NavigationAdapter();

arc_behaviour/src/ArcBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "ArcBase.h"
1+
#include "../include/ArcBase.h"
22

33
using namespace arc_behaviour;
44

arc_behaviour/src/DetectDebrisPS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <rosconsole/macros_generated.h>
22
#include <ros/ros.h>
3-
#include "DetectDebrisPS.h"
3+
#include "../include/DetectDebrisPS.h"
44
#include "arc_msgs/DetectedDebris.h"
55
#include "arc_msgs/Debris.h"
66
#include "marker_msgs/MarkerDetection.h"

arc_behaviour/src/DetectMarkerPS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <rosconsole/macros_generated.h>
22
#include <ros/ros.h>
3-
#include "DetectMarkerPS.h"
3+
#include "../include/DetectMarkerPS.h"
44
#include "marker_msgs/MarkerDetection.h"
55
#include "std_msgs/Bool.h"
66

0 commit comments

Comments
 (0)