In this assignment, you will develop a ROS package for planar path planning from a robot's current location to a goal location, assuming a localized robot. Additionally, you will develop a package for playing robot soccer using your path planning package. You will evaluate your client through (graded) basic skills challenges such as navigating to specific locations and (ungraded) competition against other groups.
A video of Lisa Miller's implementation of this assignment from Spring Semester 2009.
A video of "Hefty's wicked spin" (by Nicholas and Odean) during Fall 2007 path planning match play.
Assigned: Friday October 1, 2010
Waypoint milestone due: Wednesday, October 13, 2010
Inter-group soccer competition: Wednesday, October 20, 2010
Project reports due: Friday, October 22, 2010 (11:59 pm)
With our introduction to ROS in Assignments 1 and 2 behind us, it is now time to dig into making our robots play soccer. The next three projects will follow different approaches to autonomous robot control for 1-on-1 soccer through deliberation (this assignment), state estimation, and reaction. In the current assignment, you will use path planning algorithms to control your robot soccer player using a provided overhead localization system. In class, we will cover several different planning algorithms that you can choose from for your implementation. Your planner implementation within your control client will be providing updated game state and the static dimensions of the field. You will evaluate your client through (graded) basic skills challenges such as navigating to specific locations and (ungraded) competition against other groups.
For this project, your ROS implementation will deliberately plan and navigate paths for the robot. At its core, this controller must be able to maneuver the robot from its current pose on the field, expressed as the position and orientation triplet q = (x,y,\theta), to reach a desired destination, also expressed as pose q' = (x',y',\theta'). A sequence of destinations can then form a trajectory for the robot to traverse. An estimate of the current robot pose is provided by a state estimation system from robot sensing given a map of the environment through a process called localization. In this assignment, localization is performed external to the robot using overhead cameras, which could be thought of as a mini GPS. The map of the soccer field is described in the following section. This setup will allow us to focus mostly on the planning problem, whereas the next assignment deals strictly with localization from onboard robot sensing.
Given localization, a map, and a goal destination, your controller must plan and traverse a path from your current location to the goal. Planning is essentially a search over all possible routes from q to q', or configuration space. Graphs are typically used to express the space of possible poses (as graph vertices) and valid transitions between poses (as graph edges). Your robot client will need to construct graphs in the robot's configurations space and then search this graph to find good paths to traverse. For planning algorithms you have a number of options:
There is pseudocode available for Dijkstra's and A* search on Wikipedia as well as many other sources. There are many verisons of Dijkstra's and A* available on the internet. You are free to use these resources, but just be sure to cite anything that is not your own.
Note: even though a localization mechanism is provided, it is neither precise nor deterministic. Be careful to process state estimates with some consideration of uncertainty.
Note: path planning for this assignment is a more constrained version of [motion planning], where explicit time and pose constraints must be met.
Your grade will be determined primarily on your robot's performance in the skills challenges and reported results from challenge trials. There are two skills challenges that will be used to test the functionality of your robot controller:
The course staff has set up the robot soccer field within the Roomba Lab for games and individual challenges associated with assignment. The field is roughly 3.8m long and 2.6m wide. The direction (θ) a robot faces is defined in radians, with θ == 0 facing in the +x direction and θ increasing as the robot turns counterclockwise. It is reasonable to assume that the theta reported from planar tracker will fall somewhere within [-2π, 2π].
Localization for these robots within the field of view is handled by a ROS publisher written by the course staff, based on the position_tracker and ar_recog packages. How to incorporate such localization information in your controller is explained in following sections. The goals are roughly 0.7m in width and slightly extend past the end boundary. A goal will consider being scored if the ball crosses the goal line.
This assignment uses two experimental ROS packages from brown-ros-pkg for localizing your robot and visualizing the state of the soccer field in the Roomba Lab:
Your tasks for this assignment are as follows.
The following sections provide information to guide you through completing these tasks.
The current overhead localization system consists of two netbook computers that process images from two overhead mounted PS3 cameras to localize and publish objects on the robot soccer field. Each computer runs its own roscore, cmvision and ar_recog to recognize objects, and planar_tracker to localize these objects. Robots and obstacles will be recognized using AR tags, as used in the previous assignment, with unique numerical ID maintained by ar_recog. The yellow ball will be recognized using cmvision.
Localized objects are published as /tag_positions_l and /tag_positions_r topics, for each camera respectively. These topics, however, are local to roscores running on each machine. In the Roomba Lab, /tag_positions_l topic is published on the laptop "bold" and /tag_positions_r is published on "italic". It is not possible to directly subscribe to topics on "bold" and "italic" from your robot's computer, running its own roscore. Using the foreign_relay package, however, your controller will subscribe to localization topics published on remote roscores. This relay will occur transparently through foreign_relay, which creates a local version of the remote topic with the same name.
To view localization topics from your robot, first test to determine whether your computer has foreign_relay and planar_tracker installed. Try to roscd to these packages:
> roscd foreign_relay > roscd planar_tracker
If the roscd command for foreign relay fails, this package can be installed with the following commands (assuming ROS C-Turtle distribution with Ubuntu):
> cd /opt/ros/cturtle/stacks > svn checkout https://code.ros.org/svn/wg-ros-pkg/branches/trunk_cturtle/stacks/dance_demo/foreign_relay/ > rosmake foreign_relay
If the roscd command for planar_tracker fails, it can be installed by updating brown-ros-pkg packages
> cd /opt/ros/cturtle/stacks/brown-ros-pkg > svn update > rosmake planar_tracker
Assuming foreign_relay and planar_tracker are installed, you can print localization topics using rostopic using the following command in separate terminals. Run roscore in the first terminal window:
In a second terminal window, use foreign_relay to register the remote topic (from "bold", in this case) with the local ROS master:
> rosrun foreign_relay foreign_relay.py sub /tag_positions_l http://bold:11311 registering /planar_tracker_bold_11311 @ http://bold:32785
In a third terminal window, print published localization messages from "bold" to the terminal using rostopic:
> rostopic echo tag_positions_l
Follow this process with "italic" and tag_positions_r to subscribe and view localization topics from the other camera.
Although less polished, the overhead localization technical guide has more specific information about running, calibrating, and accessing the overhead localization system as well as a technical overview.
A temporary server for the overhead visualization has been set up to for you to visually view the state of the FC 148 pitch. From your web browser, navigate to http://10.100.0.203/overhead_map/overhead_map.html?map=soccer&address=10.100.0.115 to see a visualization of the current state (available only from the local Roomba Lab network).
Please consult the overhead_map guide for more information about how to draw objects on this canvas. More information will come about overhead drawing messages.
The development of your path_planner package should follow this structure, and corresponds to the project milestones below:
> roscd trajectory_msgs
If not installed, please add this package with the following commands:
> cd /opt/ros/cturtle/stacks > svn checkout https://code.ros.org/svn/wg-ros-pkg/branches/arm_planning_branch/stacks/pr2_controllers/trajectory_msgs > rosmake trajectory_msgs
You are expected to conduct least 3 trials with 4 different initial conditions for both your planner_navigation and planner_goalscore nodes (24 trials total). For each trial, measure the properties mentioned for each challenge. All of your trials must use the same controller without modification.
Document your controller and experimental results in a written report based on the structure described in the course missive. You are welcome to experiment with additional servoing techinques and evaluate the relative performance of each. When completed, your report should be committed to the object_seeking/docs/username directory of your repository.
Because this assignment is more involved than previous projects, an intermediate demonstration of your path planning algorithm (due October 13) is required before the overall project is completed. There will be no motion control aspect of the milestone assignment; that is, your client will not be controlling the robot. However, you do need to subscribe to overhead localization information to determine a start pose, the goal location, and obstacle positions.
For the navigation challenge, your path_planning package must generate a path from the robot's current location to the ball without colliding with obstacles. An AR tag representing a robot object will be placed on the soccer field in 404; this is your start pose and you will need to specify the id of the tag to your controller. The yellow ball will be placed on the field and the (x, y) position of the ball is your desired goal location. AR tags representing obstacles will also be placed on the field and your calculated path cannot run over the obstacles. Using this information from the overhead localization system, your controller will need to generate waypoints from the start location to the end location in the form of (x, y, \theta) for each waypoint. This path represents the path your robot will take to get to the desired goal location.
This milestone requires your package to subscribe to localization information (as /tag_positions_l and /tag_positions_r topics) and publish the computed plan (as a JointTrajectory message topic). The path computed by your path planner can be output through rostopic. Alternatively, you can visualize this plan by publishing Overhead_Map_Objs messages, which can be viewed in a web browser through rosjs.
The Milestone is due by October 13. You will need to demonstrate your Milestone implementation during class or to a TA (during their hours or by scheduling an appointment).
As stated above, your grade will be determined primarily on your robot's performance in the skills challenges and reported results from challenge trials. There are two skills challenges that will be used to test the functionality of your robot controller:
Your robot will be expected to compete in an in-class robot soccer competition on October 20th. Games in this competition will consist of one 7 minute period. You will be expected to play at least 2 games in a round robin schedule. This schedule will be provided the day before the demos. Do not be late for your games as this will delay the remainder of the competition schedule. Failure to participate in the competition will result in a 10% deduction in your grade for the assignment.
At the beginning of the game after the scoring of a goal, an offensive robot begins play kicking the ball from the center of the field. The kickoff defender must start in their half until the offensive robot strikes the ball. This start could be done manually through starting or keying an event to your robot client. Afterward, no set roles are assigned to the robots. Make sure your controller can be set to defend either goal using rosparam with the cs148_team parameter.
The main play penalty is directly pushing an opposing player. When such a penalty is assessed, your robot will be taken off the field for 5 seconds and put on their 148 logo when returning. If your robot leaves the field and does not return within 3 seconds, it will be set on the "148" logo on the side of the field it is defending with a 5 second penalty assessed.
Note: Development for all groups freezes at the start of match play. Modifications to your package cannot be made during the competition, although modification to rosparams and launch files can be made. Matches will not be delayed for groups that are not ready the time schedule for their match.
Your grade for this assignment will be determined by equal weighting of your group's implementation (50%) and your individual written report (50%). The weighted breakdown of grading factors for this assignment are as follows:
Note: Demonstrations of your challenges should occur by scheduling an appointment with a TA. Soccer competitions will be held during class and the preceding hour (12-2pm).