For the assignment, you will implement an artificial potential field path planner, and use it to plan paths for a Kuka youbot robot in a polygonal world. The lab has three parts: setting up Gazebo and the Kuka youbot simulator, setting up a world model (including obstacles), finding collision-free paths using a potential field planner.
As for the last programming assignment, Hyongju (your course TA) has prepared a tutorial for Assignment #2 to guide you through the assignment. The tutorial contains information for a variety of options (for example, guidelines for both hydro and indigo ROS distributions), as well as launch files.
Part 1: Setting up Gazebo and the Youbot simulator
In the first programming assignment, you used the turtlesim package to simulate a simple (and adorable) turtlebot. The main advantage of turtlesim is its simplicity. The robot kinematics are trivial and the interface code is straightforward. Real robots, however, are significantly more complex in their geometric structure, and realistic simulation requires the ability to model not only geometry, but also dynamics. In short, while turtlesim is a fine vehicle for introducing ROS programming, it is not appropriate for realistic robotics applications. Therefore, in this assignment we introduce the Gazebo simulator, and use it to simulate the Kuka youbot.
Happiliy, Gazebo is installed by default on full ROS installations.
You can easily verify that Gazebo is installed
(after running roscore) using the command:
Unfortunately, the Youbot package is typically not included in the default ROS distribution. Therefore, you'll need to install this yourself. You'll find step-by-step instructions in Hyongju's tutorial for both hydro and indigo ROS distributions.
For the first programming assignment, it was fairly straightforward to launch your ROS programs using simple shell commands. For this assignment, there are quite a few things that need to be done when firing up the Gazebo Youbot simulator, and doing so by typing shell commands (each time you want to debug your code) quickly becomes tedious.. Happily, ROS provides an easy way to launch multiple programs by using launch files. Again, Hyongju has taken care of you by providing a sample launch file in his tutorial.
Once you have installed the Youbot simulator and created (or modified) an appropriate launch file, you should write some test code, to ensure that you know how to write code to interact with the Youbot simulator.
Part 2: Setting up a world model
Path planning isn't very interesting in an obstacle-free environment. For this assignment, we'll use URDF (Unified Robot Description Format) files to define the geometry of robots and of obstacles. There are various ways to create URDF models, but for this assignment, Hyongju's tutorial includes URDF files for a simple world that can be used to test and demonstrate your programs. If you wish to design your own environments, you can create your own URDF files by hand, or you can use a tool such as the Solidworks along with its URDF exporter (which requires a bit of learning effort).
The launch file provided in Hyongju's tutorial also loads the simple_world URDF file.
Part 3: A potential field planner
Now that you can simulate a Youbot in an environment that contains simple obstacles, you are to write a program that implements some version of the potential fields planner that was described in the lecture. For this assignment, we will consider the Youbot to be a polygonal robot that translates and rotates in the plane (i.e., we will ignore the arm for this assignment).
You should assign a few control points to the Youbot (say, at the corners of the rectangular base), and use these control points to compute both attractive and repulsive forces. To compute the repulsive force for the i-th control point, it will be necessary to identify the point in the obstacle boundary that is nearest to this control point. For this assignment, since we are are considering motion planning in the plane, you can treat the obstacles as polygons in the plane. Thus, you will need to write code that identifies the point in the boundary of a polygon that is nearest to a given control point. You must use the Jacobian of the forward kinematics to map the gradients of the workspace forces to generalized configuration space forces.
Although writing the code for this project should not be overly difficult, you should spend some time plotting the approach that you will take. What data abstractions will you use? What functions will you need to write? What publisher or subscriber functions will you need in order to execute your path plan on the Youbot? Here are a few pointers to start your thinking: