-
Notifications
You must be signed in to change notification settings - Fork 5
Navigation Action Server
Implementation Design
The Navigation Action Server provides actions to achieve specific tasks for the competition; in this design, the Navigation Module is activated by the Main Engine, which sends a request for a specific action. Then, the action server executes the needed actions with the help of the move_base
action server.
The services provided by the navigation action servers include three different actions: go_to, search_room, and approach_goal.
Action providers have these common features:
Valid states | Valid Headers | Valid feedback |
---|---|---|
PENDING ACTIVE SUCCEEDED ABORTED |
gt-place so-place ao-pose |
from main_engine: TODO |
Objective: Move the robot to a certain pre-mapped point in the house.
Functionality:
- Obtains a goal (in form of a string) from the main_engine and maps it to a pre-mapped dictionary of goals.
- If valid, it uses the MoveBaseAction to send this goal to the move_base module, create a path, and follow it.
- Waits for a predefined time (120 seconds) for the robot to reach or fail to reach the goal; changes state accordingly.
Feedback | Valid goals | Involved servers |
---|---|---|
|
kitchen restroom living_room dinning_room entrance bedroom |
|
State cases:
Case description | State |
---|---|
Validating goal string given | PENDING |
Robot going to the goal | ACTIVE |
Goal reached | SUCCEEDED |
Goal not reached within specific time frame (120 seconds) | ABORTED |
Robot stuck: cancel action + call for recovery system | ABORTED |
Action canceled | ABORTED |
Objective: go around the room for the robot to be able to identify an object of interest.
Functionality:
- Get instructions to search an area/room as a goal.
- We send the goal to the get_room_path module to generate an array of goal points.
- The path is validated: 1. All goals have to be inside the given room. 2. All goals have to be reachable.
- The array of goal points is sent to create a path and follow it using move_base node.
- The robot starts moving through the goal path.
- Note: The robot will rotate its neck to search for the specific object using the VisionActionServer.
- Depending on the feedback status of this server the robot will continue rotating or stopping if an object was found
- Once the room search is completed, the robot will send a successful status to the Main Engine and stop in its place.
- If not found, the robot will stop at the last goal.
Feedback | Information needed | Involved servers |
---|---|---|
|
|
|
State cases:
Case description | State |
---|---|
Validating path given | PENDING |
Robot looking for object | ACTIVE |
Object found | SUCCEEDED |
Object not found | ABORTED |
Robot stuck: cancel action + call for recovery system | ABORTED |
Action canceled | ABORTED |
Objective: approach a visualized object to the robot's reach.
Functionality:
- The service is activated.
- The object transform is obtained.
- A goal is calculated and validated to approach the robot to the object at its arm's reach.
- The goal is reached.
Feedback | Info needed | Involved servers |
---|---|---|
|
|
|
State cases:
Case description | State |
---|---|
Robot is calculating and validating posible closest goal to the object. | PENDING |
Robot is approaching the object | ACTIVE |
Robot approached object successfully | SUCCEEDED |
Time limit or approach exceeded | ABORTED |
Invalid calculated goal / goal cannot be calculated = object cannot be reached | ABORTED |
Robot stuck: cancel action + call for recovery system | ABORTED |
Canceled action | ABORTED |
This is the actual action server algorithm that is being used, it receives a string
and looks for its PoseStamped
value in a JSON. For more details of the code visit the navigation action code.
def __init__(self, name):
self._action_name = name
# Initialize Navigation Action Server
self._as = actionlib.SimpleActionServer(self._action_name, actionlib_tutorial.msg.navServAction, execute_cb=self.execute_cb, auto_start = False)
self._as.start()