Score: 205
Uploads: 5
Downloads: 0
Create time: 2016-10-18 05:43:15

Upload log:
rs3.py.zip - n our current state machine we decided to move on to the next state even if the current transition had to be aborted. But it might be useful to keep a count of how often a goal was successful. For example, if this were a patrol robot and the success rate fell below some threshold, then we might suspect that something was wrong with the robot or that something was getting in its way
tp.py.zip - The parameter self.n_patrols is defined in our task_setup.py file which in turn reads it the ROS parameter server with a default value of 3. (We use the special value of -1 if we want the robot to loop forever.) The counter self.patrol_count is also defined in task_setup.py and is initialized to 0.
excution-template.py.zip - The predefined outcomes for a SimpleActionState are succeeded , aborted or preempted . The next step is to construct the overall state machine using these outcomes and states:
battery_simulator.py.zip - The node publishes a floating point value on the /battery_level topic starting with the initial_battery_level and counting down to 0 over a time period specified by the battery_runtime parameter. Both parameters can be specified in a launch file as
task_setup.py.zip - The battery simulator node battery_simulator.py can be found in the directory rbx2_utils/nodes . The script is fairly straightforward except perhaps for the parts relating to dynamic reconfigure which we will cover in detail in Chapter 7. For now, we only need to note the following.

Download log: